#making-mods-general

1 messages · Page 440 of 1

wheat sundial
#

i have zero fucking idea how it works

#

the article hasnt really helped

#

all i know is it puts shit in the game

#

but like how do i make it do rhat

faint ingot
#

Hello everyone - I am working on a performance patch for my mod and trying to get rid of OnTimeChange stuff as much as possible. There are some NPC outfit changes handled this way, but switching to the appearance system doesn't seem to be working correctly. I have this entry in the appearance list: { "Id": "ProstheticBeach", "Portrait":"Portraits/{{Russell}}_ProstheticBeach", "Sprite":"Characters/{{Russell}}_ProstheticBeach", "Condition": "TIME 1810 1850, LOCATION_NAME Here sdvhead.LawAndOrderSV_AboveJail, DAY_OF_WEEK Monday Tuesday Wednesday Thursday Saturday Sunday,PLAYER_HAS_SEEN_EVENT Any 239791004", "Precedence":6, },

#

and when I send the condition as a debug command to test the conditions they all resolve true, but the outfit change doesn't happen. Anyone thoughts as to why?

uncut viper
brittle pasture
#

try switching LOCATION_NAME Here to LOCATION_NAME Target

#

Here = check the farmer's location, meaning if the farmer wasn't at the beach when Russell enters the beach he won't switch into the beach outfit

faint ingot
ornate locust
uncut viper
#

no. they only change appearance when they change locations

ornate locust
#

if it's not C# anyway

uncut viper
#

(the Here/Target thing is also important ofc)

faint ingot
#

OK thank you, in that case I will probably have to keep the time change approach but I will have a mod option to get rid of it and just not have the outfit change

wheat sundial
#

do i use notepad and put it in the same file?

#

where does content patcher even go?

latent mauve
#

okay, so a quick explanation of how Content Patcher mods work:

  • your manifest.json tells SMAPI that your mod uses Content Patcher as a framework (which means you can use JSON to write your content changes in content.json)
  • in your content.json, you set the Format to the version number of Content Patcher you want the user to run while using your mod (usually the latest version)
  • After that, while still in content.json, you list the Changes you want your mod to make, which is in the form of JSON objects ({ } blocks) with Actions and Targets in them that tells the mod what data assets or art assets to change, and either entries/fields or FromFile field that tells which asset to use in your mod folder. For more details, you can check out the Getting Started with Content Patcher page.
uncut viper
#

when you say article, are you referring to a wiki page, or the Content Patcher documentation that the wiki page links you to?

latent mauve
#

Content Patcher is a mod that goes in your Mods folder.

wheat sundial
#

mb

#

bad wording

uncut viper
#

have you read the CP documentation itself?

wheat sundial
#

i put it there out of intuition but

latent mauve
#

!gs

ocean sailBOT
latent mauve
wheat sundial
#

oh ok

#

i haven't read that

latent mauve
#

Sorry, I had to go digging for the link.

wheat sundial
#

ok what does it mean by "content packs"

latent mauve
#

A content pack is a mod made to use another mod (in this case, Content Patcher!) as a framework.

wheat sundial
#

ah ok

#

so my NPC mod is a mod

#

not a content pack

#

so I can make all of the sprites and everything

#

ok let me give context

latent mauve
#

A "CP Mod" or "a mod that relies on CP to run" is the same thing as a Content Pack in this case.

wheat sundial
#

I'm using MissCoriel's NPC Creator for this

uncut viper
#

that is outdated

latent mauve
#

I don't think she updated it yet.

#

!npc

ocean sailBOT
#
Creating a Custom NPC

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

wheat sundial
#

everything else works fine for 1.6

uncut viper
#

either way, your mod is a content pack

latent mauve
#

MissCoriel's will still spit out the content for use in a CP mod / content pack, IIRC.

wheat sundial
#

ok

#

i make mod

#

dialogue

#

sprites

#

data

#

everything correct

#

the way I would add it is by using content patcher?

#

or do i just drop it in the SMAPI mods folder

latent mauve
#

You install Content Patcher in your Mods folder, and then you create your own folder in the Mods folder for your NPC mod. The manifest.json in YOUR mod will tell it to use Content Patcher, so you don't need to touch the Content Patcher folder at all once you move it to the Mods folder.

wheat sundial
#

ok

#

so i have Content patcher in the mods folder alr

#

so i would literally just need to drop the complete mod in

#

and we good?

latent mauve
#

Assuming your complete mod is in a folder and contains both a manifest.json and content.json file with your code, you should be good.

wheat sundial
#

Nice

#

I just wanted to plan ahead

#

rn I'm looking at all of her dialogue/events and seeing what sprites i need

#

once I've done that I'm moving onto mapping her house and an area behind the backwoods for it (yes i know she cant go in the backwoods she will use instant transmission)

#

and then I will make her schedule

latent mauve
#

Also don't be afraid to look at pre-existing NPC mods if you want to see how they work. Quite a lot of them are for Content Patcher or use Content Patcher to add/edit the art and data (dialogue, schedule, Data/Characters entry) assets.

wheat sundial
#

thanks guys

wheat sundial
#

i think

latent mauve
#

If you try to run your mod and you get errors in the SMAPI console window or your NPC decides to not talk or something, feel free to ask for help to figure out if you missed something!

wheat sundial
#

ok thanks!

true coyote
#

what sheet are the numbers used for your gold amount located?

round timber
#

probably cursors

true coyote
#

hmm, not seeing it

round timber
#

isnt it these?

true coyote
#

there are some white ones that look similar, but the oneson my recolro are red and ive eliminated it from all traces of the tilesheet

#

yet it still shows

#

what backwater mod that has no relevance to cursors is editing cursors

round timber
#

i think the red tint is added in code somehow

true coyote
#

cursed

round timber
#

as in base game code

true coyote
#

yeah

#

the uh, ui here that im trying to switch to seems to be done sloppy in some areas. things not patching like they should and still showing the old stuff underneath

wheat sundial
#

oh and also

#

how can i check event IDs?

round timber
#

vanilla events or modded events?

wheat sundial
#

vanilla

#

I want my NPC's 4 heart event to require 2 hearts with haley

#

and i cant see a "has hearts with this NPC" on there

round timber
#

on... where?

wheat sundial
#

misscoriel's NPC creator

#

all conditions

#

and I need an ID for it before i pick any

round timber
#

its called “friendship points” not hearts

wheat sundial
#

oh

#

ohhhh

#

yeah mb

#

lemme see if it works for other NPCs

#

i was planning on requiring the farmer to see haley's 2 heart event

#

oh yup it works

round timber
#

anyway if you need vanilla event ids go to the Data/Events folder, then find the file for the location the event takes place in. then look through the list of events til you find the one you need

latent mauve
#

!unpack Because you probably haven't done this yet

ocean sailBOT
#

Follow this guide to unpack the game's content files in order to see and explore how the game data is structured.
It's helpful when making your own mods, or just to learn about how the game works!

wheat sundial
latent mauve
#

Nice!

#

Always happy to be proven wrong on that one

wheat sundial
#

Misscoriel is very helpful

#

yippe

wheat sundial
#

like 1225 or smth

round timber
#

no

round timber
#

make it a string that has your mod id at the front

latent mauve
#

Your event should use a string key instead of an integer, for best practices, AND use your Mod ID at the start of it.

round timber
#

(number ids are bad because it is very bad for compatibility with other mods)

latent mauve
#

the integer keys (numbers) are the old format, and run the risk of being overwritten or overwriting other mod's events

wheat sundial
#

how do i check mod ids?

round timber
#

if youre making the event you choose the mod id yourself

#

its in the manifest

wheat sundial
#

so if my mod and your mod both use 1225 as an id

#

only one will appear

round timber
#

yes

wheat sundial
#

ahhh ok

latent mauve
#

The UniqueID you set in the manifest.json is the ModId.

#

Content Patcher has some special tokens (the things in the {{ }} brackets), like {{ModId}} that will autofill your mod's unique ID from the manifest file where tokens are allowed.

wheat sundial
#

so mod id here is yhwife

round timber
#

yh.wife

wheat sundial
#

got it

#

so i would put 1225yh.wife

#

or 1225yhwife

round timber
#

you dont need the number at all

wheat sundial
#

im making heart events though

#

wouldnt it need to be unique

#

or like yhwife1

#

yhwife2

#

etc

latent mauve
#

you could actually just do something like yh.wife.2Hearts

#

since string keys (text) are allowed

wheat sundial
#

ah ok

round timber
#

yeah ideally the name is somewhat descriptive

uncut viper
#

unless the NPC creator d oes not allow strings

wheat sundial
#

hold on

uncut viper
#

which it may not if the only thing that has changed in the beta is the disposition

wheat sundial
#

it says "numeric id (main event)"

#

and if i do a named id it wont allow me to add conditions

uncut viper
#

this is one of the major ways it is outdated

latent mauve
#

This might come down to MissCoriel's NPC Creator not being updated enough yet.

wheat sundial
#

should i use someone elses?

