#making-mods-general

1 messages Β· Page 315 of 1

next plaza
#

If we get every modder to release as many mods as aedenthorn did, I think we can do it

worldly sundial
#

Also skyrim special edition says it has 7.8 billion downloads, every person on earth has downloaded a skyrim mod confirmed

whole raptor
#

34..?

uncut viper
#

theres about 26k mods in the mod dump, and that includes curseforge and moddrop, so theres a good amount unaccounted for

next plaza
#

My first new contribution will be the random error generator I did for that video the other day

vernal crest
#

They are not -good- mods lol

#

They are test mods

#

They're just complete, working mods that do very tiny and sometimes silly things

round timber
#

well now im curious

rigid oriole
vernal crest
next plaza
#

See if I need a test mod I usually just reuse a dummy project and change it each time I use that

round timber
#

big krobus

next plaza
#

If I just need to run a snippet of code I'll use Console Code

vernal crest
#

I have two NPCs, a shop, some new items, a scarecrow, some new recipes, several broken events, etc

worldly sundial
#

#release the big krobus

vernal crest
#

A broken chicken

rigid oriole
#

Aba is avoiding scope creep with such skill

vernal crest
#

I am not even sure if big krobus is mine SDVpufferthinkblob

#

This is not my mod dev folder lol

round timber
#

mysterious and intriguing

next plaza
#

I would show my collection of console code scripts but most are on my old computer, so right now all I have is fillhoedirt.cs

#
for ( int ix = 0; ix < Game1.currentLocation.Map.Layers[0].LayerWidth; ++ix )
{
for ( int iy = 0; iy < Game1.currentLocation.Map.Layers[0].LayerHeight; ++iy )
{
    Game1.currentLocation.terrainFeatures[new Vector2(ix,iy)] = new StardewValley.TerrainFeatures.HoeDirt();
}
}
#

Could've sworn there was another to fill them all with crops

#

Oh wait, I found two more

vernal crest
#

I don't know enough C# yet to have many test C# mods

#

I only have two

lucid iron
#

big krobus is scale 2 test mod right

vernal crest
#

Yup yup

next plaza
#

checkschedulespecific.cs which outputs a specific NPC's current schedule data, pathfinding data (micro level pathfinder), and "warp path" (macro level pathfinder)
dumpschedule.cs is the previous one but with a bit more error checking, and doesn't include the warp path

They were used for debugging schedule issues (ie. "Why Is My Npc Voidwalking????")

whole raptor
# lucid iron

So realistic looking plants (?) make Krobus beeg... noted

lucid iron
#

see i do have a number of these but they r all in 1 particular mod

next plaza
round timber
#

oh god i didnt even notice the plant

vernal crest
#

Yeah I was doing it in one mod but I decided I spent more time commenting/uncommenting and then finding patches than it took me to copy a mod, change the manifest, and write the desired patch(es) in a new mod.

next plaza
# lucid iron see i do have a number of these but they r all in 1 particular mod

The joy of these is that since they're console code I don't have to recompile or fiddle with hot reload (and can in theory send to someone to run on their computer to help me debug without a full new mod).

The sorrow of these is that since they're console code you don't really get any IDE support except syntax highlighting

vernal crest
#

And so the folder of tiny mods was born

#

I have the console code mod but am too babby to be able to use it lol

#

I also want to turn some of my tiny mods into an "examples for newbies" github repo one day and little mods that do one thing are easier for a newbie to follow than one big mod with many examples.

#

(I say from experience trying to pull apart StardewUI examples to just use one lol)

next plaza
#

VSCode is very unhappy with all my comments and trailing commas

#

Not shown: various png files for testing, blank.json (presumably obvious what that is for), testscript.yarn for the YarnSpinner event engine

#

Actually I'm surprised this doesn't include my test for local tokens SDVPufferThink

vernal crest
#

Hmm I was going to play Roots of Pacha but this discussion is making my fingers itch for modding instead

next plaza
#

I've been meaning to play a modded MC modpack for weeks and even installed it and customized things and looked at the quest book

#

Still haven't actually played

#

For those who aren't familiar with the glory of YarnSpinner events, I added testscript.yarn to that gist too

#

...you know, I don't know where my todo list for that is

#

I know I wanted to be able to use your own content pack's tokens without having to do manually pass them in or something - especially i18n tokens

vernal crest
#

Do you think YarnSpinner will still have advantages over the new event format in 1.6.16?

whole raptor
#

There's a new event format..? Or do you mean the new quickquestion/fork alternative?

next plaza
vernal crest
next plaza
#

Like in that script it just shows more of a macro (shortcut for a token), but it has full fledged variable support too

vernal crest
#

But it will still be in the slash delimited script

next plaza
#

YarnSpinner 3 came out within the past few days actually. (I was using a manually compiled prerelease build with the detours previously)

next plaza
round timber
#

the slashes are a lot more bearable now that you can have line breaks imo

next plaza
#

True, but tell that to your json parser in VSCode (or whatever IDE you use)

round timber
#

i simply tune out the red SDVpufferclueless

next plaza
#

If CP could import standalone text files as a field value that'd be another thing

vernal crest
#

I just set my events json files to jsonl

lucid iron
#

{{cat:absfilepath}} when

ivory plume
next plaza
lucid iron
#

r the variables like

#

incrementstat but local

next plaza
#

You can see the other neat features it provides on that site too of course

next plaza
# lucid iron incrementstat but local

If you mean for yarnspinner, they're just like normal programming language variables.

If you mean the potential vanilla thing Pathos was talking about... ask Pathos, I dunno πŸ˜›

ivory plume
#

(The vanilla ones would support expressions, so you could do stuff like...

set someValue "42"/
set someValue "{someValue} + 2"/
set label "section{someValue}"/
goto "{label}"/

But not sure if the number of times it'd be used by vanilla would be worth adding them. (Probably not, now that I already de-hardcoded most of the events with workarounds.))

next plaza
#

If it were your own game I'd say just go for it since I'm biased towards modding, plus we've gotten stuff not used by vanilla much before (mod data, additional farm types (though vanilla uses that too now), etc.), but I know it's a bit different since SDV isn't your project πŸ˜›

lucid iron
#

but if u dont have this how will u do for loop ukimasu

ivory plume
#

Goto labels are a top-level feature of events, so custom event commands can easily use them. For example, you could do stuff like this:

normal commands/

label repeatBlock/
commands to repeat/
.../
{{ModId}}_Repeat 100 goto repeatBlock/

resume commands/
next plaza
#

I've actually thought about a "repeat" command in the past and how to make it, just never got around to it

#

(It'd mainly be used for cases like bulk TAS stuff)

ivory plume
#

(It's also easy to get the index of a label in an event, so event commands could theoretically do stuff like edit the commands before they're run; e.g. to add tokens like {{repeatIndex}}.)

next plaza
#

Also without labels or an equivalent it would be very fragile (like if you specified the amount of commands to repeat manually)

#

Neat

#

...why does YarnSpinner have a quantum mechanics image from wikipedia in the docs

#

I'm not joking:

calm nebula
#

πŸ‘€

#

Can I have quantum entanglement

brave fable
#

yarn entanglement, take it or leave it

next plaza
tiny zealot
#

hey friends, if i am patching in a small tmx with an Action OpenShop on it onto a large map, and the OpenShop includes an owner area, do the X and Y coordinates in it have to end up corresponding to my absolute position on the big map?

brave fable
#

yes, coordinates are final, and aren't transformed when applying map patches

tiny zealot
#

ok, thanks

dreamy cedar
#

Got an event question -- if I use the 'viewport' command to set the camera to the corner of a map, it centers the camera on that spot, even if it means showing a cropped picture of the map. When you set the viewport at the beginning of the event (like with the two numbers that are the 2nd line of the script), the game will fix that problem by centering the screen as far into the corner as it can without having to show the cropped edge of the map... Is there a flavor of 'viewport' that does business like the initial viewport setting?

vernal crest
#

I think you're after viewport <x> <y> clamp

dreamy cedar
#

Indeed I am! Thanks!

fallow grotto
#

why isnt this working?

#

do i need to add tmx after?

vernal crest
#

No, you do not want to add .tmx. If this is a map property warp and it's on your map patch, it won't be getting applied to the backwoods map because map properties don't transfer. You need to add it using a CP patch instead.

Ideally, you also shouldn't have a map/location called Custom_HollowPath. The Custom_ isn't necessary and using your mod ID as a prefix is best practice to ensure uniqueness.

#

Oh you're using CustomLocations. Where did you get that from? (Asking because I am trying to hunt down and eliminate any references to CustomLocations in tutorials)

#

That's deprecated so I recommend not using it.

fallow grotto
vernal crest
fallow grotto
#

???

#

so i shouldnt make my own map

round timber
#

no thats the old way of adding custom locations

vernal crest
#

No, that is not what I mean at all.

round timber
#

theres a new better way now

brave fable
fallow grotto
#

what is that way?

mighty ginkgo
#

@vernal crest it won't be getting applied to the backwoods map because map properties don't transfer. do you mean that the map properties in the map patch file that is applied using EditMap don't overwrite the existing ones in the target map? i thought they would

brave fable
#

(CustomLocations is a legacy workaround for adding new locations in older versions of the game; it's still around for forwards-compatibility reasons)

vernal crest
fallow grotto
#

so just need to add "AddWarps": [
"0 0 lacation 0 0"

#

to my content.json

vernal crest
#

Well you have to make a proper EditMap CP patch you can't just plonk that down by itself.

#

But that is what would be in that patch, yes.

gloomy hemlock
#

Hi! I'm not sure what ettiquite is on Discord servers this busy. Can I ask a question right now or?? (Ya'll have a convo going so I'm not sure if it's okay to just inject)

fallow grotto
#

so i add the addwarp into their right?

gloomy hemlock
#

Thank you!

I'm new to modding and looking for a reality-check if anybody can help. I know I should start with a smaller project to practice, but I'd like help understanding how 'big' my eventual goal mod is on a complexity level so I can adjust my expectations on how long the climb could be. I want to make typically non-romanceable characters romanceable. (My dream mod is to create a potentially deeply messy mod where you can romance ANY human adult with the world reacting to said actions). Could anybody explain how complex it'd be to do so? Specifically, how difficult is it to make custom events, custom marriage schedules, etc? I've spent the last three hours digging through the wiki modding guide and the ReadMe on ContentPatcher so I can tell it will be a LOT of work but I don't yet know enough to know how little I know.

vernal crest
fallow grotto
#

kk

vernal crest
# gloomy hemlock Thank you! I'm new to modding and looking for a reality-check if anybody can he...

Making a non-romanceable character romanceable is a lot of work but is not mechanically very different to making a new NPC, so it's very feasible. You'll still have a lot to learn but you won't be exploring ground that plenty of others (including me) haven't already been over, so there will be lots of help available.

Custom events are difficult in that they break easily so they take a lot of trial and error, testing, and sometimes tearing your hair out, but they're very simple in terms of actually editing the game to get the event in.

Custom marriage schedules are...well, there are tricky things to work around but they're also easy to actually get into the game.

mighty ginkgo
fallow grotto
#

this correct?

vernal crest
# fallow grotto this correct?

Nope, you've not added it inside your existing patch at all. You haven't even put it inside your Changes field. It needs to go right after the ToArea, before the closing curly brace.

fallow grotto
#

oh, right

#

i just replaced what i had there already

brave fable
#

missing a quote at the end of the addwarps value!

fallow grotto
#

would chaining it work?

fallow grotto
brave fable
#

also missing a close brace after the add warps line

fallow grotto
#

?

brave fable
#

(closing your Changes {} entry)

vernal crest
#

Oh yes thanks for catching those bluebs

brave fable
#

if you upload your file to https://json.smapi.io/ rather than sending screenshots it'll be easier to dianogse the issues

fallow grotto
#

isnt that what the ] bellow is?

brave fable
#

no!! the ] closes the earlier [ that demarcates the list of changes

#

the {} demarcates a single entry object in that list

#

sorry bitter btw, people will answer your question when they can hahah

fallow grotto
#

OH i see

brave fable
#

(it's quite an open/undefined answer after all)

fallow grotto
#

that one

brave fable
#

yeeees

vernal crest
gloomy hemlock
# vernal crest Making a non-romanceable character romanceable is a lot of work but is not mecha...

That's a very useful response, thank you! Essentially not so much insanely complex if I'm willing to be patient and look through the existing resources, but certainly a matter of extensive testing and ironing out unexpected bugs. I'm more confident in my art skills but this won't be my first shot at modding (though not for Stardew) and I do have basic grasp of coding fundamentals. I've been rooting around in mod code as well to get an idea of how folks pull off their work. (Ofc I would never try to reuse any of it, I'm aware that's theft and super gross. It just helps to understand how format may be done)

I'm going to see if I can make a single NPC romanceable with a very shallow framework (not wasting time with an intensely overworked vertical slice) to see how feasible it is for me to start on my big goal. I appreciate your info! (If you have any character creating specific tutorial links to throw my way that'd be appreciated but the Stardew Valley wiki is insanely well put together regardless. I've never seen such accessible modding resources in a gaming community before.)

brave fable
#

so you did SDVpuffercoolest

fallow grotto
#

he can type ungodly fast

gloomy hemlock
brave fable
#

zero object permanence as soon as the messages scroll offscreen

gloomy hemlock
fallow grotto
#

do i need to Write it like {0 0 location 0 0}{0 0 location 0 0}, or like how it is on the propertys, {0 0 loaction 0 0 0 0 location 0 0}

#

im gonna asume the propertys version 😬

vernal crest
# gloomy hemlock That's a very useful response, thank you! Essentially not so much insanely compl...

This tutorial takes you the process of making a new NPC. It's probably worth going through and looking in the content files mentioned (e.g., things like Data/Characters) so you can see where all the pieces are and then see if you can adapt it to edit an existing NPC.

You can also look at existing mods that make unromanceable NPCs romanceable like Clint Reforged. Don't worry about stealing code - the data format and the way CP works is very restrictive and therefore there are only so many ways to achieve things (especially basic things like editing dialogue) so even if you wrote everything from scratch it'd end up with large swathes looking basically identical to other mods.

Definitely a good idea to just start with one! You'll also want to learn the tricks for easy testing, such as console commands like patch reload to reload your mod's changes without having to quit and restart the game. This is the CP page for the CP-specific commands and this is the wiki page for the game ones.

vernal crest
fallow grotto
#

so, do i need to like, initialize the map, or will it do it automaticaly when i warp to it?

vernal crest
#

What do you mean?

fallow grotto
#

do i need to write a peice of code that add the map to the game or does it just work?

vernal crest
fallow grotto
#

you told me not to

gloomy hemlock
# vernal crest [This tutorial](<https://stardewmodding.wiki.gg/wiki/Tutorial:_Making_a_Custom_N...

That is extremely useful, thank you! I've bookmarked all of the links for later. (I maaaaay be up too late right now due to insomnia but that's fiiine) It's good to know that as well! I know some mods can be quite individual (I imagine it's because the games weren't made with modding in mind and didn't have library mods like Content Patcher to use) and I remember seeing a few scandals go down in other communities regarding theft of other modders codes. My next internal question was how to more effeciently test my mod so thank you very much for reading my mind and providing me the resources!

I hope you're having a good day/night! (Gonna hopefully force myself to sleep. I'm excited to start working on my project tomorrow)