uncut viper
#

there is no other creator

wheat sundial
#

since the only work i have is sprites and like three lines of dialogue

#

!npc

ocean sailBOT
#
Creating a Custom NPC

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

uncut viper
#

the recommended approach is to use the guide fireredlily linked you to earlier to create your own

wheat sundial
#

i meant tiakall

uncut viper
#

the guide in that command yes

latent mauve
#

You just may benefit from using the guide to make the events separately.

round timber
#

its a guide but not a creator

wheat sundial
#

oh wait GUIDE

#

ive been reading so much today cut me some slack guys 😭

latent mauve
#

You don't have to do everything through the creator or through the guide. 😛

wheat sundial
#

i have zero coding experience in C#

#

so thats kinda out the window

latent mauve
#

CP mods are JSON

round timber
#

you dont need C# to make events or an NPC

uncut viper
#

nothing involved here is C#

wheat sundial
#

well idk any JSON either

#

I know VERY basic python and like thats it 😭

round timber
#

JSON is very easy to pick up honestly

#

easier than python probably

wheat sundial
#

am coding noob

lucid mulch
#

one day I'll progress on my debugger mod to the point it can make developing content patcher content packs more user friendly, but my tools would only properly work when given already valid json

uncut viper
#

if you know Python, you can learn json

latent mauve
#

Most of the pages on the modding namespace on the official wiki have content patcher code snippets using JSON that can help you out.

wheat sundial
#

i'll learn json then

round timber
#

(i am not a coder at all and have made a dozen mods with JSON)

latent mauve
uncut viper
#

json is just a data format. its not even a programming language

lucid mulch
#

Python dictionaries/arrays are almost 1:1 json, except lowercase true/false instead

wheat sundial
#

so its just
if friendship = 500 AND time >= 1800 AND time <= 2000...

#

made the variables up

urban patrol
#

no, look at how to format event preconditions in the page you were just linked

wheat sundial
#

ok

#

v2:

#

yh.wife_yh.wife.2hearts/Time 1800 2000/Friendship Wife 500

#

im using wife here bc i dont wanna leak her name

latent mauve
#

example code:

"Target":"Data/Events/Forest", //this tells it to add the entries to the forest events
"Entries": {
"yh.wife.2Hearts/preconditions go here": "your event script commands go here separate"
}
}```
wheat sundial
#

ok v3

wheat sundial
#

for example

#

im just adding the number for fun

latent mauve
#

{{ModId}} will fill in yh.wife when the mod runs, so you can use yh.wife OR {{ModId}} there.

#

{{yh.wife}} does nothing, because it's not a token.

wheat sundial
#

i see

latent mauve
#

your event key (the first part) is still a bit of a mess, but the preconditions look good.

wheat sundial
#

ok

#

thanks

#

changed the event id

wheat sundial
#

yeah that does not look that much different

uncut viper
#

the precondition format is irrelevant to the language

#

its just a string

wheat sundial
#

and I'm assuming this all goes in notepad?

latent mauve
#

in your content.json, using whichever editor you are using.

brittle pasture
wheat sundial
#

line doesnt matter i assume as long as its seperate

latent mauve
#

I use Visual Studio Code, but my first three mods were all done in basic Notepad. xD

#

If you have multiple code blocks, you will need commas after the closing } for each

wheat sundial
#

ok so

wheat sundial
#

screw the npc creator

#

i use json myself :D

brittle pasture
#

animal harvesting crops

golden basin
#

Oooh I was curious about glowing crops

#

I think cyro was interested in harvesting from animals

latent mauve
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
#

oh that's a different thing from the mod I'm (not) working on

#

but yeah animals can pick crops now in next version of EAC

wheat sundial
#

so its json time!

#

i only made portraits anyway so

#

and also the miss coriel thing made a really yummy format for my files

brittle pasture
#

probably could have done a better demonstration video that doesn't involve me running away from the void chicken so it harvests crops instead of attacking me

golden basin
brittle pasture
#

side note, but next version will allow MEEP animals to hit you as well

#

(the cause was that I had a check that prevented homeless animals from attacking)

latent mauve
#

stop making features that I can easily integrate in my Zelda mod or I'll never finish

wheat sundial
#

here is what my assets folder looks like right now

#

every folder is empty

#

except for img which has some templates

#

theres also contetn and manifest.json outside the assests folder

latent mauve
#

I love you Selph, if I end up making an aggressive variant of Cucco I will let you know. xD

wheat sundial
#

lmfao

wheat sundial
#

or several

#

dialogue.json for example

latent mauve
#

Nope, you actually don't have to split up your JSON files at all, they can go into content.json

wheat sundial
#

so i dont need any of this

latent mauve
#

People just like to split them up if they get big to make it easier to find the specific code they want to change.

ornate locust
#

Need, no, but sorting is useful

round timber
#

you can organize it however u wanna

wheat sundial
#

ok so its fine to have like this

round timber
#

yes

ornate locust
#

Just make sure you include any separate JSONs you use

latent mauve
#

It's personal preference on whether or not you have separate JSON files, just make sure that only the content.json file has the "Format" line and that the others are set up as Include files.

wheat sundial
#

ok

#

so for example

#

hang on got a ping mb

#

let me

latent mauve
#

And never do an "Action":"Load" with a JSON file with tokens in it (like {{ModId}}) as your FromFile, or the tokens will not work.

tiny zealot
wheat sundial
#

ok wait so for example

latent mauve
#

There's one other json file that you'll probably want to include, it's called a blank JSON

wheat sundial
#

anim.json (include)
dialogue.json (include)
delete this folder
events.json (include)
festivals.json (include)
all of my sprites and art for mod
schedules.json (include)

outside of assets:

content.json (format)
manifest.json (format)

latent mauve
#

A blank JSON is a json file (usually named blank.json) that just has { } in it and nothing else. We use them a lot to 'create' the base JSON file for things like schedule or dialogues, so you can use EditData actions on the same Target later to use tokens.

wheat sundial
#

i see

#

so i can just duplicate mr blank

latent mauve
#

You only need one blank.json, and you can just Load it to multiple Targets with one bit of code.

wheat sundial
#

i see

latent mauve
#

I think there's a tab in my google sheet NPC creator that explains them.

#

I vaguely remember adding that.

wheat sundial
#

I am learning a lot at 2am

latent mauve
wheat sundial
#

saved lmao

#

thanks

#

so when i duplicate it

#

contentpatcher goes "hey this files cool give it tokens"

#

i think

latent mauve
#

not sure what you mean by "duplicate" ?

#

but this is why my Google sheet thing calls for blank.json:

wheat sundial
#

im assuming its used as a base

#

so you duplicate it

#

and work on the dupe

latent mauve
#

nah, if anything, content.json is your base and you just remove the "Format" part on everything else.

wheat sundial
#

oh ok

latent mauve
#

that link I sent earlier should have had an example Content Pack content.json format in it?

golden basin
wheat sundial
#

so content.json will look like this

wheat sundial
latent mauve
#

LOL ok

#

(also feel free to throw your code into that JSON validator and send the link in the green box!)

#

we can read it that way

#

!json this one

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.

wheat sundial
#

include dialogue.json
include anim.json
include this.json
include that.json

#

...so do i look at the thingy

latent mauve
wheat sundial
#

yep lmfao

latent mauve
#

there's the example I was looking for.

wheat sundial
#

i see

verbal narwhal
#

oh no

#

windows 11 is unavoidable at this point, right? q.q

golden basin
wheat sundial
#
    "Format": "2.8.0",
    "Changes": [
        {
            "Action": "Load",
            "Target": "wife/img",
            "FromFile": "img/spritesV3.png"
        }, 
        {
            "Action": "Load",
            "Target": "assets/dialogue",
            "FromFile": "dialogue.json"
        },
    ]
}```
#

this is what it would look like

lucid mulch
#

personally if I was going to do a content mod via cp, I would start with just manifest.json, content.json and blank.json with maybe an assets folder and thats it.
I wouldnt go further until it actually organically grew large enough to need to be split

wheat sundial
#

i am an organization freak

lucid mulch
#

all of SVE until relatively recently was a monolithic content.json

#

I personally find that keeping all the various edits separated from each other to actively inhibit understanding

brittle pasture
lucid mulch
#

if I was going to split things up, it would be entirely on semantic units, not on what asset was being edited

wheat sundial
#

i both see and not see

lucid mulch
#

so a "Abigail" file rather than it being scattered across a Characters file ,Dialogue file,Events file, etc

latent mauve
#

Yeah, I'm gonna end up reorganizing my JSON files for the Zelda mod because it's gotten huge and touches a lot of data assets, but most of the separation is based on config options.

tiny zealot
#

i like to group things that are gated by the same content patcher When condition(s) into a file, so i don't have to repeat the conditions

tender bloom
wheat sundial
#

me when funny words

latent mauve
#

Except I will have to split up the event changes so I can mass invalidate them all if/when we get an event refactor xD

tender bloom
#

I split up by topic, not asset tho

#

Like “all objects”, “all recipes”, etc

tiny zealot
#

+1 for splitting by topic and not asset

golden basin
#

i gosh i know the feeling of having huge mods

lucid mulch
#

even that, I would keep the object and its recipe together, the recipe is part of the object

golden basin
#

my animal mod is 23,000 something characters at this point

tender bloom
#

Might do some when conditions later I’ve been too lazy to implement

golden basin
#

the default json i mean

tender bloom
#

There’s so many objects tho, that file is so long

wheat sundial
#

ok i looked at my content/json

#

its basically "load this load that"

latent mauve
#

I have one JSON that is adding objects, where those objects are sold, and the gift taste reactions to those objects.

#

all together.

tender bloom
#

Idk the way I split makes sense to me but i definitely don’t think it’s the one true way

#

Gift tastes are probably going somewhere else because I have to edit by person

#

Which is super effin’ annoying

latent mauve
#

I desperately need food, I just looked at the clock and I meant to get dinner 2 hours ago. Will bbl.

wheat sundial
#
    {
      "LogName": "Dialogue",
      "Action": "Load",
      "Target": "Characters/Dialogue/Wife",
      "FromFile": "assets/dialogue/Dialogue.json"
    },
#

example

tiny zealot
#

i'm also fond of saying that your organization (or comments, or other meta stuff about your mod) is for three people, in this order:

  1. you now
  2. you in the future
  3. others
    so do what works for you and don't follow advice that doesn't work for you
tender bloom
wheat sundial
#

oh

wheat sundial
#

i dont want other people to have my wife in their game -_-

golden basin
#

I need to write more event for my wayfarer mod but im sjghsdjgdfsgdf yall ever just get really bad writers block but have lots of ideas?

tender bloom
golden basin
#

like ideas are there but writing is not

tiny zealot
wheat sundial
#

oh

#

the only other person that will download this is my friend MAYBE for multiplayer

verbal narwhal
wheat sundial
#

and they go for krobus anyway

tiny zealot
#

(if you have it installed and you want to do multiplayer, they will need it)

wheat sundial
#

yeah

#

thats why

#

once i mod my wife in i was thinking of making a fun gang mod

#

kris sussy ralsi

#

its 3am...

#

i think i should try to sleep

#

gn chat

verbal narwhal
#

can someone help me think?
my frog tank technically doesnt count as the pet itself as this one gets spawned somewhere out of bounds in the limbus, but it registers the interaction as waspet and petbowlwatered
now if I want to make it be able to receive a gift (bug meat and beans) would it be the easier way for me to make it act like A) an npc B) a machine? C) a horse (carrot/apple)

lucid mulch
#

I do want to look into finding ways to doing 'inline' includes for CP, or let tokens be capable of storing more than effectively text and spread into the entry

tiny zealot
#

ugh now junimo text comes out to bite me. why must font_bold and its handling be so cursed

gentle rose
sullen rain
#

Hey guys, why would my Monday dialogue be taking precedence over my intro dialogue?

lucid mulch
# tender bloom There’s so many objects tho, that file is so long

Local tokens can help
This is a reference example of a before https://smapi.io/json/content-patcher/9bbec3b7d65d45268d498121ed1f0d10

and after https://smapi.io/json/content-patcher/a2d019fec3c84978b3b4f623dc98f338 which shrinks it by 33%
along with the template https://smapi.io/json/content-patcher/0690d5fa08ef40ef93a4b338153f0815

though does print a bunch of annoying errors for the cases where the optional tokens aren't provided, and CP doesn't have a mechanism to let a when block guard for an inherited token existing it like it can with hasmod

I think if they were explicitly populated with some known invalid value, a when could have guarded for it in a when block, but ah well

brittle pasture
#

are you testing on an existing save

sullen rain
#

No

#

Brand new

tiny zealot
#

does your NPC have gift tastes set up?

sullen rain
#

Not yet

tiny zealot
#

i think if they're missing, your NPC can't respond to CTs

sullen rain
#

Does that make a difference?

#

Ohh okay

tiny zealot
#

one of the strange quirks of NPC interaction, if memory serves

sullen rain
#

Okay I'll try that, I had to write it anyway. Thanks ichor

tiny zealot
#

i hope that's what it is, lol

tender bloom
#

I also used regex in Sublime to make the i18n portion less painful

#

I just copy/pasted my LocalizedText stuff to get all the keys

lucid mulch
#

"HasToken" PR is added to my todo list, because making local tokens and templating more powerful I think is important.

#

I also am not a big fan of copy paste as a method of reusability

tender bloom
#

yeah it's very much "what's done is done" in this case and not really "ah yes i loved that and 10/10 would recommend"

#

I missed a few first go-around and had to check with CJB items

#

either misspellings, my own inconsistencies, or copy/paste errors

lucid mulch
#

The main problem holding back local tokens, is relatively few mods use it, and people learn to make new mods by referencing the old mods that didn't use it. and by the time they might hear about local tokens, they either dismiss it as "too late" or kneejerk it as "something to learn too hard nope"

tender bloom
#

yeah, i can def see that

sullen rain
#

Hey ichor it worked! Thanks!

tender bloom
#

for me it was more of "eh, i could def learn it, but...lazy"

#

and i am fully cribbing off my own old notes

#

aka my previous mods

lucid mulch
#

same thing with "dispositions" still being the defacto name for a folder for npcs despite the term being dead since 1.6 came out

tender bloom
#

haha

#

old habits die hard

#

sometimes very hard

#

see: still having new xnb mods

verbal narwhal
#

can I add portrait commands directly to i18n/default.json?
like "msg": "croak$2"?

vernal crest
#

Yup

verbal narwhal
#

yipeppee

vernal crest
#

Where possible it's best to avoid using dialogue commands inside the i18n in case your translators translate it, but portrait commands are definitely ok and sometimes even with other commands the risk of accidental translation is still better than the alternative (like splitting up your text into many tiny i18n lines, which is both annoying and might interfere with other languages' grammar)

verbal narwhal
#

thanks! currently they are very simple, but now I can add a winking frog or frog with tophat to the portraits!!

calm nebula
#

What is this maestro and do i have to use it

verbal narwhal
#

sorry for my random monologues here, but I am so hecking excited that I got to give the the frog a gift taste!!!
he likes cookies!

drowsy pewter
#

@brave fable Would it be cool if I add some additional alt recipes for LoC seasonings using cornucopia ingredients? from what i see, looks like you intend for simple seasoning to be available early on, while super seasoning is available after reaching GI

lucid mulch
placid moon
#

I completely forgot where it is we are supposed to share our mods when we release new ones, because it has been about a year since my last one. Could someone point me in the right direction?

drowsy pewter
#

time to learn event modding for the first time SDVpufferchickegg

urban patrol
placid moon
#

Thank you!

#

I've returned from a break to start creating again, in my slow way. I've published my Silo version just last night for anyone that likes Japanese architecture.
https://www.nexusmods.com/stardewvalley/mods/27097

Nexus Mods :: Stardew Valley

A content patcher mod to change the farm silo's exterior design to the 'Hoshi no Tsuyu no Tani' theme.

urban patrol
#

(would you like me to showcase it?)

placid moon
#

Please and thank you ^-^

drowsy pewter
tender bloom
#