fallow grotto
#

i wna warp from the back woods, to here

vernal crest
# fallow grotto you told me not to

Yes but just because I say something doesn't mean people always listen to me lol. If you stopped using CustomLocations, you need to do what's in the tutorial I linked for you about how to add your map to the game.

fallow grotto
#

theirs like a million tutorial all saying different things, this is painful XD

vernal crest
#

Well, I did ask you where you got the CustomLocations bit so I can change it. Then there'd be one fewer tutorial saying something different.

#

But yes, because all the resources for modding the game are player-made, they don't necessarily get updated when the game changes.

fallow grotto
#

i think it was some sort of blog, i have no clue anymore

versed wyvern
#

Did you just start this project or did you start it some time ago?

fallow grotto
#

oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooh

versed wyvern
#

It's good for me I happened to see this conversation because the project I started some months ago's still using CustomLocations and I had no idea it was outdated shockedpeko

fallow grotto
vernal crest
#

CustomLocations was deprecated in 1.6

versed wyvern
#

Aye, but when I started the project in December I believe the main wiki's maps page still said to use it

#

Or perhaps it was that very guide pre-update

fallow grotto
#

can i chain things in the action command or do i need a secound?

vernal crest
#

The official wiki page was changed in October (still very late lol)

fallow grotto
#

i already have action mapedit in my content.json

vernal crest
#

This is a patch, by the way. The bit with "Action" (and other stuff) in it between curly braces. If it doesn't have the "Action" field, it's not a CP patch.

{
    "LogName": "Load TestNPC's Saloon room",
    "Action": "Load",
    "Target": "Maps/{{ModID}}_Wooble_Room",
    "FromFile": "assets/maps/aba_valya_room.tmx"
},
woeful lintel
#

Hey, I'm still doing cursed and illegal stuff with my data model, but now I'm getting a "Invalid type owner for DynamicMethod" error from the JsonReader, can someone explain what it means in C#? The results I get on google are very specific to other libraries so they don't help much

#

It's kind of annoying how the JsonReader gives a general error of "can't parse Json" without giving where the error happened in a JsonConverter

#

It seems to have something to do with the fact that one of the field is public DirectionalField<Collisions> Collisions = new();. I tried making "DirectionalField" not dynamic (replaced all mentions of T with Collisions), and it worked.

#

Here's my DirectionalConverter<T> for reference:

class DirectionalConverter<T> : ReadOnlyConverter<DirectionalField<T>> where T : Field, new()
{
    public override DirectionalField<T> ReadJson(JsonReader reader, Type objectType, DirectionalField<T>? existingValue, bool hasExistingValue, JsonSerializer serializer)
    {
        if (reader.TokenType == JsonToken.StartObject)
        {
            DirectionalField<T> result = new();

            JObject obj = JObject.Load(reader);
            T? instance = obj.ToObject<T>();
            
            // Make all directions point to the same instance
            if (instance != null) result.unique = instance;
            // Assume directional and parse as Dictionary
            else serializer.Populate(obj.CreateReader(), result);

            return result;
        }

        throw new InvalidDataException($"Could not parse Directional Field from {reader.Value} at {reader.Path}.");
    }
}
#

and DirectionalField<T>:

[JsonConverter(typeof(DirectionalConverter<>))]
public class DirectionalField<T> : Dictionary<string, T> where T : Field, new()
{
    public T unique = new();
    
    // Some getters not included here
}
#

I really don't understand what part of the dynamic structure I made is causing the issue.

ocean sailBOT
#

Log Info: SMAPI 4.2.1 with SDV 1.6.15 build 24356 on Unix 6.14.5.200, with 6 C# mods and 6 content packs.
Suggested fixes: One or more mods are out of date, consider updating them

fallow grotto
#

this is a little confusing

ornate locust
#

What's confusing?

#

That's a localization, you can find that string in the localization files and that's what the name would be

fallow grotto
ornate locust
#

The specifics don't actually matter

fallow grotto
#

like, idk what im supposed to change or not

#

oh

ornate locust
#

As long as the string is the same as it is in the localization file

fallow grotto
#

whats a localization file

ornate locust
#

People generally name those in ways that make it easy to figure out what goes where at a glance

#

Also called an i18n for reasons I am not clear on. It'd be in your mod folder/i18n/default.json

#

The purpose is so people can translate your mod. They just have to translate that file

#

instead of the whole mod

uncut viper
#

(i18n = internationalization. 18 letters between the i and the n)

ornate locust
#

Aha

uncut viper
#

(you may also sometimes see l10n, for localization, or a11y, for accessibility)

ornate locust
#

I would never have guessed it being the number of abbreviated letters

uncut viper
#

((i think theres also t9n and g11n for translation and globalization too but i see those a lot more rarely))

fallow grotto
vernal crest
# fallow grotto

You will need to Load the Chaotic.Moonshade_Hollow_Path map as well in order to be able to use it. Your DisplayName has a semi-colon after i18n but it needs to be a colon. If you haven't set i18n up yet, you can do it now or later, it doesn't matter. Otherwise, looks good.

fallow grotto
#

wdym ill have to load it?, i thought thats what this is doing

uncut viper
#

you're adding the Location but not the Map

fallow grotto
#

im confused

#

map path

uncut viper
#

take the Shed.tmx for example. thats one map that looks like a shed, but it'll be used for as many shed Locations as you construct sheds for

#

you have the Location data edited in, but you've not loaded the tmx

#

so the Map doesnt exist

#

(the shed example being to point out the difference between Map and Location)

fallow grotto
#

do i need to add a "FromFile"

uncut viper
#

you need a separate Load action to load your tmx

fallow grotto
#

ah

uncut viper
#

the Target for that Load will be Maps/Chaotic.Moonshade_Hollow_Path and it will have a FromFile yes, pointing to your .tmx asset

fallow grotto
#

so do i add "Load" in that seound part, or do i need another bracket with "Action": "Load"

vernal crest
vernal crest
fallow grotto
#

well im asking if thats cosiderd an action

vernal crest
#

It's literally the Action field, so yes.

fallow grotto
#

wait, im being dumb

#