Unfortunately since events suck no :(((

drowsy pewter
#

Yeah they do suck

tender bloom
#

I did actually think about it if it makes you feel better, except if it was like one event I’d just do it for you

woeful lintel
tender bloom
#

I wrote a python script once to help me event

brave fable
drowsy pewter
tender bloom
#

Because I just CANNOT with the slash delimited

#

I wanted line breaks without my jsons screaming

#

And no accidental extra spaces

tender bloom
#

You can have the python script if you want though it literally just does the final smush after everything is written out on different lines

urban patrol
#

i don't mind events except for when i do something stupid and can't figure it out

tender bloom
#

Actually i think it’s in fireworks festival

#

Free for anyone to look at

#

If it’s not and anyone wants it, ping me and I’ll hit GitHub with a stick for a sec

drowsy pewter
drowsy pewter
#

And I'm already going insane being the only person working on it

tender bloom
#

Eminently reasonable

drowsy pewter
#

I need it out

tender bloom
#

I am on the “no release” release schedule

#

But I do understand the lure of the “sometime soon please let it end” release schedule

drowsy pewter
#

see the mod has been "coming soon" for a year and a half

tender bloom
#

I think I once released a pride mod a full year of June after I started it

#

My current mod has been in development since I think like 2021 but it’s never made it to “coming soon”

golden basin
#

hey everyone ❤️

brave fable
tender bloom
#

Parsley, sage, rosemary, and thyme? 😛

drowsy pewter
#

but its a good point

brave fable
#

is ginger really that hard to come by SDVpufferthinkblob i didn't think it was so scarce and it's not got many uses, i suppose the luck drink buff makes it fairly high value

#

hmmb

drowsy pewter
#

I think its easy, but I was seeing it as more of a "quite late game item" rather than "abundant and cheap forage"

#

so it was a matter of perspective

brave fable
#

teebs the achievement unlock condition is probably even further lategame than either garlic or ginger

drowsy pewter
#

for making qi seasoning I'm not sure if anything would be appropriate, but I think being able to craft it would be more fun than just buying it, right?

#

Ahhh okay

#

thats good to know

brave fable
#

since simple seasoning is cook 10 recipes and super seasoning is cook 25 recipes

#

that's a lotta recipes

#

but that's just how the base game goes, and at least with enough fluff recipes it's easier to come by

drowsy pewter
#

yeah with cornucopia recipes it would likely come sooner

brave fable
#

most of my low-level cooking recipes are fairly accessible, 2 ingredients each that're pretty easy to come by, but i feel like most modded recipes i see have so many ingredients lol

tiny zealot
#

they're all trying to avoid the chocolate cake / eggplant parmesan problem

brave fable
#

i choose to call it the chocolate cake convenience

#

recipes can be whatever you want, players don't care that it's vaguely inaccurate, it's a video game cake. what's irritating is having to find 5 ingredients per food when you've only got maybe 32 slots in your fridge

#

pasta doesn't exist. chocolate is fake. follow your heart

drowsy pewter
tender bloom
#

SDVpufferlurk I made an 8 ingredient recipe recently and I admit it could be a crime

#

I try to stick to 3 or less but sometimes my heart tells me more

tender bloom
#

Loooook 8 is a significant number is my defense

brave fable
#

fortunately 6 of them are butter

tender bloom
#

It’s Buddha’s delight so it’s all vegetables lol

#

I could do “I can’t believe it’s not butter, mostly because it’s alllll butter”

#

I have a butter to contribute to the cause

#

Maybe I’ll remove some ingredients next pass through the list

brave fable
#

if the love of cooking wasn't popular i would've added another butter and maybe le fishe au chocolat

tender bloom
#

Apparently the real dish uses between 10 and 35 ingredients

#

Is le fishe au chocolat actually fish and chocolate?

#

You could make a standalone mod and call it “LoC DLC pack”

brave fable
#

nexus moderators squinting

tender bloom
#

“LoC odds and ends”

#

“Blueberry’s favorite recipes”

#

“This didn’t fit into LoC but you can have it anyways”

#

Do titles have character limits?

verbal narwhal
#

how can I use a custom mod provided cp token (that is either false or true) as a condition/gsq check? "Condition": "{{HasMod |contains=camiska.FrogTankFrogEgg/HasNamedFrogTankForCurrentPlayer}, PLAYER_HEARTS Current Sebastian 2}"?

#

would that be correct?

woeful lintel
#

well first, you did weird stuff with the curly braces in here

#

like, that's not valid token syntax

verbal narwhal
#

ah I tried to mimic this

woeful lintel
#

well, don't split the closing brackets then

#

I don't know much about GSQ, but maybe "{{token stuff}}, gsq stuff" could work

verbal narwhal
#

thanks, I will try this!

#

I am also unsure about the HasMod and if that is the correct argument for the check

woeful lintel
#

hold on, is this in the camiska.FrogTankFrogEgg mod? You need a special mod to access another mod's tokens

#

that's for sure

verbal narwhal
#

even if it provides the cp token publicly and it is listed as a dependency?

woeful lintel
#

pretty sure, yeah. Do you need to make these two separate mods?

verbal narwhal
#

so far doing it like this in my cp part of my mod

      "LogName": "Include objects - tadpole doesn't count towards completion'",
      "Action": "Include",
      "FromFile": "data/objects.json",
      "When": {
        "HasMod |contains=camiska.FrogTankFrogEgg": true,
        "camiska.FrogTankFrogEgg/CfgTadpoleCountsForFishing": "false"
      }```
has worked fine, but I am sadly still so confused about conditions/gsq syntax in CP
verbal narwhal
#

mhm, I mean I could also either send the mail directly via my smapi mod and skip the cp part but I would need to read into how to do that

or I could try making a custom query in my smapi mod and check for this in my cp part of the mod, but I did only find very little info on how to actually do that

woeful lintel
#

hmmmm, so your tokens are defined in a C# mod, is this correct?

verbal narwhal
#

yes!

woeful lintel
#

and you want to do some simpler stuff based on them from CP?

verbal narwhal
#

exactly!

woeful lintel
#

I never registered CP tokens with C#, but I feel like there's a way to make them accessible by any mod then. Just don't know how it works, or if this is what you already did

#

if you did/do that, anything CP when and gsq you shared should work

brave fable
verbal narwhal
#

using it with when and adding the "HasMod |contains=camiska.FrogTankFrogEgg": true, before checking for the token has worked so far

#

ohh blueberry, can you tell if this is a valid condition? "Condition": "{{HasMod |contains=camiska.FrogTankFrogEgg/HasNamedFrogTankForCurrentPlayer}}, PLAYER_HEARTS Current Sebastian 2", ? or do i need to do something with hasvalueat?

woeful lintel
#

I think there's a cp token condition to have it work, something like "{{And {{HasMod...}},{{custom token}} }}, gsq stuff" could work

#

cuz that "HasMod |contains=token" doesn't seem rigth to me

brave fable
#

yeah that isn't valid

#

it's best you check out the examples given in the link above

woeful lintel
#

oh yeah, there's an example for this exact case

verbal narwhal
#

I looked at that,but this has some kind of additional argument which confused me

#

do I need to explicitly state the value of that token is true?

woeful lintel
#

do that:

         "Entries": {
            "Universal_Love": "74 446 797 373 {{spacechase0.jsonAssets/ObjectId:item name}}",
         },
         "When": {
            "HasMod": "spacechase0.jsonAssets"
         }
#

but with your mod id, token, and specific data edit obv

brave fable
#

your token will resolve to either true or false, and and the Condition field will read that the overall logical resolution is true or false also

#

can't do words today. tired

verbal narwhal
#

but I need it for the trigger action which is a condition and doesnt accept a when

brave fable
#

while Condition is generally a gamestatequery field, true and false are valid queries, and your token will resolve to those

#

obviously affecting the logical resolution/condition value

verbal narwhal
#

"Condition": "{{camiska.FrogTankFrogEgg/HasNamedFrogTankForCurrentPlayer}}, PLAYER_HEARTS Current Sebastian 2",

I will try this and report

#

thank you so much with your patience with me!

brave fable
#

patience implies i am currently capable of impatience. i am not

woeful lintel
#
         "Entries/Fields": {
            // otherstuff I assume
            "Condition": "{{camiska.FrogTankFrogEgg/HasNamedFrogTankForCurrentPlayer}}, PLAYER_HEARTS Current Sebastian 2",
         },
         "When": {
            "HasMod": "camiska.FrogTankFrogEgg"
         }

this should work

brave fable
#

it won't SDVdemetriums

woeful lintel
#

oh

#

oh my bad, didn't change the modID

brave fable
#

still won't SDVdemetriums

woeful lintel
#

damn

brave fable
#

ah you wrote entries/fields yourself, not copied from the example

woeful lintel
#

yup, since I don't know which one camiska is using

verbal narwhal
uncut viper
#

keep in mind the speed at which tokens update, though

#

if the value of that token on the C# side switches from false to true during the day, it wont be ready when the day ends unless you change the update rate

#

(also you said your mod has a dependency on the C# mod providing the token right? you dont need the When condition)

verbal narwhal
#

yippee!! thanks

uncut viper
# woeful lintel I never registered CP tokens with C#, but I feel like there's a way to make them...

custom Content Patcher tokens are automatically and always accessible by any mod, so long as Content Patcher can guarantee that the CP mod in question wont try to access that token when that mod does not exist. hence, if you are dependent on the C# mod in your manifest, you can use the tokens anywhere in your mod. if you gate it behind a HasMod condition, you can use it in that patch. both of these guarantee that the token will only be checked when the C# mod that added it exists.
what you were thinking of is Cross-Mod Compatibility Tokens, which lets CP mods look at another CP mod's dynamic tokens

#

(as well as config tokens... kind of. practically speaking)

woeful lintel
#

yeah, I got that by skimming the doc linked before

#

I assumed it was a soft dependency at first since they used HasMod, but yeah, it makes more sense that it's an actual requirement

lucid mulch
#

There's special code in content patcher to ensure hasmod conditions always run first.

And using that, it also tracks what modids they check and if other parts of the patch use tokens from the mod, and the mods not loaded it'll just pretend the tokens do exist as it won't matter they will never be evaluated

verbal narwhal
#

I made some cp tokens that get updated when the configs of my smapi mod changes, some kind of budget cmct!

#

but thank you all for your help

#

tomorrow I will spend some time with creative writing and then I can ship out a huge mod update! camiska_yay with frogs as pets and renaming each tank and frogs that like bug meat and soup and cake

urban patrol
#

i don't recall--does changeMapTile (event command) permanently alter the map? or just for the length of the event

#

i can test it but i wanted to see if anyone knew off the top of their head

lucid mulch
#

taking a brief glance, I'm leaning on persisted until smapi changes the map again (unless its town without speedy solutions)

#

though if the event is running in a temporary location then it shouldn't propagate to the real version of the location

urban patrol
#

ok, i'll just have to change them back at the end then. thanks!

vocal osprey
#

Hey all, just wanted to give updates on the RTL mod I'm working on and a question I'd like to hear y'all answers to.

Now text reads right to left as it's supposed to in Arabic (and other RTL languages) and with proper shaping but the only thing left is offsetting x position of the text to the rightmost side of its container which is simple to do and I'm very excited to publish it as 0.1 soon.

My question is what are the chances of ConcernedApe supporting Arabic officially considering that I'm working with talented localization team and their work is well received in MENA region?

#

I remember seeing Thai mod before and now looks like Thai is officially supported but I'm not sure if concerned ape coordinated with the mod author or done the translation differently

drowsy pewter
#

Thai is not officially supported last i heard

#

To be honest I dont think its very likely that working on a mod will lead to the language becoming official, considering the thai language mod has been one of the most comprehensive and regularly updated language mods for years now

#

But if you want it to become official, it would be great to send feedback to the development team via the normal channels for that stuff

#

Or I wonder if you want to present your rtl work in the 1.7 alpha channel and see if theyd be interested in implementing it or something like it into the main game, just to support rtl language packs more easily. It would be a far shot but you miss 100% of the shots you dont take @vocal osprey

placid moon
nimble marlin
#

Hi guys! I was wondering if there are any frameworks that add more commands for events? I know spacecore adds a few but is it the only one?

tiny zealot
#

it's the only one i know of that is intended for other mods to use

#

any mod can register new event commands, and once they're registered any mod can use them, but afaik others typically just add the ones they need and don't advertise them for general use

nimble marlin
#

I might make a few and turn it into a framework

#

never did frameworks before but I could give it a shot

tiny zealot
#

!decompile pretty sparse so i recommend looking at the game source

ocean sailBOT
nimble marlin
tiny zealot
#

it is easy

nimble marlin
#

thanks for the help!

#

there are so many cool things I want to make hehe

tiny zealot
#

(it being easy is a 1.6 feature. it was more difficult before)

#

i have had plans for a while to do an event framework but the need has not been pressing enough

nimble marlin
#

I recently started making events and noticed a lot of stuff was missing that could make events way more dynamic

hallow prism
#

it's worth asking around as people sometimes find workaround or some commands exist but are obscure

calm nebula
#

If you have c# everything looks like a nail

hard fern
#

What do you do if everything looks like a snail

lucid iron
#

The nuance is just whether you need the event context for anything

tiny zealot
#

or if you expect to use it elsewhere. an action can be called from damn near anywhere

near island
#

Does anyone know of a way to see what "category" items are in? Like if I wanted to check what items were the in "-25 Object.ingredientsCategory"

#

Ah it looks like Console Code might help me

tender bloom
#

Lookup anything possibly also

dusky marsh
#

Code for a mod that restores stamina:
https://smapi.io/log/5fb7de42489145aeafd5768479f96d21

This code works fine singleplayer, the stamina is saved before it is spent, and after spent, it is restored.
But when trying local coop, the stamina is saved after it was already spent, and i dont know why.
Any ideas?

ocean sailBOT
#

Oops, couldn't parse that file. Make sure you share a valid SMAPI log.

near island
#

Thank you! I'll grab that next

gaunt orbit
#

does anyone know of a good way to get an assembly handle for another c# mod by mod id?
I know you can get the manifest, and that will have the dll file name, but Load() requires an assembly name, which is not necessarily the same as the file name. I can use LoadFrom to load by file name, but that requires me to get a path to the other mod's folder, and I don't see a way to do that with SMAPI. I can iterate loaded assemblies and match by simple name, but that has the same issue as Load()

#

or does the name always match the file name?

#

hm

#

I wish SMAPI just let you grab the assembly via IModInfo

gaunt orbit
#

ah, smapi internal reflection

#

I was trying to avoid that but I suppose it really is the best way

#

@ pathos official api please

lucid iron
#

It works/5

brittle pasture
dusky marsh
#

they are global

brittle pasture
#

yeah in local coop they will be shared between players

#

you want to wrap PerScreen around them

dusky marsh
#

will look into it thank you!

fast plaza
#

I vaguely recall there being something with harmonylib where you could add patches that targeted methods from other mods if they existed, is this a thing or am I imagining it?

calm nebula
#

Prepare?

fast plaza
#

basically what I'm trying to do is make my mod compatible with wildcat dynamic combat and my mod breaks down with the meleeweapon changes that mod does, but I've noticed it works fine if a certain config setting is disabled, which is checked in those patches. I figured maybe I could patch ontop of that mods patches to make an additional exclusion for weapons from my mod.

#

I'm not sure if thats a terrible idea or if thats possible though

#

oh i see prepare on the harmonylibs docs now lemme read that

dusky marsh
uncut viper
#

per screen doesn't do anything for online multiplayer.

#

it's called PerScreen because it's literally talking about the screens you have in local coop

#

since all those screens are running in the same game instance, their variables and such must be kept separated. that isn't the case in online coop

dusky marsh
#

but if it the mod is working with that, it will also work online, right?

uncut viper
#

should do

#

it'll just be working with one screen, which will effectively be the same as no PerScreen at all

fast plaza
#

hmm I can't find any good examples of prepare and I'm unsure if this is even a good idea now. Patching ontop of other mods patches seems like it might end up being a bit of a disaster

uncut viper
#

Prepare is not made specifically for patching other mods but simply for doing any kind of preparation before a patch actually runs

#

Are you using annotations to patch?

fast plaza
#

ah, so probably not what I'm looking for then

uncut viper
#

No you still want it

#

I just mean you likely won't see an example for specifically that

hard fern
#

is the ave bug possible to permanently fix forever so u never see it ever again in your entire life or is harmony just cursed

fast plaza
#

still want it as in for this specific issue or in general?

uncut viper
#

If you return false in the prepare function, the patch does not get applied

#

So you can use the prepare function to check if the mod is loaded on the SMAPI registry

calm nebula
#

Observe my bad ideas

fast plaza
#

hmm well that seems like it might be just disabling the mod stuff altogether though? if its disabling the entire patch

latent mauve
#

You need a harmony patch log to get any useful info about an AVE, right?

calm nebula
latent mauve
#

How unfortunate

uncut viper
fast plaza
#

Hmm ok. well I think I get the gist of it and honestly I think it'd be safest to just set it as a incompatible mod, I don't wanna mess around with someone elses stuff without an API right now because that seems like it could end up being a huge problem later down the line...

stable basin
#

One question: is it possible to make mods for SMAPI using just a cell phone?

#

I believe it is possible, but probably with some limitations

hard fern
#

SDVpuffersweats sounds scary

brittle pasture
#

i’ll be honest just get a laptop pls

tight rivet
#

(I'm actually not sure you could compile itdireclty on the phone. 🤔 But I guess you could set up a VM with it..?)

fossil osprey
#

In other words: please don't

calm nebula
#

But also it's all patches on different mods lol

woeful lintel
#

any general opinion about Fextralife's brand new mod platform? they sent me a mail (ew) about it.

tight rivet
#

isn't.. that a youtuber?

#

.. Ah. No. "FextraLife was founded in 2012 and was acquired by Valnet in December 2024. Fextralife has been a cornerstone of the gaming community for over a decade, building a reputation as an invaluable resource for gamers."

hard fern
#

never heard of it lol

uncut viper
#

several people here received emails from one of their executive before too a few months ago, to try and ask us to either upload our mods there or give them permission to do so for us

#

my opinion of them is not great

brittle pasture
#

damn I still did not get one

uncut viper
#

should've made your email easier to find :///////

tiny zealot
#

i was gonna type some stuff but button said it

woeful lintel
#

I know there website from the Dark Souls wiki, which are not regarded as good from the community as far as I understand

uncut viper
#

(they found mine by looking at the author info of my GitHub commits)

tiny zealot
#

mine too

woeful lintel
#

yeah, that's fucked up, that's not the email I use for game stuff

#

now that I think about it

uncut viper
#

yeah I already didn't like them but getting an email from some random executive who won't tell you how they got your personal email when you ask but wants you to give them uploading rights to your mod is too skeevy for me in and of itself

tiny zealot
#

i have just checked and i also got this launch email. the big selling point of the platform seems to be that they will link mods directly from their game wikis, which is not great here considering 1. poor reputation of said wikis, and 2. stardew does not have a fextra wiki because why would it

brittle pasture
#

gods I can’t imagine the fextralife page for parsnips being formatted like a typical fextralife dark souls boss page

uncut viper
#

don't worry you'll get "appreciation credits" which they have not even said have any real world value

vocal osprey
# drowsy pewter Thai is not officially supported last i heard

That's weird because I'm pretty sure I stumbled upon it being in the games code while I was doing reverse engineering.

Either way I've made my changes explicit and organized in harmony so if there's any interest migration will be smooth, thanks for the detailed response SDVpufferthumbsup

woeful lintel
#

lmao, their mod pages have the exact same format as curseforge's

tight rivet
#

that is very funny

tribal ore
#

You know how you can use the $d option in dialogue to reference a world state ID (e.g. "$d kent" for kent being back). Is there a way to add world state IDs? I know I can check and use mail flags in CP to include dialogue at different times, but it would be really nice to use $d some places instead

uncut viper
#

$d only works with those four predefined states

tribal ore
uncut viper
#

(also fun fact, it doesn't actually check if Kent is back. It actually checks if it's year 2+)

brittle pasture
#

that’s like every check related to kent in the code right
year 2+

uncut viper
#

i don't know everywhere in the code that checks for it

tame burrow
#

Probably best to just continue using flags. If the 'world state' is temporary, remove the flag when the conditions are met via trigger actions

uncut viper
#

But i imagine his unlock condition check doesn't check year 2+ SDVpuffersquee

#

well hardcoded I mean

tribal ore
#

I think I'm finally (finally) getting a better handle on the $q/$r stuff. Going to have to keep myself from over-using it on this next mod

tiny zealot
#

hoping for a gsq-driven switch block in 1.7
(i know about $query but that one switches the entire dialogue string and i would like a block)

uncut viper
#

$query also doesnt work quite as most people would expect either

#

so if the block worked "properly" then itd be better anyway

tiny zealot
#

the block would likely suffer the same problem of being evaluated at parse time

#

actually maybe not

uncut viper
#

gender blocks are parsed at talk time right?

tiny zealot
#

yeah that one just occurred to me after i said it

dapper dock
#

Need some help with a content patcher mod I am trying to fix. Its called Fantasy Weapons and is currently on Nexus. Right now the weapons are failing to drop in the mines. I also want to add the weapons to the shop in order for players to have the option to purchase them (at a VERY high price). Sadly I cannot get the weapons to appear in the shop. Can anyone point me in the right direction?

urban patrol
#

!json can you share your 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.

dapper dock
urban patrol
#

please link it in here using the site governor mentioned

urban patrol
dapper dock
#

Ok, i'll fix that and test it out. Thank you for telling me about the Validator site! I had no idea that existed. 😎 👍

urban patrol
#

it’s a great site! just know you can ignore an error telling you you need a Format unless it’s your content.json

#

as for why they don’t drop in the mines, where is your code that does that?

dapper dock
#

I may have misunderstood this as the level for which the Weapons drop:

"MineBaseLevel": 70,
"MineMinLevel": 60,

urban patrol
#

it might be actually—i’ve never worked with weapons before

#

oh yeah you’re correct

calm nebula
#

It's the barrels

#

Not from monsters

#

And it isnt very common

urban patrol
#

yeah maybe you just haven’t gotten it yet?

dapper dock
#

OH! I should definitely add that to the page on Nexus!

Also, after fixing line 261, I got this in the Smapi Console after opening the shop:

[13:14:10 WARN Content Patcher] Can't apply data patch "Fantasy Weapons > EditData Data/shops" to Data/shops: the field 'AdventurersGuild' doesn't match an existing target

urban patrol
#

!unpack unpack the game and look at Data/Shops to find out how you should format your target field

ocean sailBOT
#

Follow this guide to unpack the game's content files in order to see and explore how the game data is structured.
It's helpful when making your own mods, or just to learn about how the game works!

dapper dock
#

Is the Mine Base Level the deepest level at which the weapons drop? Or is it that they become more common at that point?

oblique meadow
#

I have a random hypothetical question. Is it possible to have any kind of a c# module that applies a tile property anytime a specific tile shows up on a map?

Use case- I want to make the mushrooms on my farm glow when grown. The part of the mushroom that grows will have a specific tile id and since the glow is created by MMAP id like the mushroom to glow when grown

uncut viper
#

anything is possible with enough C#

oblique meadow
#

But how much am I feasibly looking at haha. I’m not against figuring it out

uncut viper
#

highly dependent on your personal thresholds for efficiency, compatibility, and jank, likely in that order

#

overall, likely not very much

patent lanceBOT
autumn tide
#

hellooo trying to think of some krobus-like terms of endearment for when they're roommates with you, any ideas? so far i was thinking maybe 'my rainfall' (kinda like a reversal of 'my sunshine') and 'my beloved'

fast plaza
#

My dude 👉 👉

#

Idk how you'll get the hands into the stardew font though

autumn tide
#

it's gotta have the hands

#

hmm new sprite thats just the love face with those emoji hands

fast plaza
#

Hell yeah

autumn tide
#

MY BROSKI

lucid iron
oblique meadow
lucid iron
#

Are the mushrooms a wildtree or a map patch

lucid iron
soft lance
#

hello oh great masters

#

i come with a humble question

#

i own the steam copy (and switch, but doesnt matter here) of Stardew Valley

#

I cannot figure this out, but, how can I play 1.0-1.3 releases of Stardew?

#

Google said something via steam to do, couldn't find it, and even on data preservation websites, none even have a mention on how to do so, or at least photos of it

#

So I was wondering, how would it be possible? Preferabbly steam, or do I have to contact a developer with my steam purchase of the game to receive older copies?

#

I'd love any help, ty!

brittle pasture
#

lookup steam depot downloader
though obligatory “why”

soft lance
#

literally just wanted to take a glimpse at some of the old character portraits and how the game looked on version 1.0 mainly

red egret
#

Iirc, the portraits looked the same as now? Ever since i played.

soft lance
#

was diffrent

#

think was changed 3-4 times?

lucid iron
#

I don't think the pre release portrait ever made it into game, cus y'know pre release

brittle pasture
#

yeah they have always looked the same from 1.0 onward

red egret
brittle pasture
#

whatever portrait you’re seeing is pulled from a mod, which in turn is pulled from senor ape’s dev logs

fast plaza
#

Usually the wiki has images of the old portraits so you can look there

karmic gust
drowsy pewter
# vocal osprey That's weird because I'm pretty sure I stumbled upon it being in the games code ...

Im thai which is why i said so, I dont think it was ever added, since I probably would have heard haha. If something was added to the game code to support abugida fonts or something that's a different story though. The translation team ELL has a discord server if you do want to ask them anything about that.

My main word of warning is just to say that if you want the possibility of there being arabic or rtl supported in the game, i dont think CA will notice a mod for that being made unless someone contacts him, cus he doesnt stay up to date on the modding community as much

autumn tide
oblique meadow
#

Can someone possibly help me out. Im trying to use FTM to spawn a chest with a watering can in it. Looking at the ID the code is (T)WateringCan

Per the FTM readme a chest should be formatted like so:

          {
            "Category": "Chest",
            "Contents": [
              "Watering Can"
            ]
          }
        ],```
I have tried WateringCan, (T)WateringCan, and Watering Can and i keep getting
```[Farm Type Manager (FTM)] An area's item list contains an object ID or name that did not match any loaded objects.
[Farm Type Manager (FTM)] Affected spawn area: "CommunityCenter"
[Farm Type Manager (FTM)] Object name: "Watering Can"
[Farm Type Manager (FTM)] This may be caused by an error in the item list or a modded object that wasn't loaded. The affected object will be skipped.```
royal stump
oblique meadow
#

Ok I’ll give that a shot. Sorry if that was listed on the readme and I missed it

royal stump
oblique meadow
#

That worked. Thanks Esca

ornate trellis
#

when the dialogue aint dialogueing and the schedule isnt scheduleing....but hey at least shes in the game now

#

oh wait i know why emotiguy

#

anyway, look at herr

#

hm, inch resting, still an unmoving untalkative statue

calm nebula
#

(meirl)

brittle pasture
#

day 0 since I released a mod with an embarrassing bug that I have to fix minutes later

autumn tide
#

what mod was it? 😭

ornate trellis
#

man, I am clueless

ornate trellis
#

I did an include for schedule and dialogue, loaded a blank for it, made a really simple schedule, slept three days

#

i am confusion

ornate trellis
#

currently rereading everything to see if i have a typo anywhere

brittle pasture
patent lanceBOT
autumn tide
#

OOOOH 6666!!!!!

#

..sorry hehe

ornate trellis
#

hm

#

can someone tell me if an antisocial npc also needs a gift taste or not, maybe thats why she aint doing anything

calm nebula
brittle pasture
#

one of these days when I don't feel supremely lazy I'll set that up lol

ornate trellis
#

ok, wasnt gift tastes back to being lost

calm nebula
#

[Conditional("DEBUG")]

#

I have a general rule of thumb that I'll only let myself make a specific mistake once

#

Afterwards, I need to implement systems to prevent that mistake

autumn tide
#

heyyy uhh was making a dwarf portrait that gave them emotions, did it the exact same way as other portrait mods, got this message from console:
[Content Patcher] Can't apply image patch "Dwarf Portraits > EditImage Portraits/Dwarf" to Portraits/Dwarf: target area (X:0, Y:0, Width:128, Height:256) extends past the right edge of the image (Width:64), which isn't allowed. Patches can only extend the tilesheet downwards.

#

what should I do?

lucid iron
#

If the original Dwarf image is only 64 wide, you need to do a Load

autumn tide
#

oh?

lucid iron
#

Use Priority to avoid exploding other mods

autumn tide
#

alr, uhhh how does a load work/

#

?

lucid iron
#

I would link the cp docs but im on phone

autumn tide
#

oh, okay

#

I'll search for it

iron ridge
ornate trellis
#

I am winning

iron ridge
#

(are you making the portrait(s), NPC, font, UI or map?)

ornate trellis
#

trying to get the NPC to work

#

I made everything in the pic tho

#

dialogue is working but not schedule I still call this a win

#

(also correction i made everything besides the font, the font is just...a font i downloaded to clear things up lol)

lucid mulch
#

If I ever add ci/cd and have that compile for releases instead then I could have a flag that turns them off when it's doing the build

hardy citrus
#

hi, random question from someone with near no experience trying to learn to make my own mod stuff via crash course and learning from reading other's json files, and i feel like ive got a pretty good grip on most of what goes into making a building, but i cant for the life of me figure out how to make the building layer behind the player when they are in the buildings collision map but are in front of the building, can anyone point me to a good guide or help out?

tender bloom
#

I suspect you’re running into an actual game limitation but I’m not sure

#

Can you send pictures of what you mean?

#

Like when you’re “standing inside” a building essentially?

#

I recall someone else having trouble getting a building with a collision map like:
xxx
xxx
. x .
To not look funky when they were standing on some of the edge bits. But I’m not 100% sure I’m remembering right.

#

Essentially, vanilla buildings are pretty much all rectangles

#

So there may not be a ton of features to support funky shapes

lucid mulch
#

Stable is a horseshoe shape and would be the reference example for checking the correct layers

tender bloom
#

That’s a great point

hardy citrus
#

thats exactly the problem im having. the front of my collision map is like this

OOOXXXXXXXXOOO

tender bloom
#

I was thinking like “barn, coop, well, darn it…”

autumn tide
ornate trellis
#

hell yeah, fixed my schedule issue, we are back in business

hardy citrus
midnight sand
#

Hi!

Question: under which circumstances will WorldMapManager.GetPositionData(location, position) return null?

brave fable
ornate trellis
#

lol nooo shes sorting books

#

maybe i should make the books a diff color xD

#

would blue make it better

brittle pasture
hardy citrus
lucid mulch
#

Look at Data/Buildings and find the stable entry

lucid mulch
shrewd flare
#

just wanna say yall are cool asf for being able to mod and stuff, it literally took me 5 hrs yesterday to even figure out how to install the mods and unzip the files LMAO

brave fable
midnight sand
# brittle pasture eating dinner right now but the most surefire way to find out for yourself is de...

That's why I'm asking.

I'm reading the code and the way I understand it is:

  1. If the tile is in a certain location -> return the location context
  2. If the tile is in a building and that building is in a location -> return the building location context.
  3. If something else -> return null

The thing is, is there any instance of a location not having a context or a building not being in a location or any other weird thing?

midnight sand
lucid mulch
#

sure, a mod adds a location and forgets to populate worldmap metadata

#

I don't think there's gaps in vanilla

#

debug worldmapposition true will be your friend as the code has a bunch of logging built in and will give diagnostic info as to what happened

hardy citrus
#

so when running stardewxnbhack im running into this error

Unhandled exception: Microsoft.Xna.Framework.Content.ContentLoadException: Failed loading asset 'Data\Buildings'.
---> Microsoft.Xna.Framework.Content.ContentLoadException: The content file was not found.
---> System.IO.FileNotFoundException: Could not find file 'C:\Program Files (x86)\Steam\steamapps\common\Stardew Valley\Content\Data\Buildings.xnb'.

lucid mulch
#

are you using an up to date version of stardewxnbhack?

midnight sand
#

In that case those location would not have a region/map assigned to be shown I suppose. (That's what I need to find, to create a map chooser when showing the MapPage)

hardy citrus
tiny zealot
#

is your stardew valley old (say, 1.5.6)? Data/Buildings is a 1.6 asset, if memory serves

hardy citrus
#

its 1.6

#

not sure what i did exactly but i think??? i fixed it. would be great to know how but i havent a clue

#

finally have the information i need, thank you for your help

brave fable
autumn tide
#

almost done with my first mod event :)

stable basin
ornate trellis
#

you'll get to play with scripting instead

#

aka framework mods

ornate trellis
#

virtual machine maybe?

brittle pasture
#

yes, you can technically write content packs and make sprites with just a text editor and a pixel art program

#

but tbh pls just get a computer

tender bloom
#

The pixel art can be ok if your phone is big

#

but it's kind of painful if it's not, source: me trying it for portraits (already 4x bigger than object sprites)

#

I would say it's definitely doable to make content packs on a phone

hard fern
#

i can second that it's painful to draw on phone

tender bloom
#

But I would not recommend judging whether modding is fun based on that experience

hard fern
#

i'll write the rest of my json for my mod on my phone...

tender bloom
#

I think it's unrealistic to expect everyone to have a computer given waves hand global stuff out there or whatever, but we gotta keep expectations realistic on how it's gonna go

brave fable
#

phones are not for doing productive things. they are for taking calls and wasting time

tender bloom
#

what about making calls 😛

brave fable
#

while there's a very broad overlap between wasting time and making mods, the slight hint of productivity involved completely invalidates it

tender bloom
#

i once typed a several thousand word rant on something that made me really mad on my phone

#

my thumbs hurt afterwards

brave fable
#

god your thumbs must be ripped

tender bloom
#

it took me like an hour of furious typing

#

this was like 12 years ago so no worries they're back to their usual completely not ripped state

patent lanceBOT
brave fable
#

incidentally someone posted this error (no log) on LOC after i updated the api from the EMC compat PR

[ExtraMachineConfig] Tried to map a mod-provided API to interface 'LoveOfCooking.Objects.ICookingSkillAPI', which isn't compatible with the actual mod API.
Technical details: ArgumentException: Unhandled proxy/conversion method for info: ProxyInfo{target: TypeInfo{context: blueberry.LoveOfCooking, type: LoveOfCooking.Objects.CookingSkillAPI, LoveOfCooking, Version=2.0.1.0, Culture=neutral, PublicKeyToken=null}, proxy: TypeInfo{context: selph.ExtraMachineConfig, type: LoveOfCooking.Objects.ICookingSkillAPI, ExtraMachineConfig, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null}}
 ---> ArgumentException: The ICookingSkillAPI interface defines method add_PostCook which doesn't exist in the API or depends on an interface that cannot be mapped!

in the last line, is 'the api' referring to 'the actual mod api'/'a mod-provided api' above, or ICookingSkillAPI as included in EMC

tender bloom
#

I think it means that in EMC, "ICookingSkillAPI.cs" includes a function that does not exist in actual LoC but I'm not sure sure

brave fable
#

i'm assuming it's the api in LOC rather than the api interface in EMC and they just haven't updated their EMC

#

nexus at least mentions their LOC version is the latest

lucid iron
#

LoveOfCooking.Objects.CookingSkillAPI, LoveOfCooking, Version=2.0.1.0

#

is that latest

tender bloom
#

looks like 1.17.4 is latest EMC

#

they have 1.0.0.0 i guess??

#

not sure

brittle pasture
#

that’s the version in the csproj which is always 1.0.0

brave fable
lucid iron
#

selph have you heard of the good word

#

of mod manifest builder

brittle pasture
#

yea I know about the m-

#

I’ll file “migrating to manifest builder” as a P4 bug

brave fable
#

nuget packages? builders? source generators? you must've been dreaming. come, we've got a new release ready, let's go update four semantic versions at once

lucid iron
#

anyways blube i think they just lied

brave fable
#

i've gotta say kitchen station sets has the most normal & welcoming page banners and thumbnails but then you see the mod description and it changes to a mix of fear & ill omen

uncut viper
#

i think it was the opposite, they updated EMC but not LOC

#

you can check which versions theyve downloaded of LOC

brave fable
# lucid iron anyways blube i think they just lied

it's possible they downloaded LOC 2.0.6, found it was incompatible with an old version of the game maybe, or installed it to a different device, and then ran into this issue and posted the error message leading nexus to say that's their current downloaded version

#

anyway it's probably solved by them just updating both mods but they haven't replied yet

#

alas log

uncut viper
#

also nexus would show you if they downloaded an older version again

brave fable
#

i suppose it's also possible they downloaded it but didn't install it, or used a different mod group, or only updated the CP component, or ..

uncut viper
#

keep going please, id like to know all the possibilities

brave fable
#

sorry i hit the word limit. need to wait a few hours before i can query some more ideas

calm nebula
#

Smh

#

I want more bluebs tokens

brave fable
#

ah, that sense of fear and foreboding on kss was true

lucid iron
#

what r u trying to do solve monS

brave fable
#

just checking out more compatibility requests with bettercrafting. specifically it has its own tile actions along the lines of leclair.bettercrafting_OpenMenu BetterCraft.SushiBar that open a new BetterCrafting menu specifically, rather than the base game crafting page, so LOC's CookingMenu is never opened regardless of whether either mod's menu is enabled/disabled to allow it

#

but i don't think there's a reasonable way to intercept it via the BC API, and trying to harmonise this interaction specifically sounds pretty bad

#

i've known about this for a long long while and my opinion hasn't changed that it's more trouble than it's worth

brittle pasture
#

I don’t think BC even has code for “open vanilla cooking menu but only with these recipes” (because why would it lol)

brave fable
#

well it has a config option to disable its own cooking menu, but apparently not for the BC tile actions (though it'd take some weird & wild workarounds to have limited recipes on the base game cooking menu)

uncut viper
lucid iron
#

this seems like a BC problem tbh

brittle pasture
#

[revisiting my list from ages ago and how things have changed since then, all these mods living together in harmony](#making-mods-general message)
(except for Cooking Overhaul, but it’s doomed regardless)

grand birch
#

wasn't there a mod that had infinite inventory with tabs for types of items? like i could have sworn i used to be able to just click minerals and see all the minerals

hard fern
#

uh that's called cjb item spawner

brave fable
grand birch
brave fable
hard fern
#

how do i add a context tag into gift tastes again

#

like for every item that has a specific tag

#

idk what to do

#

the wiki doesnt have anything

#

or if it does im dumb and can't find it

brave fable
#

exactly the way you expect SDVpufferthumbsup

hard fern
#

im looking at that and yet idk

#

it doesnt have what im looking for

tender bloom
#

just write book_item instead of -5

hard fern
#

wait am i just stupid

#

...perhaps

brave fable
hard fern
#
                    "Operation": "Append",
                    "Target": [
                        "Fields",
                        "Penny",
                        3,
                    ],
                    "Value": "tag_Sweet",
                    "Delimiter": " "
                },``` case 01: im overthinking this
brave fable
#

that should be fine, for some context tag tag_Sweet

#

the game uses food_sweet though if that's what you're after'

hard fern
#

🤔 would it be better to prefix the context tag with my own mod id so it doesn't get mixed up with others

brave fable
#

depends, do you want to include only your sweet items, or any sweet items?

hard fern
#

i checked the vanilla context tags and those use food_sweets or something so technically they're different

#

but i worry they're too generic

brave fable
#

context tags are supposed to be generic. that's their deal

#

but if you only want your own sweet items, use a mod ID prefix for clarity

#

otherwise use food_sweet for any and all sweet food items

hard fern
#

yeah, cuz these are just for like... a very specific set of items and i don't want penny to randomly start liking every sweet thing on the planet

#

i guess when in doubt, modid

#

if i just type out my modid plainly, i can use that same tag for other mods even if i don't have it installed, right?

like ModA_tag can be used in mod b's items even if i dont have mod A installed?

brittle pasture
#

you don’t have to type it out

#

or if you meant other mod typing it out then yeah

hard fern
#

yeah i meant for the other mod

#

anyways very funny i can abbreviate my mod name into MCR

tiny zealot
#

(transpilers) i need to load an optional, named argument from the method i'm patching onto the stack in order to pass it to a C# function i'm calling. what is the incantation to create a CodeInstruction that does this?
(this is for SpriteText.drawString, and its parameter bool junimoText = false,. at some relevant points in the method, ILSpy shows me e.g.
IL_0950: ldarg.s junimoText
which is not exactly helpful for recreating it)

#

i tried using what i thought was its index, but 1. that's gross and 2. i seem to have gotten the wrong value, so maybe my index was wrong

royal stump
#

I'm not sure about the specific IL involved offhand, but optional args should be exactly the same as other args
they're always there, the default value just gets added at compile time for any calls that didn't provide something

tiny zealot
#

that makes sense, but is there a useful way to get its index by name, like the decompile is showing me?

#

obviously i don't expect to just punch in the name. i could potentially get the method body and do it that way if it's feasible, etc.

royal stump
#

not 100% sure, but iirc it's only ILSpy/etc that associates it by name, so you'd want a ldarg.s with the arg's index, specifically as a byte (unsigned int8)

tiny zealot
#

ok. thanks

uncut viper
#

i also believe the way to do it is with the index, but be aware that the index to use for the arg.s varies by one depending on whether or not the function is static aka has an implied first argument of "this" or not

#

i dont know if that function is static or not i cant check right now

#

but it may be why your index was wrong

#

(that "this" explanation may be a bit wrong too but its something like that iirc)

tiny zealot
#

it's static

#

ILSpy gave me an index, or a thing which looked like one, which turned out to be off by one

#

but since its decompile references the name i figured there might be a way to get the index by name instead of just hardcoding a 9

#

obviously all transpilers are brittle, etc etc but you know

lucid iron
#

I just try to find another instance of it usually

#

oh wait its a ldarg not a ldloc

#

hardcode it all the way tbh

uncut viper
#

the only reason itd change is if the signature of the method itself changes, which means if you're relying at all on the nameof() or typeof() or params of the method in order to even tell Harmony what method you're trying to patch, it will break regardless

tiny zealot
#

makes sense

dapper dock
#

For Advanced Melee Framework, there are instructions for Creating Advanced Melee Framework Content Packs. However, when I clicked on the link for information about the different Enchantments; it led to some random site that looked like a scammer site. So... is there anything I can do to see what all of these do?

"vampiric": VampiricEnchantment
"jade": JadeEnchantment
"aquamarine": AquamarineEnchantment
"topaz": TopazEnchantment
"amethyst": AmethystEnchantment
"ruby": RubyEnchantment
"emerald": EmeraldEnchantment
"haymaker": HaymakerEnchantment
"bugkiller": BugKillerEnchantment
"crusader": CrusaderEnchantment
"magic": MagicEnchantment

Some I can find on the wiki and some i cant

uncut viper
#

the link likely lead to the old community wiki link

#

which as you know now is very much not the wiki anymore

#

you should be able to replace "stardewcommunitywiki" in the url with "stardewvalleywiki"

dapper dock
#

What's the Magic Enchantment? I don't see it on the wiki.

uncut viper
#

the one that shoots a projectile, i guess, judging by a quick scan of the C# class for it

#

(i dont know much of anything about enchantment code)

#

"Starburst"?

royal stump
#

yeah, that text doesn't show up on the wiki either, it might be unused in vanilla

uncut viper
#

i was about to suggest the same, though from a quick search it appears to be implemented by at least one mod

royal stump
#

okay yeah, the game never adds MagicEnchantment to anything, unlike all the others I've checked

#

(e.g. this.AddEnchantment(new AquamarineEnchantment()); for everything)

#

thought it might've been hidden in content somewhere, but that seems to be it

dapper dock
#

👍

gaunt orbit
royal stump
#

I imagine you could do reflection nonsense & iterate over the args in the patch setup, but it's probably fine to just let patches break if they're refactored that much SDVpufferdizzy

gaunt orbit
#

You could for parameters/args, but not locals

royal stump
#

ah, yeah, that part sounds rough

gaunt orbit
#

Nowadays I usually write heuristic patches, where it looks for specific "landmarks" and then copies locals/ops from existing instructions. Less straightforward but also less likely to die horribly

#

I also use passthrough methods when possible if I'm modifying values, so if other people try to modify it as well, it stacks instead of overwriting or just exploding

#

Unrelated but @royal stump your avatar is very cute

royal stump
#

passthrough methods are pretty convenient, yeah
though iirc I just started using them because I was afraid to remove instructions directly SDVkrobusgiggle

#

prior to knowing how labels worked

brave fable
#

(what animal is actually in your pfp. i just assumed it was an owl since forever because of the slate hat, but.. moogle?)

gaunt orbit
#

I rarely need to remove instructions tbh. I think the only times I've done it are a patch in 1.5 unhardcoding giant crops from the farm (which like 3 other mods also did) and in hhd where I have this bonkers reverse transpiler for AT to adapt the draw patches for objects to drawInMenu

royal stump
#

though before that I was always using ff6 moogles anyway

royal stump
#

probably could've just passthrough filtered it

patched[x - 1] = new CodeInstruction(OpCodes.Ldc_I4_0) { labels = patched[x - 1].labels.Concat(patched[x - 2].labels).ToList() }; // replace the "Isinst" with a code that outputs 0 (false)
patched.RemoveAt(x - 2); // remove the call```
uncut viper
tight rivet
gaunt orbit
uncut viper
#

ichor wanted an arg, though

gaunt orbit
#

I may have misread the post

vital lotus
#

Button, this would only update this particular mod right?
"Spiderbuttons.BETAS_PatchUpdate \"ItsBenter.DialogueDisplayTweaks.CP\""

before I was using "Spiderbuttons.BETAS_PatchUpdate {{ModId}}"

does it make a difference?

uncut viper
#

BETAS has no way of knowing you used a token