yeah

#

do i need to have that before eveyting, or does anywhere work?

vernal crest
#

You can have it after. I prefer to have it before because it makes it more readable imo, but it won't affect how it works in game.

fallow grotto
#

so like this

#

oop, forgot a "

vernal crest
#

Close, but it absolutely should not be an xnb file

#

It should be your tmx file

fallow grotto
#

oh yeah

#

tmx

vernal crest
#

And the tmx file doesn't have to be named the same as the Target, though it can be if you want to.

fallow grotto
#

should the warp ({0 0 Location 0 0}) be the maps file name, or the display name?

vernal crest
#

It should be the Target without the Maps/ bit. So in this case Chaotic.Moonshade_Hollow_Path

fallow grotto
#

i did use the wrong bracket, but idk if thats the real problem..

vernal crest
# fallow grotto

I didn't pay attention to the AddWarps part before but you've formatted that incorrectly. It needs square brackets and every warp needs to be in one long line inside the quote marks without commas.

#

Yes, bracket type is important. You have to use the right ones always.

fallow grotto
#

ok, but no ", "

vernal crest
#

Hm actually it says it's a list

#

So it might be ok if you just change the brackets

#

Oh yeah I thought I'd never done multiple warps before but I have

#
"AddWarps": [
    "-1 48 {{ModID}}_NationalPark 59 31",
    "-1 49 {{ModID}}_NationalPark 59 31"
],
fallow grotto
#

oh, so that was fine SDVpufferpain

vernal crest
#

Yeah sorry

#

Just ctrl+z until it's back to how it was

fallow grotto
#

thank god for ctrl-z

fallow grotto
fallow grotto
vernal crest
fallow grotto
#

just noticed that, well see

#

didnt fix it

vernal crest
#

Can you show what you changed it to?

fallow grotto
#

i did it twice

#

works now!!!!

#

is their a reason the floor sounds like wood here?

vernal crest
#

Does your map have the outdoors map property?

fallow grotto
#

im guessing by the fact its darker, no

#

so noy that i have the seperate map, mapdata works now right?

vernal crest
#

Yes, you can put the map properties into the tmx file for this one

#

Oh, and did you make this map by copying a vanilla map and then editing it or did you make a new map from scratch?

fallow grotto
#

copyed

#

i just took the forest map

#

so marnies, ect. map

vernal crest
#

Okay that's the right way to go about it. Your tiles should have the dirt or grass properties then, so hopefully once you set the map to outdoors the sounds will change.

fallow grotto
vernal crest
# fallow grotto

I can't hear anything in that video but I assume it's meant to be illustrating that your tiles still sound like wood

fallow grotto
#

no, idk y theirs no audio

#

it works perrfectly

vernal crest
#

Oh that's good

violet grotto
#

Just wondering, is there a way to detect if the farmer+farmhands have specific pets?

#

And if so, could I theoretically lock items from a custom shop behind having specific pets?

steel plaza
#

if im making a new outdoor location, should i also make a tilesheet for when it is a different season?

vernal crest
#

The way that seasonal tilesheets work in outdoor maps is that if the tilesheet has the season name as a prefix (e.g., spring_ExampleTilesheet) then when the season changes, the game will try to find the next season's tilesheet to swap to.

steel plaza
#

im making an extension of the bus stop, like in the right side opposite of the backwoods(since abigail has an event there i think)

#

basically a new map

vernal crest
#

Be aware that Ayeisha has a map there, but I'm sure you can figure out compat if that matters to you.

#

But usually we use vanilla tilesheets when making maps. Are you not planning to do that?

woeful lintel
steel plaza
#

and also how do i write when I want it to only show in certain days and time, except when a moss rain is happening and thunderstorm

#

is there a way to use conditions in CP?

vernal crest
# steel plaza and also how do i write when I want it to only show in certain days and time, ex...

To have your tilesheet be different depending on weather, for example, you could do this:

Dynamic token setup

"DynamicTokens": [
    {
        "Name": "Weather",
        "Value": "sunny"
    },
    {
        "Name": "Weather",
        "Value": "rainy"
         "When": {
            "Weather": "Rain, Storm"
        }
    },
]

Tilesheet load

{
    "LogName": "Load Aki's truck",
    "Action": "Load",
    "Target": "Maps/{{ModID}}_TruckTilesheet",
    "FromFile": "assets/maps/tilesheets/truck_tilesheet_{{Weather}}.png"
},

Files in mod folder

truck_tilesheet_sunny.png
truck_tilesheet_rainy.png
#

To have it different by colour you could put them in different folders and then make your FromFile something like this: "assets/maps/tilesheets/{{Colour}}/truck_tilesheet_{{Weather}}.png"

{{Colour}} would be the name of the config option you put in the ConfigSchema and then players could pick blue, for example, and it would load the one in the blue folder.

visual dirge
#

wb mods on github

lucid mulch
visual dirge
#

ofc

vernal crest
#

It's like 6am in the morning for most of the C# people Leroy lol

woeful lintel
#

I'm just desperate because I don't have anything else to do since I lost my hardcore minecraft world earlier today

vernal crest
#

Losing a world sounds not ideal

lucid mulch
#

Having the JsonConverterAttribute have an incomplete type is suspicious

sleek igloo
#

@ivory plume sorry for the ping, pathos, I just wanted to ask a CP question regarding shops from other mods

I don't know if you remember my mod Khadija's Recipe Shop, but its main functionality was to remove modded recipes/items from vanilla vendors and "redirect" them to the featured shop in order to declutter those menus. Shop Tile Framework had that ability built in, but now that I have to migrate to CP, I'm wondering if there's a similar functionality or a workaround I can use? SDVpuffersweats

fading walrus
#

(Hi Hadi, hope you're doing well!)

sleek igloo
woeful lintel
fading walrus
#

Oh btw, I don't know if you remember, but I'd gotten your permission ages ago to use your sprites for the sodas and syrups, but the new update won't have those anymore. I finally drew my own!

woeful lintel
sleek igloo
#

Been doing Lil baby steps with CP mods SDVpufferthumbsup

fading walrus
sleek igloo
#

Is mae still around?! I thought she retired? :0

fading walrus
#

I'm in contact with her on and off, she's handed her stuff over to Shads too, though

sleek igloo
#

Most of my old MCN crew is either quiet or retired, which is fair, it's good to hear they're not totally gone

fading walrus
#

I think she was around last year in this server, I spoke to her via DMs last we chatted

sleek igloo
#

I think gervig is still around?

fading walrus
#

Sporadically, yeah!

sleek igloo
#

He's probably animating the entire game rn

fading walrus
#

Btw, there's a lil server with modders in it that's really nice for getting back into the swing of modding if you'd like to join? There's a few people in there that are probably familiar names for you

sleek igloo
#

Oh sure!

#

My server is dead these days lol

fading walrus
#

May I DM you a server invite?

sleek igloo
#

Go ahead SDVpufferheart

fading walrus
#

I've sent it over!

vernal crest
fading walrus
#

Ope

steel plaza
#

no other mods use that right? like SDVE or East Scarp

#

haven't really played with those mod yet so i don't know

vernal crest
#

Use that area?

#

RSV I think makes the bus stop map wider in order to add a pathway up to a cablecar map

steel plaza
woeful lintel
vernal crest
lucid mulch
#

mineral town also does, which has compat patches with ayeisha

vernal crest
#

Ah okay that will be an important one to do compat for I think

pine elbow
#

does anyone know if its possible to make a mod adding a new but, smaller village, on a tablet? i dont have a pc,, emoji_7

fading walrus
#

Pixel art and json editing are both doable on a tablet, but maps could be an issue

sleek aurora
#

Is there a way to make Sapling universal production? Those. Without the need to prescribe input and withdrawal identifiers.

drowsy pewter
#

For the seedmaker? No

#

(without C#)

sleek aurora
#

Rather for a new machine

drowsy pewter
#

No for any machine

#

unless you want to make all saplings turn into the same item, which is doable

sleek aurora
#

That is, you can only do with the creation of DLL?

drowsy pewter
#

You need C# to make a machine that automatically takes any fruit tree produce and turns it into the fruit tree sapling. With Content Patcher, you need to write code for each tree one by one

#

I'm only assuming this is what you want to do, since I'm not totally sure what it is you want to do exactly

sleek aurora
#

I want to put the fruit and get a Sapling

drowsy pewter
#

Yes, you need C#

#

Yes, C# is the thing that makes a DLL

#

It will not be easy either

sleek aurora
#

I understood, thanks

calm nebula
#

There isn't anything particularly hard about the idea, I just personally always found it unbalanced as heck

ornate trellis
#

wahh, what am i forgetting again for it to not work evaporated

#

also i realized i cant draw seals lol

#

oh my god i found the issue it was another dumb bracket

#

when will i break free of this curse

vernal crest
#

Of getting brackets and things wrong? Never lol

#

Happens to everyone

#

Do you have colour coded bracket pairs? That might make it easier for you to see when they're wrong

ivory plume
#

(Consistent indentation helps a lot with keeping consistent bracket/parenthesis pairs, since it'll be much more visible if you outdent and there's no closing bracket on the line.)

vernal crest
#

Especially if you also use a rainbow indentation extension :D

ornate trellis
#

also i do need some tilesheet help

vernal crest
#

You can probably get a plugin for it. Do you have the JSON Viewer plugin? That will help you find errors too, since you can run a command to check the syntax.

vernal crest
ornate trellis
#

I set my lil map to island context but i took a vanilla tilesheet with seasons exported as tsx so i can keep the animations and it is named "Landscape" instead of the proper tilesheet name and now I get this error https://smapi.io/log/11d55182c2074e0f834d92e7b2e70bef and its props because of the wrongly named tilesheet in tiled, isnt it?

ocean sailBOT
#

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

ornate trellis
ivory plume
# sleek igloo <@226803198218731520> sorry for the ping, pathos, I just wanted to ask a CP ques...

Unfortunately you can't exclude items from all vanilla shops in a consistent way through Content Patcher. You could do it by adding PerItemCondition to entries or removing specific entry IDs from a shop, but that'd be more handcrafted.

That said, you can keep using Shop Tile Framework if you need a feature that isn't possible without it. It's not in development anymore, but I'll be keeping it compatible with game/SMAPI updates to support content packs that still use it.

vernal crest
ornate trellis
#

hol on...I think i did not embed...

#

i did in fact not do that

#

also do you mean this

sleek igloo
vernal crest
ornate trellis
vernal crest
#

Are you moving those tilesheets out of the folder when testing?

ornate trellis
#

no

#

i should, shouldnt I

#

i remember you setting my fishmonger sheets up nicely but then i was like dude i actually still dont fully get this whole tilesheet setup stuff but now i am so long in the game i feel too embarrassed to ask

vernal crest
# ornate trellis i should, shouldnt I

Yes, it's important to do so because you need to be seeing what happens when the game is not using the tilesheets that are in your mod folder, since they won't be there on release.

vernal crest
ivory plume
#

(Tip: you can test that without moving tilesheets out of the folder by prefixing the filename with a dot like .paths.png. That way you can open it in Tiled without moving files back & forth, but SMAPI will ignore the local file in-game and look for a loaded Maps/paths asset instead.)

ornate trellis
#

ahhh

vernal crest
#

(I do actually do that myself too haha)

ornate trellis
#

so thats why you did that with the fishmonger ones

vernal crest
#

Yes it is haha

calm nebula
#

_SEASONAL_ISSUES

vernal crest
#

Sorry I didn't link to the explanation on the wiki when I did it!

ornate trellis
#

so whats the extra folder than for if i already outed myself for my brain being built silly

vernal crest
# calm nebula _SEASONAL_ISSUES

Lol yes that is a file full of images of my farmer staring at bad tile transitions that weren't present in spring but are present in other seasons (mostly winter)

vernal crest
ornate trellis
#

yea

vernal crest
#

Because your custom tilesheets need somewhere to live when you publish the mod lol

ornate trellis
vernal crest
#

The idea is that you Load your custom tilesheets into the game from a different folder than what the maps are in and then other mods can target those tilesheets for recolour compat, edits, etc. If you leave those custom tilesheets in the same folder as your maps, your maps will never use the ones you Loaded and nobody can edit them.

ivory plume
#

(Unless you use the dot trick.)

vernal crest
#

(Or you can be Pathos and use internalAssetKey and make everybody hate you forever /j)

ornate trellis
#

πŸ€”

vernal crest
#

Yes, I guess you could just keep the tilesheets in the map folder with the period prefixes. I only use them for testing because it feels messy to me.

#

(Void you can ignore what I said about internalAssetKey, I was just teasing Pathos lol)

ivory plume
#

(For example, Central Station uses the dot trick so the local file is ignored in-game, then loads it into Maps with the same name so that loaded version gets used by the map. That avoids needing to duplicate tilesheets between two folders.)

ornate trellis
#

so the easiest route for me would jsut be the dot one then

vernal crest
#

To be fair, I don't duplicate the tilesheets between folders. I symlink from my tilesheets folder and then delete the symlinks before publishing xD

vernal crest
ornate trellis
#

BUT if I were to use the folder I'd need to change

            "LogName": "VoidWitchCult's Custom Tilesheets",
            "Action": "Load",
            "Target": "Maps/VWC_Waddensea_Tilesheet,
            "FromFile": "assets/{{TargetWithoutPath}}.png",
        },```
to
```{
            "LogName": "VoidWitchCult's Custom Tilesheets",
            "Action": "Load",
            "Target": "Maps/VWC_Waddensea_Tilesheet",
            "FromFile": "assets/Tilesheets/{{TargetWithoutPath}}.png",
        },```
#

and still use the dot one for tiled? thonking

vernal crest
# ornate trellis and still use the dot one for tiled? <:thonking:375297039484846081>

I think it might be better right now if you did one or the other (just so you make sure you really solidly understand whatever it is that you do). Either use the dot thing that Pathos said or use the tilesheets folder and just drag the tilesheets between the tilesheets folder and maps folder depending on whether you're editing or testing.

ornate trellis
#

oh yeah im jsut doing the dot one i just wanna understand things for the future

#

hell yeah it works now

#

i bow my humbled self to you once more

#

πŸ™‡

vernal crest
#

By the way, this is what colour coded brackets can do to help identify pairs

ornate trellis
lucid iron
#

Many text editors support folding by blocks too

vernal crest
#

And now you can see I've deleted one of the closing brackets and so the top one has gone red

ornate trellis
#

damn how do i get these

vernal crest
#

Use VS Code lol

ornate trellis
ornate trellis
vernal crest
#

What part confused you? It's very similar to N++, it's just got a sidebar

whole raptor
#

Tbh VSC seems easier to use than Notepad++ for me SDVpufferthinkblob

vernal crest
#

I am trying to see if I can get bracket colour coding to work in N++ though

#

This is my file open in VSC compared to N++.

whole raptor
#

Although not gonna lie... with your theme I'd always think those orange brackets are red SDVkrobusgiggle

lucid iron
#

N++ surely has some plugin for rainbow brackets

ornate trellis
#

you have way less tabs and stuff happening in vsc than i did, hm

vernal crest
vernal crest
whole raptor
#

Ah yeah, never really bothered me tbh

vernal crest
#

It doesn't bother me much but I figured since I could change it I would. But as soon as I added the code for it the default colours were gone so I just picked colours myself lol

whole raptor
#

Changing the subject a bit.. can we use i18n tokens inside default.json? SDVpufferthink

vernal crest
ornate trellis
#

yeah na that i not gonna touch ever again

vernal crest
vernal crest
whole raptor
#

No idea πŸ˜…

ivory plume
#

(Visual Studio is an integrated development environment for C#; it's overkill if you're just editing JSON files. Visual Studio Code is just a fancy text editor. The naming is classic Microsoft confusion.)

vernal crest
ornate trellis
whole raptor
#

I just thought about having something like customizable NPC name and what would be the best way to implement it

vernal crest
#

Config token?

ornate trellis
#

i jsut installed vsc again to check

whole raptor
#

Well yeah, but if possible I'd love to avoid passing tokens into i18n.. since I had many headaches with that before for some reason πŸ˜…

ornate trellis
#

well, i gonna check vsc a bit later i really wanna get this mod done before the times up lol (tho i think im done now if I dont do the nexus release and jsut put it in smc)

vernal crest
#

Pathos is obviously the main word on this, but since i18n is done via tokens...I don't think you'd be able to avoid them anyway. Maybe there's a way to use the game's localisation strings (chu, you're up lol)

whole raptor
#

What was that one mod that allowed changing names of vanilla NPCs called? SDVpufferthinkblob I could see how they did it

#

Found it, nvm

vernal crest
#

Is it Ultimate Villager Manager?

lucid mulch
#

i18n is a smapi mechanic not content patcher, and its contents doesn't have access to any content patcher functionality.
It can do very basic tokens but only stuff explicitly passed into it

whole raptor
#

Yep, it doesn't use i18n tho SDVpuffercry

#

So for example I'm guessing it's not possible to have something like:

"Greeting": "Hi {{i18n:Name}}."```
lucid mulch
#

Depending on context, I'd use vanilla token strings [[ stuff ]] and have it pull from a loaded string elsewhere

whole raptor
#

Oh? How would that look like? πŸ‘€

lucid mulch
#

Look at how vanilla data/characters looks for the display name fields

whole raptor
#

Oh, that might be nice actually (if it works inside i18n)

lucid mulch
#

It's all about where the outer i18n would be used itself

#

i18n doesn't care about it but will preserve it perfectly fine for when the game reads it

vernal crest
#

(That is what I meant before when I said localisation strings. I forgot they were called tokenisable strings)

whole raptor
#

Nice, should work fine then for dialogues and events

lucid mulch
#

Oh was hoping that page listed notable places it's used but nope

whole raptor
#

(Would be nice if it did)

vernal crest
#

Oh hey look this is an example that chu made for using localised text for configurable character names.

#

I have not yet actually downloaded and looked at it. I just squirrelled it away into my SMC thread to hoard for later.

#

I don't...actually know if you can see that if you're not in SMC?

drowsy pewter
#

Forwarded posts should forward everything even if you're not in the server!

lucid mulch
#

It's used heavily in vanilla in places where it's not localised but wants localised text (like display name or descriptions of characters or objects).

Events (pre 1.16.16) and dialogue are already localised, but I think dialogue already runs on the token parser system so the stock commands should work, and there's the speak command iirc which accesses the string system directly without the token

whole raptor
round timber
#

🀨

lucid mulch
#

ok got out of bed to check, Dialogue does look like it runs through the token parser

#

and an interesting token available via the vanilla token system is [CharacterName <name>]

#

oh that Subork example is literally showcasing dialogue using CharacterName directly, along with localizedtext for arbitrary strings

#

tbh a smapi feature im tempted to propose is internalassetkey but for i18n, so you can access i18n content directly from the game without the intermediary step of loading it into the pipeline

vernal crest
#

Chu is a big advocate for using the vanilla token system

lucid mulch
#

tbh same

whole raptor
lucid mulch
#

and while its perfectly possible to just... not use i18n and use localized string assets like vanilla, working with localized assets is quite annoying, and CP isn't a fan of it

#

so just having SMAPI plug the i18n system directly into the pipeline would close that gap

round timber
#

When conditions don't have any capabilities of doing "or" stuff, right, i just have to do different patches for each set of conditions i want to trigger the action?

whole raptor
#

You can use queries

lucid iron
#

its just a pain to write it N times for different locale

lucid mulch
#

OR is possible in ContentPatcher easily when you want different options on the same token

"When": {
    "Relationship:Abigail": "Dating,Married"
}
``` is true if I'm married or dating abigail.
For distinct unrelated tokens, a fun strategy if you can make tokens always evaluate to a boolean is playing with Merge, or just use query
```json
"When": {
    "query: (({{season|contains=winter}} ) OR ({{Weather|contains=Rain, Storm,GreenRain}}) OR ({{HasValue: {{DayEvent}} }})": true,
    "Merge: {{season|contains=winter}}, {{Weather|contains=Rain, Storm,GreenRain}}, {{HasValue: {{DayEvent}} }} ": true
}

Both of these should do the same thing, being in Winter, having the weather be rain, storm or greenrain, or if there is a dayevent happening

ivory plume
#

(Depending on what you want to do, creating a dynamic token may work well too.)

whole raptor
#

First time I'm seeing Merge SDVpufferthinkblob

calm nebula
#

Merge seems useful!

lucid mulch
calm nebula
#

It's not a commonly used one I think

lucid mulch
#

Its quite rare, but i've been on a set theory mood and trying to find whatever is laying around that does set manipulation which makes Merge quite fun

#

its not used once in my mod folder

round timber
#

the specific thing im trying to do is have a few map patches/warps apply when either
1: the player has seen Event A but not Event B
or 2: the player has seen Event B and it is days 1-7 of any given season

ivory plume
#

(Content Patcher injects Merge automatically when migrating older content packs in some cases. Content packs can use it directly too, but it's a bit specialized and there's usually simpler ways than merging tokens.)

calm nebula
#

It's just a kinda a nice way to do ANY I suspect

round timber
#

"Query: ({{HasSeenEvent:{{ModId}}_Introduction}} AND NOT {{HasSeenEvent:{{ModId}}_10Heart}}) OR ({{HasSeenEvent:{{ModID}}_10Heart}} AND {{Day}} <= 7)": true came up with this but... not sure if its correct lol

lucid mulch
#

or if multiple tokens can have overlapping data, like the canonical documentation example

"When": {
   "Merge: {{Roommate}}, {{Spouse}}": "Krobus"
}
whole raptor
ivory plume
# round timber the specific thing im trying to do is have a few map patches/warps apply when ei...

One option is to create a dynamic token like this:

"DynamicTokens": [
    {
        "Name": "SomeTokenName",
        "Value": false // default if not overridden by another definition below
    },
    {
        "Name": "SomeTokenName",
        "Value": true,
        "When": {
            "HasSeenEvent": "{{ModId}}_Introduction",
            "HasSeenEvent |contains={{ModId}}_10Heart": false
        }
    },
    {
        "Name": "SomeTokenName",
        "Value": true,
        "When": {
            "HasSeenEvent": "{{ModId}}_10Heart",
            "Day": "{{Range: 1, 7}}"
        }
    }
],

Then your other patches can just do this:

"When": {
    "SomeTokenName": true
}

(And ideally rename SomeTokenName to something more specific.)

lucid mulch
#

yes

round timber
#

thank you pathos!

lucid mulch
#

the main flaw with the DynamicToken approach is it forces the dynamictoken definition to be incontent.json when most mods these days will have 1 or more layers of include, so the patch contents and the token rules are quite far apart

ivory plume
#

(But on the flip side, you're not repeating the logic for each patch.)

lucid mulch
#

and LocalTokens don't have access to the cascading behaviour to do it closer

pine elbow
#

could someone recommend me tablet apps that would help with programming an SV mod?

serene moat
#

Levi Ackerman - NPC - Attack on Titan
After suffering serious injuries in battle, Levi Ackerman settles in Pelican Town at the invitation of his old friend Marlon. As a seasoned war veteran, he joins the Adventurer’s Guild, lending his experience to the fight against monsters in the mines and maybe, slowly, finding peace in this quiet new life and some friendships in the town.

Levi is gruff, blunt, and not one for small talk. He uses crude language and keeps people at arm’s length. However, as your friendship with him grows, he’ll begin to open up - just a little. He’s still Levi after all.
https://www.nexusmods.com/stardewvalley/mods/34053

Nexus Mods :: Stardew Valley

This mod adds Levi to Pelican Town. An NPC with custom dialogue, many events, story and character development. Datable and marriable.

lucid iron
dusk terrace
#

I just noticed aedenthorn updated Farmer Portraits just 2 days ago
meanwhile the compat patch for DDFC on mistyspring's continued mod is still broken afaik

lucid iron
#

Do you have SMAPI setup on any platform

lucid iron
pine elbow
#

yess

lucid iron
#

Then for not maps you can mostly just do it by using something that can edit jsons

#

Maps is the annoying part because im not sure if you can get tiled to build on android tablet, maybe??

serene moat
lucid iron
#

Do u want to have a showcase post too DokkanStare

lucid iron
#

Hm can you use dotnet on an android tablet...

pine elbow
#

I think so

lucid iron
#

Not to run things, but to actually compile a dll

pine elbow
lucid iron
#

What kind of tablet is it anyways

blissful panther
pine elbow
whole raptor
#

I like how it seems to be completely integrated into SDV, without needing to know who the character really is in it's original IP

lucid iron
#

That is not your post

pine elbow
#

oo ye, i got it wrong sorry

lucid iron
#

Allegedly a tmx editor

lucid mulch
#

obtw Pathos while you are here, thoughts on a Managed Assets prefix that can access i18n, so something like [LocalizedText SMAPI/Pathoschild.CentralStation.Content/$i18n:destinations.stardew-valley.boat] can be used directly anywhere (including embedded in other i18n) and have SMAPI do the plumbing to have the game asset pipeline know to access the i18n instance correctly, and skip needing to build a mapping table mapping i18n to a game asset

(exact details on what the prefix would be to minimize false positives or breaking change can change, SMAPI/ is already hard reserved and SMAPI/{{ModId}}/whatever maps to ModContent while SMAPI/{{ModId}}.content/Whatever points to its GameContent instance, and the current code really wants managed asset strings to be 3 part split)

Other option would be having SMAPI (or more likely ConsoleCommands or ContentPatcher) registering a token handler to expose i18n directly so the inner knowledge of how managed asset prefixes work isn't required, and could skip touching the asset pipeline all together

grim latch
#

hey can someone help me with a greenhouse specific map mod issue?

lucid iron
#

Remember to read the [[modding:maps]] page

grim latch
pine elbow
grim latch
#

I made a greenhouse map with a cellar which is a new location

#

It works fine

lucid iron
#

Sorry i was linking docs for sam

grim latch
#

But I was amending it today to have a config option to enable or disable the cellar, which requires me to add the cellar entry warps via CP

#

And now the entrance to greenhouse from the farm deposits me over the stairs to the cellar where I put the additional warp

grim latch
#

And I can't figure out a way to stop it from doing that :/

#

Which means I can't make the configurable version work properly

lucid iron
#

It's cus cp AddWarps prepend

grim latch
#

Ok, so if I add the farm warps again in my addwarps last that should fix it?

lucid iron
#

Add all warps via cp, the real ones last

#

Can also directly set it

grim latch
#

Gotcha! Thank you!

grim latch
lucid iron
#

Directly set the Warps map property

grim latch
#

Oh yeah πŸ™‚

lucid iron
#

As if you are doing it in the tmx

grim latch
#

Instead of adding you mean

#

Got it

lucid iron
#

Yeah might be easier to deal with

grim latch
#

I must have missed the bit about prepend

#

Very helpful, thank you πŸ™‚

#

I'll take the warps off the tmx altogether and just do them in my CP file

#

Fab. I knew someone would know πŸ™‚

pine elbow
lucid iron
#

I do mind please don't dm me

#

More importantly asking here let's everyone potentially help you

pine elbow
#

alright, no problem!

grim latch
#

Thaks @lucid iron that works perfectly now πŸ™‚

dusk terrace
#

I fear DDFC might have to rebrand SDVpufferfear

pine elbow
#

is it recommended to make pixel art of characters using ibispaint?

#

for mods

dusk terrace
#

I recommend aseprite

pine elbow
#

thankss

dusk terrace
#

(there's a pinned resource somewhere with list of softwares...)

lucid iron
#

Maybe just do yer own farmer portraits system while at it

dusk terrace
#

farmer portraits system is scary enough as it is SDVpuffersweats

lucid iron
#

I say this bc u got 2 mods fighting for the DialogueBox

#

If you just did farmer portraits then no more fighting

dusk terrace
#

and Farmer Portrait is fighting 2 wars between DDF (also aedenthorn's mod, mind you) and Fashion Sense

lucid iron
#

But mangupix maybe u can just ask aedenthorn for opinions

dusk terrace
#

I have... I'm just in the panic/uncertainty phase right now πŸ˜…

lucid iron
#

The update status seems to be, if you sent in a PR it'll get merged, but if you didn't then it's on a per ask basis

#

Also you are in the clear even if u literally just keep building on top of the DDFC code you have

#

As long as it's also GPLv3 yadda yada

pine elbow
#

what is the pixel size for sv width and height? to make a sprite

lucid iron
#

Depends on what sprite

dusk terrace
#

DDFC's next feature update was going to revamp how data is passed entirely, which would mean it would then be 100% different from aedenthorn's pre-1.6 code... hence maybe it should get rebranded to a new name

pine elbow
dusk terrace
#

portraits are 64x64, sprites 16x32

violet igloo
#

I am using vortex to do my Stardew valley mods. Where can I find what i need to change my launch options so that it loads up my mod?

lucid iron
#

rebranding names hm, Dialogue Box Layouts?

gaunt orbit
violet igloo
whole raptor
ocean sailBOT
#

Vortex isn't recommended for Stardew Valley.

It's hard to troubleshoot and often causes issues like SMAPI/mods not being installed or updated correctly, files mysteriously disappearing, crashes, etc. Volunteers here often can't help with Vortex issues.

Some options:

(See also the Nexus App feedback thread, if you want to help Nexus avoid the same issues in their upcoming replacement for Vortex.)

dusk terrace
gaunt orbit
# violet igloo Yes

The smapi installer gives you instructions on how to do that when you install it. Also, nomori is right.

lucid iron
#

Dialogue Line Layouts YuniHappy

#

You should probably let whoever dependent on you know about the change tho

dusk terrace
#

For sure- my fellow mod creators and framework users will be the first to know SDVpuffersquee

#

DIAL - Dialogue Integration and Layouts

lucid iron
#

Wow yes (too bad it's not a telephone framework)

#

(unless

dusk terrace
#

DIALOGUE's Integration And Layouts Or 'Gu's Extension
pushing it, but I love me some good recursive acronym

lucid iron
#

Gus

dusk terrace
#

Dialogue Integrations And Layouts Of Graphics for User Extensions

#

best I can think of right now SDVpufferdead

round timber
#

ahahaha i hate question forks SDVpetbearsad

rough lintel
#

i just abuse the enter key when writing them. they arent too bad

#

just like i do with events πŸ₯°

#

me when the line break

round timber
#

/question fork1 \"Do whatever you please, I won't mind.#I'll join you.#I'm going home.\"/fork {{ModId}}_GoHome/ PufferHmm does this look right

tribal ore
#

Hi chu, sorry for leaving suddenly yesterday. Didn't see this. Can you please elaborate a little?

#

What would you like special spouse dialogue to do?

tribal ore
#

That final forward slash marks the end of your quickQuestion thing

round timber
#

nah one of the answers makes the event end way earlier than the other so no quick question

tribal ore
#

Fair! QQ is really useful, but mostly just in simple stuff

round timber
#

yee i make liberal use of it already SDVkrobusgiggle

tribal ore
#

I genuinely don't like forks, so I use QQ probably more than I should xD

#

But I'm getting better at them

lucid iron
#

If you expand it to also accept GSQ people can easily load all their dialogue at once without any content patcher conditions

#

It's not that important bc u can just set convo topics in trigger actions and be mostly the same thing

#

But this would eliminate doing things like When weather rain edit

tribal ore
#

Right now, the mod is kind of dumb. It just checks if a dialogue asset has been written to on day started, and clears it on day ending. It's sort of up to the mod author to surround that with whatever CP or GSQ logic they want. The mod doesn't care about CTs or anything

lucid iron
#

Dokkan time to scope creep with abandon then

tribal ore
#

LOL πŸ˜› sure. I'm happy to try and make it more useful. Would be helpful to have a specific test case in mind though

vocal patio
#

is nexus down???

uncut viper
#

(cant write to an asset with a GSQ condition though)

tribal ore
lucid iron
#

I am joke but you can look at button's custom schedule key for some inspiration here

vocal patio
lucid iron
#

Have a separate asset for controlling which spouse dialogue asset is picked

round timber
lucid iron
#

I assume you made this mod for usage with your own dialogue mods in the end, you should decide how it works

tribal ore
#

Pretty much. I made the mod because I got frustrated writing Older Sebastian and didn't want to jump through all of the same hoops with Older Sam

#

I'll take a look at Button's mod, though

uncut viper
#

(its here in case you wanted to look now while Nexus is loading super slowly)

tribal ore
uncut viper
#

i think chu's point was to want to eliminate patch updates completely

tribal ore
#

Ohhhhhhhhh

#

Hmmmm. So write to the asset directly via another mod?

#

I'm still learning what is possible here xD. So if I ask dumb questions, I'm sorry

#

Crap, I need to go. Feel free to ping as much as you want and I'll read it all when I come back. Thanks for the link, Button!

uncut viper
#

if it were to work like my schedule key mod, then instead of having an asset you write just the dialogue to, you write both the dialogue and the condition it should be used in in the same asset

#

so like

{
  "Dialogue": "I want my spouse to say this when its raining.",
  "Condition": "WEATHER Here Rain"
}
#

then when you read the asset (in whatever form you want not exactly the syntax in that example) you check the condition too

#

and if the condition matches, then you set the spouse dialogue

lucid iron
#

Yea, or like Dialogues for a dict of several lines

uncut viper
#

you'd probably want a different data structure than that but thats to get the point across

lucid iron
#

For supporting things like morning/evening dialogue

dusk terrace
#

no idea who needs to hear this but... you don't need the "SkirtConverter" script to convert standard pants spritesheet to use with FashionSense, and you can also avoid having to re-implement each farmer animation... all you need are the feature offsets from the code and use the default pants layout that overlays over the farmer base

you could use the entire list as UniformAnimation for the 4 sides, or split off each frame to their respective sides
(all animation frames with feature offsets in file below)

#

same principle as FS's body base template but with added offsets... not sure why it has to copy the sleeve's template

cunning kiln
#

Is anyone here familiar with Item Extensions?

#

(It was just updated and broke one of my mods. The documentation hasn't been updated, though, so I can't figure out what changed or how to fix it.)

#

The issue: I have a mod that adds special nodes to specific levels of the Pelican Town mines. They were relatively difficult to break (several hits with an iridium axe) and produced a lot of coal. Since the update, these nodes can be broken with a single hit of an iridium axe and produce no coal, but if you blow them up with a bomb, you do get the coal. Any ideas?

uncut viper
#

is your mod on nexus?

cunning kiln
uncut viper
#

no worries, just wanting to take a look at what mightve changed and what you might be using

lucid iron
#

im not sure if theres anything you can do besides tell mistyspring about this problem and tell your users to not update yet

cunning kiln
#

(I'm trying to read the changes on GitHub and feeling very much out of my depth.)

#

Hm. Looks like someone's already opened a bug report.

#

(For me, but also on the Item Extensions page.)

#

Okay, added my issue to the currently posted bug. (I'm glad it wasn't just me missing something obvious.) Thanks, everyone! SDVpufferheart

sand timber
#

Hey everyone, I'm working on a mod that adds a new broadcast channel, and I'm wondering:
Is it possible to have the channel react to in-game milestones (e.g. Community Center/Joja route completion, player marriage, etc.)?
I'd like it to play special messages or segments depending on these events. Has anyone tried something like this before?

uncut viper
#

i dont even see anythin in the commits that seems like it should affect anything at all with your nodes so im wondering if maybe there were some wip changes accidentally included in the build (but not the commits) that shouldnt have been, but thats just pure speculation. shrugs

ivory plume
uncut viper
#

(though actually, making IsBreakableStone return true now seems to have some damage implications for performToolAction)

lucid iron
#

ah it is my fault then YuniHappy (i asked misty if IE could return true for that so other mods can just know its a rock)

#

i thought rocks just had their own hp though

uncut viper
#

to be clear i dont feel like dissecting the entire "hit a stone with a pickaxe" trail of code to know what exactly the implications there are. i just see a spot where the game checks if IsBreakableStone and the tool is a pickaxe and if so, do some damage and return early if the MinutesUntilReady is now <= 0

#

presumably that would not happen previously

ivory plume
#

@tiny zealot Hi! I'm looking at your open PR for Content Patcher 2.7.0.

The new approach for Load patches will allocate two extra collections per load, which isn't ideal for performance. What's the benefit of sending multiple Load patches to SMAPI? Couldn't we just send the highest-priority patch like before but set the correct priority value instead, like you did for the edit patches?

uncut viper
sand timber
# ivory plume Hi! If you're creating a content pack for Content Patcher, you can use `When` co...

Thanks! I downloaded a bunch of channel mods and noticed that most use CP to show text on specific days.
I was wonderingβ€”
Is it possible to use When conditions to show something like breaking news? For example, displaying a special message the day after the player finishes a bundle?
Also, is it possible to have content that continues beyond Year 2? Most mods I've seen seem to stop there. Sorry if these are basic questionsβ€”I'm still new to modding!

ivory plume
#

Yep, your changes can depend on any of these many conditions; there's no limit beyond having a token for the value you want to check.

Bundles are tracked using mail flags. For example, if you want text to change if the player completed the vault bundle (which repairs the bus):

"When": {
    "HasFlag": "ccVault"
}

If you want breaking news that only plays the next day, you can do that too with one extra step. You can have a trigger action which starts a one-day conversation topic on day start if the bundle is unlocked, then set your TV text if that conversation topic is active (via the HasConversationTopic condition).

fallow grotto
#

are there any really good building template tile sheets, or do i need to make my own?

lucid iron
#

a building tilesheet is really just you draw a building blobcatgooglyblep

ivory plume
lucid iron
#

theres a few popular modded ones

#

this one's more furniture but its got some outdoor pieces

fallow grotto
#

if i make my own spring,summer,ect textures, will they automatically change with the rest, or do i need to cp it

sand timber
#

Thanks so much for the detailed explanation! :3 Really appreciate the help

ivory plume
ivory plume
fallow grotto
#

im guesing that {{blablah}} auto replaces?

#

so it just replaces it with the current season?

ivory plume
uncut viper
#

is there an easy reflection way to get a list of override methods from child classes that override an abstract class in their base class?
specifically i need to patch Item.getDescription but obv that one itself is abstract and just overriden in Object, Tool, Furniture, Hat, etc. and i wanted to use Harmony's TargetMethods thing but without needing to manually hardcode all the specific overrides to target

calm nebula
#

Uh

#

Yes but

#

You basically find all classes in (all/the Stardew) binary and see if they are assignable to Item

#

Looks like so

uncut viper
#

so far i am able to get all subclasses of Item, mostly having trouble figuring out if their getDescription method is actually an override or not

uncut viper
#

what the heck is GetAssignableTypes

calm nebula
#

Or don't use FlattenHierarchy

calm nebula
#

It's an extension method

uncut viper
#

thank you!!

uncut viper
ivory plume
# lucid mulch obtw Pathos while you are here, thoughts on a Managed Assets prefix that can acc...

Oops, missed this message.

I think i18n is an internal implementation detail that's not part of a mod's public API. For example, Central Station should be able to edit its internal translations without worrying about random mods breaking because they referenced the old ones. So if we added a feature like that, I'd want it to be strictly opt-in so you can only access a mod's translation keys if they're meant to be public (and possibly only the specific keys which are meant to be).

Generally I think it's better to have an explicit mapping instead, whether by adding them to a custom asset (like Central Station does) or by adding them to a vanilla asset like Strings/NPCNames.

inner harbor
#

Let's say I wish to make some edits to the Data/Shops entry for JojaMart, by replacing all the JojaMart seeds with licensed Joja Seeds (TM). Is it possible to edit the individual fields instead of replicating the entire file? And if so... how please?

#

(So I want to replace "474" with "LK.JojaSeeds_Parsnip_Seeds"

uncut viper
#

you would use TargetField to target specifically the items you want to edit in the stock list

#

if you just want to change the item id that is for sale but leave everything else untouched, you can combine it with Fields too to just change the ItemId line

#
"Action": "EditData",
"Target": "Data/Shops",
"TargetField": [ "JojaMart", "Items" ],
"Fields": {
  "474": {
    "ItemId": "(O)LK.JojaSeeds_Parsnip_Seeds",
  }
}

somethin like this

#

(that example assumes the Id line of the seed in question is 474 exactly)

#

if you did want to completely overwrite everything about the specific shop entry just change Fields to Entries and do it like you'd do to add a completely new item

#

but keep the 474 key the same to overwrite it

round timber
#

"Fri4": "It's quite impressive for an ordinary farmer like you to have magical powers at your disposal, you know.#$q Vinilla.Honeyfuggle_1/Vinilla.Honeyfuggle_2 Fri4_old#Tell me, do you ever feel like they're not enough for your needs?#$r Vinilla.Honeyfuggle_1 Yes#$r Vinilla.Honeyfuggle_2 No", What's missing from this dialogue key? Comparing it to the vanilla $q stuff, there seems to be a missing number right before the response IDs, but i cannot tell what those numbers mean and the wiki doesn't explain it. For ex, the 20, 5, and -50 in this line from Abigail:
"winter_Sun": "Oh, hello.#$q 29/30 winter_Sun_old#I made these two drawings. What do you think?#$r 29 20 Sun_29#I like the jungle island and the tiger.#$r 30 5 Sun_30#I like the orc with the battleaxe.#$r 29 -50 Sun_Bad#I don't like either of them.",

#

wait is it like... effect on friendship or something? edit: i was correct

inner harbor
#

If the : "Id": "(O)472", should I still use "472" or (0)472

uncut viper
#

need to match the Id exactly, so (O)472

inner harbor
#

excellent! Easy

uncut viper
#

important to remember that the Id field is just an identifier for that shop entry, not what item id is going to be for sale

inner harbor
#

If I was thinking about it before hand I would've left the ID# in the Joja Seed name. Lol. Would've saved less back and forthing.

rough lintel
#

ok, finally have vs open again. so im trying to get the required amount of items, unsure of how to reference the blueprint id properly ;_; bc currently ... yeah i dont think this is right really. i.,.,. hhlep

private static int GetRequired(CarpenterMenu.BlueprintEntry blueprint, Item item)
{
    //BlueprintEntry blueprint = this.Blueprint;
    if (blueprint.itemsRequired.ContainsKey(item.ParentSheetIndex))
        return blueprint.itemsRequired[item.ParentSheetIndex];
    else
        return 0;
}```
brittle pasture
#

where are you getting itemsRequired from

#

also you don't want ParentSheetIndex, that's no longer the item ID

#

BuildMaterials is the field containing a list of building materials in the blueprint

rough lintel
#

oh!

#

so i want.... blueprint.buildmaterials? or something?

brittle pasture
#

yes, it is a list of BuildingMaterial objects

rough lintel
#

also itemsrequired doesnt work kekw its just how the old code did it

#

so i need to change that

brittle pasture
#

BuildingMaterial has the item id and the amount

rough lintel
#

i think i need to go back a few steps

#

because

#

i am not accessing the right blueprint thing i dont think

#

CarpenterMenu.BlueprintEntry does not sound right

brittle pasture
#
private static int GetRequired(CarpenterMenu.BlueprintEntry blueprint, Item item) {
  foreach (var buildMaterial in blueprint.BuildMaterials) {
    if (item.ItemId == buildMaterial.ItemId || item.QualifiedItemId == buildMaterial.ItemId) {
      return buildMaterial.Amount;
    }
  }
  return 0;
}
rough lintel
#

ok so that part was right. wtf πŸ˜”

#

so if i was going to check if the specific item id was wood or stone, i'd add that specific value.... in the if, im assuming

inner harbor
#

I still think JojaMart prices should be cheaper than Pierre's in vanilla. Having people legit having to make a moral decision would be grand.

brittle pasture
#

yeah, SVE is good in that regards

inner harbor
#

I suppose I could add that as a feature to this one too. Although I am aiming to make the purchase price cheaper in general

ocean sailBOT
#

πŸͺ¨ The item ID for Stone is 390.

brittle pasture
#

sorry can't help it

#

but yes, "390" (if checking ItemId) or "(O)390" (if checking QualifiedItemId)

rough lintel
#

inside of that foreach statement

#

or do i still need to check.. the buildmaterial.itemid

brittle pasture
#

so what do you want GetRequired to return?

#

(ps., it's "390", not 390. item ids are strings now)

rough lintel
#

the required amount of wood and stone needed to build

#

bc then i do math in a different field GetPrice

#

just wood and stone tho. no other mats

#

i probably need to do the if twice

brittle pasture
#

then you don't need to pass in Item at all, just compare the BuildMaterials field

#

something like this:

private static int GetRequiredWoodCount(CarpenterMenu.BlueprintEntry blueprint) {
  foreach (var buildMaterial in blueprint.BuildMaterials) {
    if (buildMaterial.ItemId == "388" || buildMaterial.ItemId == "(O)388") {
      return buildMaterial.Amount;
    }
  }
  return 0;
}
rough lintel
#

oh so i just need to do that for stone as well

#

i cant just do it all in GetRequired

#

okay. i continue my path

brittle pasture
#

well, you can have your function return a struct or a tuple

#

or use out params

rough lintel
#

uh

uncut viper
#

out params my beloved

rough lintel
#

ok how about for baby's first c# mod in 1.6, because thats what this is SDVpufferclueless

brittle pasture
#

(also minor correction to the code posted above, the return was in the wrong place)

lucid iron
#

selph the suggestion was actually like

brittle pasture
# uncut viper out params my beloved

tbh I hated out params when I first started coding in C#, it's such a weird pattern
I still don't like it, but in the absence of better options (coughRustcough) it's servicable

lucid iron
#

directly use the ingredients list CarpenterMenu

#

cus that gets set once u are actually on the building/blueprint entry

brittle pasture
#

hmm I see

#

I just saw the initial function signature and assumed that's all I get

#

wasn't around for the initial discussion lol

rough lintel
#

sowry πŸ˜”

brittle pasture
#

well at least the function only needs minimal modifications

uncut viper
rough lintel
#

which one though. th eoriginal i had or yours

brittle pasture
#

my code, instead of referencing the blueprint's buildmaterials just use the list on the carpenter menu

#

with modifications of course

patent lanceBOT
brittle pasture
uncut viper
#

cant tell if thats approval or public mockery

rough lintel
#
private static int GetRequiredWood(List<Item> ingredients)
{
    foreach (Item ingredient in ingredients)
    {
        if (ingredient.ItemId == "388" || ingredient.ItemId == "(O)388")
        {
            return ingredients.Count;
        }
    }
    return 0;
}

??

#

i mean i have no underlines but like i just never feel confident in this

brittle pasture
#

since we're directly using items now you should use ingredient.QualifiedItemId == "(O)388" as the sole condition

#

(basically use qualified IDs if possible)

rough lintel
#

gotcha

brittle pasture
#

also items count is Stack, not Count

patent lanceBOT
rough lintel
#

it doesnt like that if i do stack

uncut viper
#

(also dont return the count of the entire list)

#

you're currently getting the number of Items in the entire ingredients list

#

not the Stack of a single ingredient

brittle pasture
#

oh yeah missed that part lmao

rough lintel
#

it says List<Item> has no definition for stack- ohhhh

calm nebula
uncut viper
#

ingredient.Stack

rough lintel
#

ingredient.Stack, yeah

#

realized. thankayou

calm nebula
#

You can do the thing you insane folks what to do with tuples in c# too

#

C# has a tuple

uncut viper
#

tuples were also mentioned

#

baby's first C# mod does not qualify for tuples or out params

rough lintel
#

if i wanted to make GetRequired just one function instead ofgetting required wood and stone seperately, i'd have to use an ou-

#

oh πŸ˜”

uncut viper
#

according to this baby (very /lh)

calm nebula
#

Does baby's first c# have enums then

rough lintel
#

tf is an enum

uncut viper
#

atra can explain what an enum is

#

succinctly

calm nebula
#

A record is a class/struct but there is some sugar

#

Uh.

#

-# takes off teaching hat

brittle pasture
#

enums are fancy named numbers

#

or are those consts

rough lintel
#

oh okay

uncut viper
#

basically defining a preset list of numbers

#

and giving those numbers words to identify them by

#

technically not entirely preset but thats not babys first enum

brittle pasture
#

fancy typed named numbers, there

uncut viper
#

can you describe what a Type is to the class for us Selph

rough lintel
#

ok im gonna leave. the getrequired alone since it Works rn. i have InventoryAmount done but it might be genuinely insane

#
private static int InventoryAmount(string name)
{
    int amount = 0;
    foreach (Item item in Game1.player.Items)
        if (item != null && item.Name.Equals(name))
            amount += item.Stack;
    return amount;
}
#

although wait hold on this doesnt check how much wood or stone is there does it.

brittle pasture
#

don't compare name, they're not guaranteed to be unique (even if most of the time they are the same as the item ID and thus unique)

uncut viper
#

i would compare qualified ids

#

for all intents and purposes, the qualified item ID is the source of truth for what an item is

rough lintel
#

so inventoryamount(item item) then?

uncut viper
#

you can pass in an item, an item id, a parseditemdata, whatever as long as you can compare QualifiedItemId

rough lintel
#

okey

#
private static int InventoryAmount(string QualifiedItemId)
{
    int amount = 0;
    foreach (Item item in Game1.player.Items)
        if (item != null && item.QualifiedItemId.Equals(QualifiedItemId))
            amount += item.Stack;
    return amount;
}

thinks

#

i mean it didnt.. error out, but

uncut viper
#

seems fine to me

rough lintel
#

ok now its time to figure out the remainingWoodRequired equation

rancid musk
#

(I missed the start of all this, what are people doin' with building prices?)

rough lintel
#

bc currently its

private static int GetPrice (Blueprint blueprint, int price)
{
    int basePrice = blueprint.BuildCost;
    int remainingWoodRequired = GetRequiredWood(idk what goes here bc ingredients made it start crying) - InventoryAmount(woodObject.Name);
    remainingWoodRequired = remainingWoodRequired >= 0 ? remainingWoodRequired : 0;
    int remainingStoneRequired = GetRequiredStone(???idk what goes here) - InventoryAmount(stoneObject.Name);
    remainingStoneRequired = remainingStoneRequired >= 0 ? remainingStoneRequired : 0;
    int totalPrice = basePrice + remainingWoodRequired * woodObject.salePrice() + remainingStoneReq * stoneObject.salePrice();
    return totalPrice;
}
#

oh hewwo khloe

#

tldr i am. trying to make a thing so that you can buy missing materials from robin for a higher price (aka the cost of the building mats plus the building itself)

rancid musk
#

Ah. Yeah, it makes sense that you should be able to easily do that

rough lintel
#

baby's first c# mod in 1.6 SDVpufferclueless

#

SDVpetcatsad neither is correct..........

#

okay why cant i do foreach (item ingredient in ingredients) in GetRequired. why can't i do blueprint.ingredients. why.

#

i know we changed it but then it didn't like it in the remainingWoodRequired formula so i was like, what the flippy

fiery cobalt
#

Can someone help? I want to put a recipe in the saloon but it keep coming up as an error item

rough lintel
#

i may be wrong

lucid mulch
#

your itemid doesn't seem to start with your modid

rough lintel
#

also if i wanted to post larger blocks of c# code.... do i just post it and cry or do i do a gist or smth

lucid mulch
#

LotsOfRecipes_BaconandEggs is the key you used in Data/Objects
while your recipe wants to produce Mae.LotsOfRecipes_BaconandEggs_Recipe
and the shops trying to sell a recipe for {{ModId}}_BaconandEggs

inner harbor
#

I don't need to rewrite all my questions for 1.6.16 do I?

lucid mulch
#

Deprecated isn't removed and the code for forks/quickQuestion/etc would still be there.
its just that Vanilla isn't using it anymore

inner harbor
#

thank yoba, lol. I used a question null just yesterday. And I use quickQuestion excessively.

lucid mulch
#

if you were doing TextOperations on a vanilla event, then...

inner harbor
#

I feel like I just get a grasp then things change again.

lucid mulch
#

I'm tempted to make a mod that backports the 1.16.16 label/goto functionality

#

Though I'm skeptical doing so, as no guarentees that what is proposed will remain as-is and don't want to deal with maintaining it

rough lintel
#

this is hard :( lmao

calm nebula
lucid mulch
# rough lintel i posted my modentry.cs file on pastebin because i am just. i dont know anymore....
    private static int GetRequiredStone(List<BuildingMaterial> buildingMaterials)
    {
        var counter = 0;
        foreach (var material in buildingMaterials)
        {
            if (ItemRegistry.QualifyItemId(material.ItemId) == "(O)390")
            {
                counter += material.Amount;
            }
        }
        return counter;
    }
        private static int GetPrice(Blueprint blueprint, int price)
        {
            int remainingStoneRequired = GetRequiredStone(blueprint.BuildMaterials) - InventoryAmount(stoneObject.QualifiedItemId);
        }
rough lintel
#

THANK you

#

my issue was mixing buildingMaterials and Item item

#

which. obviously didnt work

lucid mulch
#

the vanilla code in CarpenterMenu was

    this.ingredients.Clear();
    if (blueprint.BuildMaterials != null)
    {
        foreach (BuildingMaterial material in blueprint.BuildMaterials)
        {
            this.ingredients.Add(ItemRegistry.Create(material.ItemId, material.Amount));
        }
    }
rough lintel
#

literally me rn

#

ok so. i have. this. and its here. and now i need to do the .... showing of the new price in the carpenter menu

#

i need to do a button press that does the GetPrice thing and i think... i think that will be the first testy thing

fiery cobalt
#

Well it's not an error item anymore at least

tiny zealot
# ivory plume <@1127795093198352445> Hi! I'm looking at [your open PR](https://github.com/Path...

hi! thanks for reviewing it!
if it's better for performance to just send one, i'm fine with that. the "benefit" (scare quotes doing a lot of lifting here) of keeping them all is just for whatever part of me wanted to avoid losing data, even though as you correctly point out, it would produce the same result to only send the highest-priority load.
i can put together that change and amend the PR if you like, or if you already have it under control you can go ahead.

rough lintel
lucid mulch
#

idk it was your method not mine, I only had it there to show the call of GetRequiredstone

rough lintel
#

oh okay

#

i took it out and nothing blew up so i think its ok ^_^

#

yay

#

so now i just need it to do Everything when i press a key

#

and then undo everything when i press the key again

rough lintel
#

possibly godlike that my modentry is only 99 lines of code

elfin mist
#

Has anyone ever had the issue of adding a conversation topic and it not working with a specific NPC, but working with all the others?

#

The conversation topic ID in characters/dialogue is exactly the same for all NPCs, but one of them simply doesn't speak the conversation topic text in game.

lucid iron
#

double check your spelling?

tiny zealot
#

i haven't seen that in normal play, but typos are an easy explanation

uncut viper
#

have you spoken to that NPC with that conversation topic active before and then saved?

tiny zealot
#

(i have seen it in debug-command-slice-through-the-fabric-of-the-universe play)

uncut viper
#

(when/if it was previously working)

ivory plume
elfin mist
#

I already checked to see if there were any errors. It's correct. It's exactly the same ID. No different capitalizing or missing letters.

#

And I also did not talk to the NPC with the topic active before saving. This conversation topic is added in an event that ends by starting a new day.

#

Just to make absolutely sure I hadn't made a mistake, I copied the conversation topic ID that was in the event script into the characters/dialogue of the NPC, and still nothing.

#

All other NPCs speak the conversation topic text except this one.

lucid iron
#

is this one the npc who is involved in the event

elfin mist
#

No, It's another one

lucid iron
#

weird NotteThink

#

i cant think of any more obvious reasons but you can post your jsons perhaps

#

and log

tiny zealot
#

probably worth trying patch parse {{HasFlag}} too, in your SMAPI console, to see a list of all the mail flags you have, just to make sure the one for that NPC having already triggered the CT isn't in there

calm nebula
#

Does your npc have gift tastes

#

(I swear this is a relevant question)

elfin mist
#

No. It's a non-giftable NPC

calm nebula
#

Non giftable npcs do not use conversation topics

#

It's Just the Way the Game Is

elfin mist
#

So... Its just impossible? LOL

tiny zealot
#

lmao incredible

elfin mist
#

Well, at least it was supposed to be just a silly joke with no relevance. πŸ˜…

#

I'll make another event to do this then.

uncut viper
#

(you could always use BETAS to manually give them the CT dialogue tooβ€”)

sour sleet
#

Do the schedule strings not allow the % character/token?

elfin mist
uncut viper
#

that wouldnt work like an ordinary CT

latent mauve
# sour sleet Do the schedule strings not allow the `%` character/token?

If you are attempting to use it directly inside your schedule entry as dialogue instead of referencing the dialogue line elsewhere, it may be worth noting that vanilla does the % dialogue by setting the dialogue in Strings/animationDescriptions and calls the string reference inside Data/animationDescriptions for the given schedule animation.

uncut viper
#

an ordinary CT would allow you to talk to them again mid-day after the CT starts and have the dialogue appear, even if you';ve spoken to them already

#

a minor thing ofc, but one worth mentioning

#

also a CT can only normally be seen per NPC one time

elfin mist
uncut viper
#

(you could get around that with a different HasFlag check too tho so that ones not a big deal)

sour sleet
#

All my other schedule strings are fine, just this one isn't, which starts with %

latent mauve
# sour sleet Ah okee. I'm referencing the dialogue in my i18n, and currently, my NPC is refus...

classic example:
in Data/animationDescriptions
"haley_photo": "30/30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 31 24 24 24 24 24 24 31 30 30 30 30 30 30 30 30 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 32 25 25 25 25 25 25 25 25 25 25 32 33 33 33 33 33 33 33 32 25 25 25 25 25 25 25 25 25 32 33 33 33 33 33 33/30/Strings\\animationDescriptions:haley_photo",
in Strings/animationDescriptions
"haley_photo": "%Haley's too involved with her camera to notice you.",

#

So for i18n, you'd use your i18n token in place of the strings/animationDescription text.

sour sleet
#

Ahh ok I understand now! Does my npc actually need an animation for this though?

latent mauve
#

an animation description can literally be the same frame 3 times, doesn't have to actually do anything special pose-wise

sour sleet
#

Oh perfect, thank you SDVpuffersquee

latent mauve
#

Demetrius does this: "demetrius_read": "16/16/16/Strings\\animationDescriptions:demetrius_read",

lucid iron
#

@ivory plume hi pathos how are you, I am working on PR#1110 [LookupAnything] Add internal id field, some uncertainties:

  • I would like to keep the "internal id" field name because i implemented it for many things, e.g. buildings, and this seems like the best catch all term
  • I do like the link field idea so I added that, decided on no formatting for the first field because that would have complicated translations
  • I am not a huge fan of having it be way down after all the normal fields because it significantly lowers the debugging benefit when you often cannot see this field until scrolling down. One of the motivations for having this field is to get a way to try and determine what mod an item came from when they don't conform to the {{ModId}}_blah form, hence why it was added just beneath "added by mod" originally.
ivory plume
#

Hi!

  • I'm fine with "Internal ID".
  • That looks fine to me!
  • It doesn't necessarily need to be at the bottom, but I'm not sure it's important enough to be the first field in every lookup since most players won't be interested in the ID. I can play around with the order after the PR is merged though.
lucid iron
#

ok then ill commit just the change to add linked field for flavor and the change to default enable this

lucid mulch
#

(User configurable order / ability to 'pin' fields to have higher precedence?)

lucid iron
#

doing a sortable list in gmcm is not great...

#

actually should showing flavor be tied to the internal id at all blobcatgooglyblep

#

maybe it should just always be there

#

about PR#1107 GMCM preview images i thought about it and will probably actually just make new config mod

#

something that would let cp content packs just edit a custom asset to define their menus

vernal crest
#

Could the internal ID be one of the fields that's hidden unless you turn it on in the config? Because I agree that having it at the top is most helpful for a modmaker but that players often won't need it.

lucid iron
#

it was that in the initial version of PR

wide lake
#

I also question the assertion that it's "generally useful"

lucid iron
#

the motivation was "i dont want to scroll all the way down to datamining fields..."

lucid mulch
#

btw Pathos, regarding SMAPI #980, the Raw Texture Cache in ModContentManager, what kind of safety net / cache busting would you want for it to be mergeable, as the file IO for loading some of these very small images adds up quite a lot, particularly for mods editing Cursors due to how scattered that sheet is.
SMAPI doesn't currently have any command primitives for clearing caches, relying on Content Patcher to expose it for the asset pipeline, but that wouldn't really work for mod content managers.

Another option is making the caching functionality in ModContentManager opt-in and add a ClearCache method, though there were other mods that benefited from this cache like SnS.

or moving this cache out of smapi all together, and putting it in Content Patcher, and let any other mod implement their own cache (and cache busting in development).

uncut viper
#

imo it should be always visible but the datamining fields config is what should change its placement, not whether or not its there at all

#

showdatamingfields on = internal id at the top

#

if a player is interested in the datamining fields, i think the internal id is one of the most important ones and deserves a more topward placement

ivory plume
# lucid mulch btw Pathos, regarding [SMAPI #980](<https://github.com/Pathoschild/SMAPI/pull/98...

I think my main concerns would be...

  • Cache mutability bugs. For example, a mod loads a texture and then edits it (e.g. by applying a patch or editing the pixels); if it loads the same texture later, it should get the original texture without the edits that were applied to the instance it got before. We could probably do that by returning a copy of the pixel array instead of the original; not super efficient, but still much better than disk IO.
  • Memory usage growing forever. Often mods will load a texture to use immediately (e.g. to apply a patch), then not need them anymore. If we cache every loaded mod texture for the duration of the session, that would significantly increase memory usage. We could maybe add a cache expiry or something to address that.
  • Compatibility with mod author editing workflows (e.g. patch invalidate/patch reload).
  • API backwards compatibility β€” we can't make any breaking changes to the public API until the eventual SMAPI 5.0.0, so any API change to support this would need backwards compatibility too.
umbral plume
#

I've made my own farmhouse map but there's a few errors in my log that I don't really know how to determine what's wrong; anyone smarter than me online to take a quick look and help me figure it out?

lucid iron
#

!log

ocean sailBOT
#

Important note: Your computer username may appear in the log. If your username is your full name, please be aware of this before uploading it.

Please share your SMAPI log file. To do so:

  1. Open this page: smapi.io/log.
  2. Follow the instructions at the top of the page to upload the log file. (Don't copy & paste from the console window!)
  3. After uploading, it will show a green box with a URL to share. Post that URL here.

Please do it even if you don't see any errors. This has useful info like what mods and versions you have, what the mods are doing, etc. If the issue didn’t occur in your last session, please load the game to the point where the issue occurs, then upload the log.

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

umbral plume
#

and yes I know one of them is outdated

#

its the summer fun from WS78 and it doesn't wanna update

#

it says something like Content Patcher can't parse the action in the json or something

#

do you need a screenshot of the json?

brittle pasture
#

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

brittle pasture
#

dont post screenshot, post the code itself

umbral plume
#

ah neat

#

didnt know it did that

round timber
#

youre missing all your opening brackets for your actions

#

it needs to look like:
},
{

umbral plume
#

is...is it really that simple

#

i thought itd be a bigger issue lol thank you

lucid iron
#

now u can find out if your tmx is correct Dokkan

#

but yes highly recommended to use a text editor with json support

umbral plume
#

im using notepad++

#

and honestly I only started learning coding 24 hrs ago so I'm very shocked I didn't crash immediately

lucid iron
#

for notepad++ you need to enable the json plugin

umbral plume
#

already got it ❀️

#

thanks lovies

#

well

#

no more errors but