#making-mods-general

1 messages · Page 415 of 1

verbal narwhal
#

maybe i am so confused because i have problems differentiating the exact use case of smapi and content patcher?

lucid iron
#

That said it's a good idea to prefix your map properties with your mod id, camiska.Froggos_FrogTankRect and so on

#

Content patcher is just a C# mod itself, so obviously everything it can do is also doable in your own C#

#

But you can do loads of things without ever touching C# bc editing game content is a powerful tool

verbal narwhal
#

mhm

#

I am scared to ask but if anyone has the time and willingness to take a look at me code, I would be veeery thankful

#

and it works currently very well

lucid iron
#

Code auditing LilyDerp

#

Well if u put it on git or pastebin I'll look

#

But I will warn you that im very peculiar about this kind of thing

verbal narwhal
#

I fear you might hate me afterwards then

#

aahh

lucid iron
#

It's ok i understand that people probably find my code peculiar too

gentle rose
#

I can also take a glance

#

I'm strange in a different way to chu, maybe we'll balance out

lucid iron
#

We can be team rocket together

#

Duke is meowth

gentle rose
#

sold

verbal narwhal
#

i added some quick annotations

#

and thank you very much

lucid iron
#

For interaction, maybe you can use a map tile action there

#

If you edit that to the spouse room tmx then you don't have to guess where tank

verbal narwhal
#

but I thought this way might make if flexible for mods that edit the spouse room tmx

#

or is that unnecessarily complicated?

gentle rose
#

I'm not sure if this will work with poly mods if they have someone else's spouse room

lucid iron
#

GameLocation.RegisterTileAction

#

Well you don't have to erase the whole tmx or anything

#

Just add 1 tile property Action at Buildings level

gentle rose
#

and I'm really not sure how well this will work in multiplayer, have you tested that?

lucid iron
#

This mod generally won't work with poly mods because it's checking a single spouse DokkanStare

verbal narwhal
#

i tried to host two instances of sdv and test it but it didnt work (I blame stardrop)

gentle rose
#

I haven't delved into their code tbh

lucid iron
#

Not that I know of, but you can just use the api if you really want to support it

gentle rose
#

anyway I'll take another look in a sec in an actual ide, I need my syntax highlighting SDVpuffersquee

verbal narwhal
#

oh i thought this might handle this

            {
                var room = spouseData?.SpouseRoom;
                if (room != null)
                {
                    if (room.MapSourceRect.Width > 0) width = room.MapSourceRect.Width;
                    if (room.MapSourceRect.Height > 0) height = room.MapSourceRect.Height;
                }
            }```

after looking into custom spouse rooms
gentle rose
#

the thing about that is it just falls back to a default position, so if there's weirdness where Sebastian IS their spouse but that's not his spouse room, it will do weird things

verbal narwhal
# gentle rose why not try split screen mp?

I tried that too but it wanted me to press a button on my controller that my controller didn't have and I tried pressing every button on my controller and nothing happened and while typing this out I feel like a toddler

gentle rose
#

oh dw that happens, are you on a playstation controller?

verbal narwhal
#

xbox 360

gentle rose
#

oh what button was it asking for?

#

(I forgot lmao)

verbal narwhal
#

three horizontal lines

gentle rose
#

that should be the little one to the right of the Xbox logo I think

#

it might be labelled start?

verbal narwhal
#

lemme try it again

gentle rose
glossy cargo
#

A bug I encountered in my mod, while working on a meme bundle LUL

lucid iron
#

I wonder if this is sufficient

int frogeCount = farmhouseLocation.TemporarySprites.Count((tas) => tas is SebsFrogs);
verbal narwhal
#

so far it at least doesnt spawn in the wrong houses!

#

and both can interact with the farmer frog tank

#

now to create a save file where the farmhand has married sebastian q.q

verbal narwhal
lucid iron
#

Checking for precise frog frames i mean

verbal narwhal
#

I also had the problem in earlier builds that suddently the interaction and croaking and stuff worked but the tank became passable

karmic gust
#

Is there a way to clear objects spawned on a map for an event? Like shells on the beach, for example

lucid iron
#

The secrions labeled desperate logic to detect frog

karmic gust
#

I have an item placed in the event but a foreagable spawned in the same spot

verbal narwhal
#

but sebs frogs is just handling the animation, right?

#

the frog spawning happens in farmhouse

lucid iron
#

You just want to know how many sebsfrogs entities are in the farmhouse right

verbal narwhal
#

ohh

#

yeah maybe that is genius

#

oh gosh

#

i spent way too long on my frog detection system (and true it currently still reads as very wonky and unnecessary long)

lucid iron
#

Dw i feel the same when I come back to whatever spaget i wrote last night

#

😌

karmic gust
verbal narwhal
#

unironically i spent the literal night on it

azure hound
#

can anyone explain in simple terms (because of my smol brain) how to make this give me water please lillulGiggle LMAO

fossil osprey
#

No idea personally, but maybe it's worth looking into how the well does it?

drowsy pewter
#

is that a map? not a building?

azure hound
#

i believe it's just something i have to input into tiled but i have no clue

drowsy pewter
#

tiledata, check the vanilla greenhouse map

azure hound
#

it is a map! i should've explained catstand

drowsy pewter
#

and you can copy the tiledata directly fom the greenhouse map

hard fern
#

Back layer Water T tiledata

azure hound
#

ohhh it has to be on the back layer? that's my problem then!

#

thank you!

drowsy pewter
#

its actually WaterSource

#

Water T will add the water ripple overlay to it

azure hound
#

ooh, thank you! this is what i had, it was just on the wrong layer i believe

verbal narwhal
#

ahh and it also works for multiplayer if the farmhand married sebastian!

hard fern
#

Oh right there's too muvh water in this game

azure hound
#

YESS thank you! it works!

hard fern
#

I have no idea what one water is vs another 😔

azure hound
#

tiled is so complicated

soft lance
azure hound
#

i'm fiddling around with a farm map, you're just looking at something that can refill my watering can lillulGiggle

soft lance
#

fishiessss : D

#

finally added their aquarium sprite

verbal narwhal
# lucid iron GameLocation.RegisterTileAction

I would have to make two tile actions right?
one for the upper row of the tank that is passable but clickable and a second tile action that is impassable but clickable for the lower two

or can I map this setup to a 3x3 tilemap that is a tank?

lucid iron
#

You can register 1 tile action, but yes you need to add it to 2 tiles (or more)

verbal narwhal
#

I dont think I understand that - maybe on a semantic level

#

(but english isnt my first language)

lucid iron
#

Since u be in C# anyways you can just use the set map tile helpers

lucid iron
#

This can be done in a number of ways, and you can associate the same map tile Action to multiple tiles

#

I would personally do an asset edit (AssetRequested) on the spouse room tmx

#

Put the tile property Action on a Buildings layer tile

verbal narwhal
#

but action can also be property, right?
can I make a custom tile property in c# that can be added to a tile in tiled?

lucid iron
#

Spouse rooms are Weird though, should double check that this will work

#

Action is a special kind of tile property where game promises to call your callback when it sees it

verbal narwhal
#

ok but action doesnt necessarily mean "the player makes an active action/interaction"

#

right?

lucid iron
#

It does

#

A vanilla example of an action is like inspecting david jr's cage and getting a message

#

Or interacting with robin's counter and getting her shop dialogue

verbal narwhal
#

i have been reading this, but I am confused as to if custom properties can be added?

lucid iron
#

Could name it like "camiska.Froggos_CheckSebsFrogs"

#

Here's a example from my mod

verbal narwhal
#

maybe I should focus on refining my current code first before thinking about the compatibility with another mod (which would be 14 heart events for all) that has the first frog sprite baked into the tank sprite and the tank sprite in sebs room at robin's

lucid iron
#

If you have this setup u can just register another tile action for 14 heart events for all to use

#

(another one because presumably the logic for froggo check is different)

abstract gull
#

Olá alguém pode me ajudar nisso por favor
Alguns mods que peguei do grupo do SMAPI não funciona no meu SMAPI

#

Esse e um dos Mods que peguei

#

Desculpa tá por mandar link disso aqui

#

Não tô com memória boa pra lembrar das coisas
Tbm eu já li as regras

tiny zealot
#

#1272025932932055121 we cannot help you in the making mods channel, and as i presume this is about android smapi the tech support channel on here probably also can't be much help

abstract gull
#

Ok obrigada viu

soft lance
#

Do you think it looks like a ribbon eel? I keep thinking I did a bad job 😭

#

Just getting opinions

verbal narwhal
#

I love them

soft lance
#

you dont think its bad? ;9

#

😭

verbal narwhal
#

it does!

#

no!

soft lance
#

aww tyy

verbal narwhal
#

though maybe it needs an aa darker blue pixel in the throat area

soft lance
#

hmm

#

lemme try

#

Not sure exactly but dat

#

dunno if those two pixels near the throat should be much darker or just like that, but the bottom right pixel is darker now

verbal narwhal
#

I personally prefer these over the first version

soft lance
#

same

ocean sailBOT
#

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

verbal narwhal
#

or is the lighter blue in the throat area tryin to symbolize the lower jaw?

soft lance
#

no it was quite literally a mistake on my end haha

verbal narwhal
#

do the other sprites also use black or that dark of a green for outlines?

#

(no idea, I sprited pokemon for the longest time where black was a nono, only for shadow areas)

soft lance
#

pure black no, im still working on the sprite

#

usually it shares some sort of color even if its much darker with the sprite

#

for example, this is how the outline should be

#

once i polish it some more i'll finish the outline

#

it should usually share a similar color variant but darker with the original sprite but am nub

verbal narwhal
#

no this looks really nice right now as it is! I was just wondering if it matches the rest

soft lance
#

at least i think lol

verbal narwhal
#

precious baby

soft lance
#

all da fishies so far

#

ignore the white box its for measurements

#

a few of these come from an older mod, so 50% is made by me, I got approval by them since their mod hasnt been updated in over 2 years

#

had to ask before even working on it lol

soft lance
verbal narwhal
#

thanks!

patent lanceBOT
verbal narwhal
ornate locust
#

We call that Patient Zero

lucid iron
#

Uh this bit is just to count how many SebsFrogs have spawned

verbal narwhal
#

yeah but that got me thinking

lucid iron
#

You want to add SebsFrogs to like sciencehouse?

ornate locust
#

one person notices tortilla centering, MADNESS ENSUES

lucid iron
#

Doing that on the smapi Warp event should be enough, don't need to harmony imo

verbal narwhal
#

to any custom tile location that is 3x3

lucid iron
#

Yeah u can make people put a map property like

gray bear
lucid iron
#

camiska.SebFroggos_FrogPosition

verbal narwhal
#

can smapi warp also adjust the odds? because currently it is only 85% for the first frog

lucid iron
#

You can do anything you want in C#

#

I only point out the means by which people can give you some custom data

#

So that you don't have to hardcode it all

#

I forget the exact name but one of the get map property helpers will parse a Vector2 for you

#

So you let people tell you where the top left tile of the 3x3 is

verbal narwhal
#

this was my biggest worry the whole time

#

haha

gentle rose
#

at the end of the day, the entire game is just c#. when you write c# you have access to all the tools the game does (though a little less conveniently sometimes)

lucid iron
#

Pseudocode is like this
On event Warped
Get NewLocation
Check for map property camiska.SebFroggos_FrogPosition (this you define on your own)
If map property, parse a Vector2 from the values
Check conditions to spawn seb froge
Spawn the froge

verbal narwhal
#

and I really need to work on my coding/programming vocabulary
because I can do (and have learned all by looking at game code and mod code)
but what they are called or their terms? no idea
i need to look up what pseudocode means

lucid iron
#

Pseudocode = human language explain of what the code should do in some vague syntax

#

I guess what i wrote doesn't even count as pseudo code tbh it's just a description lol

soft lance
verbal narwhal
#

ah ok so just simpler terms for complex operations

soft lance
#

for Index, Value in Table
print(Index)
end

This can't run in Python, or maybe not even Luau, but its a mockup of it

For Luau it is:

"for index, value in pairs(myTable) do
print(index)
end
"

And for Python it is:

"for index, value in my_dict.items():
print(index)"

Same idea, but its just a sketch of what you want

verbal narwhal
#

and therefore predefined classes by someone who wanted other to have a nicer and easier time?

soft lance
#

its not even needed in coding, it never will reach your code

#

its just a sketch for yourself

verbal narwhal
#

ah ok!

soft lance
#

thats quite literally what it is

#

but of course, the instructions is just in general, its not in a specific coding language

verbal narwhal
#

that is nice

lucid iron
#

(if u don't wish to summon me here you can press the "@ On" to turn it off)

verbal narwhal
#

i usually just did annotations

soft lance
lucid iron
#

I just mean you dont have to ping me on reply if you don't need me for stuff, not everyone is aware of that feature it seems

lucid iron
verbal narwhal
#

Also thank you all, especially you chu, for bearing with me through all of this

soft lance
lucid iron
#

This is the Warped event i mentioned

#

You can subscribe to it (i.e. add a method that will be called when this event fires)

#

Helper.Events.Player.Warped += YourOnWarpedMethod;

#

To handle the case where you wake up tho you want a DayStarted handler too AquaThumbsup

lucid iron
tiny zealot
# soft lance I hate it when no one has the notification when they reply to me or else I forge...

my standard consideration is "is this person currently in the channel engaging in conversation" because it seems obtrusive to ping if so.
if the comment i'm replying to is from a while back and they don't seem to be around then i'll ping unless their username says not to (as chu says, some people are really annoyed by pings, and discord gives ping control to the sender and none to the user receiving, which is A Choice™)

verbal narwhal
#

Thanks! My husband has just finished cooking, so I’ll look into it later!

verbal narwhal
#

I thinks it’s chimichanga?

soft lance
verbal narwhal
#

Like burrito-y thing from the oven with a cheese crust

#

We jokingly refer to it as Mexican lasagna

#

No idea what it would be actually called

#

But even then, it’s not authentic at all I can guarantee

soft lance
soft lance
#

Ohh yeah it prob is

#

I haven't had it in years so it prob is

honest tundra
#

I have made a pack of item bags for S&S. If you already play with all the mods required and would like a little more inventory space, check it out

turbid oak
#

Today I want to make another version of my Antisocial Pierre mod that takes effect by default and doesn't require a Joja membership. Will I just delete the "when" part of my original mod?

gray bear
#

yeah

turbid oak
# gray bear yeah

Thanks. First though I want to make a mod that gives Pierre special dialogue when you give him a tortilla. That will take more effort but I want to do it first so I can test it on a new save. (I have a mod that gives me right away access to a bunch of food including tortillas).

gray bear
#

do you want change how he feels about them, like do you want him to hate them?

#

i think tortilla's are a universal neutral

tiny zealot
#

if it's Cooking it might be universal like

gray bear
#

it's not mentioned in the exception to prolly

tiny zealot
#

but [[Tortilla]] pierre already hates them it seems

gray bear
#

id admit i know it's possible to change how an npc reacts to a certain item, but not the how

tiny zealot
#

it's not too difficult but you have to know how to wield TextOperations

gray bear
#

i don't

#

like i managed to change it to a universal love, but how do i make it so they say something special

brittle pasture
#

that’s handled in dialogue

tiny zealot
#

oh, i see what you mean

gray bear
#

o

#

so just need to add this dialouge to pierre

#

can even make him reject it it seems

tiny zealot
#

but you have to do dialogue for every villager independently (or use C# to hammer it in broadly)

#

with CP you can't give every person the same dialogue for a universal taste (without specifying every person directly)

gray bear
#

i'll give up my niji dreams. i can just handle the indivisual ones

#

like having haley call me stupid for her giving her something from her hated rock

tiny zealot
obtuse wigeon
#

is there a way to get patch summary asset Maps/Forest to output the name of the mod that applies a patch? rn it just has Load Maps/Forest in the name + details section

#

Oh wait nevermind I didn't scroll up in the terminal far enough

tiny zealot
#

when i do patch summary asset it splits up the output into one section for each content pack

obtuse wigeon
#

That's what it did but the gap between the content pack name and the rest of the data was perfectly at the top of my terminal so I didn't notice it, woops

turbid oak
#

Yeah. He already hates tortillas so I want him to go on an angry rant when you give him one. I know it's possible to give characters dialogue specific to a certain gift, just don't know how yet. Will also change his portrait when you give it to him to an angry face.

brittle pasture
gray bear
#

see the link selph sent

gentle rose
gray bear
#

you just need to add a single dialouge key to tortilla, make sure you use the item for it (it's 229 i think)

lucid iron
#

i still haven't come up with the rest of PelicanOSTGRES

#

Need acronym help plz

gray bear
#

yes i did memorize the tortilla ID

gentle rose
#

spring_\d\d? and summer_[MTWFS][a-z]{2} when

obtuse wigeon
#

regex matching would be fantastic for content packs, chaos for sure, but very useful

#

until someones mod matches when you dont want it too

turbid oak
obtuse wigeon
#

Chu you absolute Yoba send

gray bear
#

since you've already made one it should be easier

hallow prism
lucid iron
uncut viper
#

(it only wasnt there because i know that spacecore already has it and ive already met my quota recently for how many things i can duplicate from spacecore at once SDVpufferpensive)

turbid oak
#

Does this look like it will do what I want? (text is placeholder. I want to keep the rant a surprise)

#
    "Format": "2.8.0",
    "Changes": [
    {"Action": "EditData",
    "Target": "Character\Dialogue",
    "Fields": {
        "Pierre": {
            "When": {"AcceptGift_229": "I love rain.$5"
            }
        }
    }
    }
    ]
}```
gray bear
#

i've many questions

turbid oak
gray bear
#

!unpack did you do this?

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!

turbid oak
gray bear
#

do that and then look into "content (unpacked) -> characters -> dialouge" should help find the target

turbid oak
#

Thank you!

gray bear
#

this wiki page doesn't have CP examples, but i can help with that once you take a look. is it part of the code you'd be using

turbid oak
#

Should the intitial action be "EditData" or "EditCharacter"?

gray bear
turbid oak
#

Thanks

ornate drift
#

had anyone implemented a way to make bigger sprites for NPCs in the game?

turbid oak
#

Is this right?

#
    "Format": "2.8.0",
    "Changes": [
    {"Action": "EditData",
    "Target": "Character\Dialogue\Pierre",
    "Fields": {
            "AcceptGift_(0)229": "I love rain.$5"
    }
    }
    ]
}```
#

I see an obvious mistake

#

hold on

gray bear
#

it'd be entries and not fields

turbid oak
#

Thanks

gray bear
#

i'd also rec to make the value itself i18n instead of static, y'know, for the tortilla translators

#

but yeah that is correct

gray bear
#

here be wiki.
the most easy way to explain is you just, make a folder inside your mod (not in assets, where manifest.json is) called "i18n" and inside that a json file called "default"

uncut viper
gray bear
#

i never know the difference

#

after reading the docs im not sure what that difference is

turbid oak
#

I just noticed your link

#

I am very confused

#

Wait, will it contain a copy of my Content?

gray bear
#

no, it will contain your content

turbid oak
#

So I'll use that instead of Content.json?

gray bear
#

nope, the way it works is stores anything that could be translated. so instead of

            "AcceptGift_(0)229": "I love rain.$5"
    }```

it'd be

``` "Fields": {
            "AcceptGift_(0)229": "{{i18n:NAME-OF-VALUE}}$5"
    }```
#

and then in the i18n itself, you'll have whatever dialouge you want to appear. that way people can add translations easily

soft lance
gray bear
#

oh, right. what nic said

turbid oak
urban patrol
#

O stands for object

gray bear
#

i18n example in the wild

#

you're free to change NAME-OF-VALUE with the actual value in your i18n file

#

~~does i18n even accept - ~~

turbid oak
#

Thanks. So what do I put in the i18n file besides the text?

#

Will it be called a string?

gray bear
#

you only have one value, but this is how the i18n should look

turbid oak
#

I already have that open and am still confused

gray bear
#

can you be more specific?

turbid oak
#

I am confused what is going in the i18n file for a string of dialogue

gray bear
#

can you screenshot what you have right now? what exactly do you him to say

turbid oak
#

My Default file is blank still because I'm not sure what the code should look like. I did type out a rant (which I still want to be a surprise) but accidentally lost it

iron ridge
#

its just a key/value dictionary

gray bear
#

i18n are made of keys and values.
the key is used as a token, so you can make yours

{
"Pierre.Tortilla.Reaction": "rant goes here"
}```
turbid oak
#

Thank you so much!

gray bear
#

i need to go to bed, so can't help anymore. good luck with ur mod!

turbid oak
#

Thanks. Have a good night

#

I just made a new save for testing the new mod and discovered a problem with the one I made last night. Pierre is not in the list of characters even though I am not a Joja member in this brand new save. I should have thought to test it on a new save before I released it.

oblique meadow
#

Super Hypothetical question for you all. I dont even know where i'd start so I dont know if it's feasible. Let's say I wanted to add some of the games from the Stardew Valley fair to my boardwalk just to have games and such. Is that doable? Or would the work not be worth the reward?

gentle rose
oblique meadow
#

I know it would be C#...

lucid iron
#

You don't understand my meaning

#

We should just use "SEASON Spring" for the key trust

gentle rose
#

oh I see

but I want the regex so we can override all the existing dialogue, not make fallback dialogue SDVpuffersquee

lucid iron
turbid oak
#

I temporarily disabled Antisocial Pierre to test the tortilla mod. I don't know if it's doing this because I'm a Joja member in my other save or not, but either way this is a bad bug.

gentle rose
#

I want to have a way to make Abigail exclusively say lorem ipsum text with a single patch SBVPensiveButt

gentle rose
turbid oak
gentle rose
#

!json

#

rip governor

turbid oak
#

What's the json validator?

gentle rose
#

that command was supposed to bring up the explanation and link but governor is sleeping on the job SDVpufferwaaah

turbid oak
#

Thanks

grave scarab
#

just searched to see if there was a Welsh language pack for SV and instead got results to translate to Krobus' language

#

were they Welsh all along??

turbid oak
#

My tortilla mod doesn't work 🙁

#

Tortilla is 229, right?

gentle rose
#

I thought only the dwarves had a custom language

#

and it's definitely not Welsh, it's a simple substitution cypher iirc

oblique meadow
#

Thanks Chu

gentle rose
#

oh there's also the language in the cavern and the junimo language, but those are also cyphers

grave scarab
#

(I know, just thought the possibility of the immigration was funny)

turbid oak
#
    "Format": "2.8.0",
    "Changes": [
    {"Action": "EditData",
    "Target": "Character\Dialogue\Pierre",
    "Entries": {
            "AcceptGift_(0)229": "{{i18n:"Pierre.Tortilla.Reaction"}}$5"
    }
    }
    ]
}```
lucid iron
gentle rose
urban patrol
turbid oak
urban patrol
#

i just realized my other message accidentally replied to bea’s messages instead

gentle rose
grave scarab
#

that's the result for "stardew Valley Welsh language" and yeah unrelated spam

#

just found it funny

hard fern
#

Krobus is shockingly fluent in english the common language in stardew valley

lucid iron
#

He learned so that he can read books about yoba (probably)

#

Then again can krobus read?

turbid oak
#

I have no idea what I did wrong

oblique meadow
#

What does your manifest file look like?

iron ridge
#

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

turbid oak
# oblique meadow What does your manifest file look like?
    "Name": "Pierre REALLY Hates Tortillas",
    "Author": "ChaosApple0731",
    "Version": "1.0.0"
    "Description": "Makes Pierre go on an angry rant when you give him a tortilla.",
    "UniqueID": "ChaosApple0731.PierreREALLYHatesTortillas",
    "UpdateKeys": [], // when you release the mod, see https://stardewvalleywiki.com/Modding:Modder_Guide/APIs/Update_checks
    "ContentPackFor": {
        "UniqueID": "Pathoschild.ContentPatcher"
    }
}```
oblique meadow
#

Line 4

"Version": "1.0.0"

#

you forgot a comma after it

turbid oak
#

ooooohhhh. Thanks!

oblique meadow
#

The Json validator is a big help. There's a dropdown for Manifest:

#

and this is what the command was linking you to

#

For future reference

karmic gust
#

I'm working on my mod's nexus page description and can't get the spoiler tag to work correctly. This is what I have written:
[spoiler]Have 2 hearts with Pierre. Enter Pierre's General Store between 3:00 pm and 8:00 pm.[/spoiler]

and the screenshot is how it's showing up. am I formatting the spoiler tags incorrectly?

turbid oak
#

Now it says I have bad JSON escape sequence at line 5, position 23 of this:

#
    "Format": "2.8.0",
    "Changes": [
    {"Action": "EditData",
    "Target": "Character\Dialogue\Pierre",
    "Entries": {
            "AcceptGift_(O)229": "{{i18n:"Pierre.Tortilla.Reaction"}}$5"
    }
    }
    ]
}```
#

Should I be using / instead of ?

brittle pasture
#

you don’t need the quotes inside the quotes

turbid oak
#

Which quotes?

unique tusk
brittle pasture
#

just "{{i18n:Pierre.Tortilla.Reaction}}$5"

ornate locust
brittle pasture
#

if you do want nested quotes you need to escape them

#

\"
this is so it thinks the " is part of the string instead of closing it

turbid oak
#

Yay, no errors this time!

brittle pasture
#

you closed your burger too early and the guts are spilling out

obtuse wigeon
#

(yes I was summoned by the mention of welsh, I was also a bit late, these roads are full of pot holes, didn't want my horse and cart to break a wheel)

indigo totem
#

#mod-showcase message this has given me the idea to turn celebrity tortilla into its own item to make it more compatible with the other tortilla mods when i decide to learn how to make custom cp items, should be a simple project that gives me the opportunity to learn the fundementals

i also love that theres "tortilla with sunglasses" and "tortilla with sunglasses but sparkly" as two separate portraits

turbid oak
#

My new mod still doesn't work. Should the rant be a string in the default.json?

#
"Pierre.Tortilla.Reaction": "(the rant)"
}```
#

(The actual rant is in the actual file, just don't want to spoil it)

unique tusk
brittle pasture
turbid oak
brittle pasture
# ornate locust

found the issue
the target should be Characters/Dialogue/Pierre

#

oh wait wrong person to ping

turbid oak
#

Ohhh, thank you so much!

ornate locust
#

Sneaky S

turbid oak
#

Well, the rant's finally showing up but now his portrait is blank

#

I think I know what I did wrong

#

may have fixed it

brittle pasture
#

the $5 probably, I don’t think Pierre has more than 4 portraits

ornate locust
#

Remember those start at 0 too

uncut viper
#

he has 5 but yeah, start at 0

turbid oak
#

I switched it to $a

ornate locust
#

That also works

turbid oak
#

to see if that changes it

ornate locust
#

but yeah if you want his fifth portrait, it's $4

turbid oak
ornate locust
#

I don't know Pierre's portrait sheet actually. I just know they all start at 0

turbid oak
zenith sapphire
#

Guys someone made a simple mod with Unlockable Bundles without buildings or anything just items rewards? cause i'm struggling to make a mod with that

#

I'm trying to look into other mods that use that but still cant figure correctly, time ago i used to understand the process using lumisteria missing hat bundles mod

#

But now that mod seems discountinued and dont work anymore in 1.6

#

If someone made one for exercise, if possible i wish to get a copy to study how he did

turbid oak
#

Portrait still not showing up

#
    "Format": "2.8.0",
    "Changes": [
    {"Action": "EditData",
    "Target": "Characters/Dialogue/Pierre",
    "Entries": {
            "AcceptGift_(O)229": "{{i18n:Pierre.Tortilla.Reaction}}$3"
    }
    }
    ]
}```
#

There's no portrait

urban patrol
#

what happens if you try putting the portrait command inside the i18n entry

latent mauve
#

mind sharing what your i18n entry parses to?

turbid oak
latent mauve
#

Fair enough, was mainly wondering if the syntax was causing an issue with how it parsed.

gentle rose
#

the thing is that it can be hard to help without seeing the full picture. most mod users aren’t in this chat anyway so usually it’s better to just show us once so we can help (as soon as you publish it, it will be out there for people to read the files anyway)

latent mauve
#

If you don't want the rant seen, you can just change it to dummy text for the example.

#

And if it is a rant, then it's probably multiple lines, so a stray # might be causing the last portrait marker to not be recognized.

turbid oak
#
"Pierre.Tortilla.Reaction": "(the rant)$3"
}```
#

I just added the $3 to this

#

waiting to see if it works

#

IT WORKS!

#

Thank you all

indigo totem
#

congrats!!!!!

#

im also new to this so i cant give advice but ive been watching the progress the whole time :D !!

turbid oak
#

I did it!

#

Now, I need help with the mod I made last night. Could someone with no Joja saves please download the following mod and tell me if it makes Pierre vanish from your social tab?

urban patrol
#

(genuine question) why not create a new save yourself? it doesn't take long

lucid iron
#

New save highly recommended I create and destroy a dozen timelines every week

ornate trellis
#

chu thanos confirmed? /j

lucid iron
#

Groundhog day

#

Reverse time until mod works

turbid oak
urban patrol
#

save data is partitioned off per each save, so you don't need to delete other saves or anything

gentle rose
#

other saves don't impact your current save

urban patrol
#

if it doesn't work in a new save, then something is wrong

(this sounds like such an obvious statement but ykwim)

turbid oak
#

Thanks. That means something is wrong because it makes Pierre antisocial even if you're not a Joja member, which is not what I want.

gentle rose
#

are you sure the flag you're using is correct? I can't remember the syntax tbh

turbid oak
#
    "Format": "2.8.0",
    "Changes": [
    {"Action": "EditData",
        "Target": "Data/Characters",
        "Fields": {
            "Pierre": {
                "CanSocialize": "false"
            },
        "When": {
            "HasFlag": "jojaMember"
        }
        }
     }
    ]
}```
urban patrol
#

is it required to use contains when you want true?

uncut viper
#

no

lucid iron
#

This is ok I think, need to check the flag tho

urban patrol
gentle rose
turbid oak
zenith sapphire
#

anyone tried out to make some new bundles with the the unlockable bundles mod ?

turbid oak
latent mauve
gentle rose
#

can you do a patch summary on Data/Characters please?

turbid oak
turbid oak
latent mauve
#

actually, lemme doublecheck that that you don't need asset in there before Data/Characters

turbid oak
latent mauve
#

Data/Characters/Pierre is not a file that exists

turbid oak
#

thanks

latent mauve
#

So you'd need Data/Characters for the json file

#

Okay, so it does look like you'd want patch summary asset "Data/Characters" to properly filter it

turbid oak
#

There is yellow text about the mod in my console. Maybe that's why it's not working

#

it says:

latent mauve
#

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

latent mauve
#

Just upload it to there. 🙂

turbid oak
#

"[Content Patcher] Can't apply data patch "Antisocial Pierre > EditData/Characters" to Data/Characters: there's no record matching key 'When' under Fields."

#

I cannot copypaste from the console

urban patrol
#

your when is inside your fields brackets

#

move it to be on the same level as action

#

(this is why formatting is super important, because we all miss things like that without consistent indentation!)

latent mauve
#

it's also why putting it in the validator helps so much because the shared link would have made that way easier to see.

craggy goblet
latent mauve
urban patrol
#

trailing commas are allowed by CP, so i always end up putting a comma after every closing bracket and after every line (well, 95% of the time i do that) even when it's not needed

turbid oak
#

I saved that version and it still doesn't do what it's supposed to

urban patrol
#

did you test on a new save

turbid oak
urban patrol
#

and did you patch reload/restart the game after saving that latest version of the mod

latent mauve
#

If you didn't patch reload, then you will need to completely close out the game and reopen it, just going to title isn't enough

turbid oak
urban patrol
#

!reload

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

it's quicker than booting up the game each time

latent mauve
#

Are there any errors in your console now?

turbid oak
#

I still get that same yellow one

gentle rose
turbid oak
latent mauve
#

if it's the exact same error after saving your changes and reopening the game, then you'll want to be sure that you have updated the version in your Mods folder.

gentle rose
#

the thing I asked you to do earlier, that Lily explained how to do?

latent mauve
#

patch summary asset "Data/Characters"

#

it'll spit out some stuff in the console, and you can upload your log if we need to look at it

turbid oak
#

Oh yeah, sorry I didn't think I had to

urban patrol
#

and be sure to upload your log file to the log site, using the instructions on the site. copy/paste won't work

turbid oak
gentle rose
#

please do what nic just said

turbid oak
#

I will

zenith sapphire
ocean sailBOT
#

Log Info: SMAPI 4.3.2 with SDV 1.6.15 build 24356 on Microsoft Windows NT 10.0.26100.0, with 65 C# mods and 166 content packs.
Suggested fixes: One or more mods are out of date, consider updating them

turbid oak
#

What am I looking for in the log? Do I paste the whole thing there?

latent mauve
#

just upload the entire log from the path it tells you

#

Don't worry about it having extra stuff, we know how to read what matters from it

turbid oak
ocean sailBOT
#

Log Info: SMAPI 4.3.2 with SDV 1.6.15 build 24356 on Microsoft Windows NT 10.0.26100.0, with 16 C# mods and 16 content packs.
Suggested fixes: One or more mods are out of date, consider updating them

gentle rose
#

you didn't put the updated version of your mod in. The version it's using still has the "when" field in the wrong place.

turbid oak
#

I saved it again. It's still showing the same yellow message

urban patrol
#

make sure you're saving it in the correct folder, not in any other location

latent mauve
#

make absolutely sure you are saving to your mods folder insideC:\Program Files (x86)\Steam\steamapps\common\Stardew Valley\Mods

turbid oak
#

Oh I see what's wrong

#

I temporarily moved the folder to documents so I could test the other one, moved it back but it was only a copy so it's still saving in documents

indigo totem
#

I went to go work on more pixel art and got flavorblasted by “some of these things are not like the others”

turbid oak
#

It works how it's supposed to now!

indigo totem
#

yay!

turbid oak
#

Now to figure out how to update the mod I uploaded.

#

I can't figure out how to update it

#

never mind

obtuse wigeon
#

Beat me to it, I was just about to write how

dusky sail
turbid oak
#

It's updated!

dusky sail
#

finally got it to work thank god. hey did you know when you accidentally type {BC} instead of (BC) in your machinerules it makes the machine not work

hard fern
#

Wow i never knew

obtuse wigeon
#

-# (Icon should be blueberry's profile pic)

vital lotus
#

The whole tortilla frenzy is still going strong I see

dusky sail
#

its not a frenzy its a lifestyle </3

hard fern
dusky sail
#

oh i should cheeto myself before i get scared again

true coyote
#

Has a tortilla fish been made

#

Next logical step

ornate trellis
#

not yet

dusky sail
#

youve found a gap in the market

true coyote
#

I just had surgery so someone else will have to fill that gap

dusky sigil
#

has anyone made tortilla chips

lucid mulch
#

don't forget to have the tortilla be able to be combined with every butter mod

true coyote
#

Exotic butters

brave fable
#

i don't know how to make mods. can some1 pls make a tortilla rug. thank

ornate locust
#

mod that requires ALL the butter variants for a recipe to make the Ultimate Butter

ocean sailBOT
#

If you have a mod idea that you aren't planning to make yourself, you can put it in the mod ideas github: https://github.com/StardewModders/mod-ideas

However, this does not mean anyone is guaranteed to work on your idea—modders who are looking for ideas sometimes go through and work on what they find interesting off this list. If you want to pay someone to make your mod idea, there are a few people who do commissions (mostly art, sometimes code); you can ask around, search usernames for the word comms, or see !commissions.

drowsy pewter
#

I actually did want to make a tortilla rug but I think I need to stop

#

hm.. cornucopia does need more furniture..

brave fable
#

i wasn't aware cornucopia even had furniture

#

i thought it was just crops

ornate locust
#

Does Cornucopia have a decorative cornucopia?

drowsy pewter
#

yup

ornate locust
#

pleasing

brave fable
#

when you think about it, a cornucopia is really just a burrito

drowsy pewter
#

True...

hard fern
#

Burritocopia

dusky sail
#

if not related to tortillas (made of corn) then why is it called corn ucopia

unique tusk
hard fern
#

Have i ever seen a corn tortilla burrito...

#

It's always been flour tortilla

urban patrol
ornate locust
#

Probably a missing { or }

urban patrol
#

you've closed it out too early

dusky sail
#

yeah get rid of the ] on line 5 then try it again

#

it seems like you have the proper one at the end you just have an extra one

ornate locust
#

Ooh yeah

#

totally missed that

lucid iron
#

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

ornate locust
#

Missing colon

#

"Home":

hard fern
#

:o that's an important part of your gastrointestinal system

#

It's bad if it's missing

uncut viper
#

thats also just not inside of any patch

brave fable
#

(when you add the colon, what do you expect that to do?)

#

i'm assuming that's part of whatever code is in your dispos.json? you'd best remove it from this file

ornate locust
#

you are correct of course, it's not inside the patch

brave fable
#

it's hard to understand where it should be used with various included content files

#

which of your files has a Changes entry targeting Data/Characters?

unique tusk
#

Uhhhhhhh

#

Imma be honest I just followed a tutorial n copied & pasted a lotta it

ornate locust
#

I think you missed some bits? Or mispasted some bits

#

What tutorial?

hard fern
#

You shouldn't just copy paste it without knowing where it goes 🤔

unique tusk
ornate locust
#

That has the Home bit under data/Characters, yeah

indigo totem
drowsy pewter
#

Yeah thats hilarious

indigo totem
#

mmmmm do i work on outfits, start to draw sea slug sprites, or actually play the damn game SDVpufferthink decisions

ornate locust
#

Can I vote sea slugs

#

I like sea slugs

obtuse wigeon
#

Second vote for sea slugs, they're cool

autumn tide
#

uhhh hey! I'm tryna make an event rn, but I'm super new to all of this and I'd really appreciate some help with turning my narrative thing into code. I've got the very start done buttt I'm kinda lost cause it seems so complex SDVpufferflat

inland rain
#

is Helper.Events.GameLoop.TimeChanged triggered when you wake up?

autumn tide
#

one sec i got a document with my stuff

versed wyvern
#

Huh. Was it ever known before that annihilating the casino boncher apparently makes it so he can't be used for anything else in that save ever again? ThinkO_O
Turns out that my coffee machine mod which I set to use the Bouncer to deliver the dialogue stops working after blowing him up

lucid iron
#

what a terrifying thing youve done

lucid iron
#

i believe it's cus Game1.getCharacterByName helper looks for the character in the world

#

and thats what BETAS uses

urban patrol
uncut viper
#

why was the coffee machine named Bouncer,

urban patrol
#

also for a sense of scale, i usually have to test my events 20-30 times to get every single thing correct, adjusting dialogue, timing, etc. so don't feel bad if it's not perfect the first several times you run it

brave fable
#

the good thing about events is they're exactly as simple or as complicated as you make them. start with nothing, add a dialogue, move a character, and keep on expanding it until it's how you like

autumn tide
brave fable
#

don't write the whole thing out all at once, since you'll have to debug the entire thing at once, rather than piece by piece.

#

make good use of patch reload mymodidgoesherekebabemoji and debug ebi myeventidgoesherepitabreademoji to quickly test and iterate on your script

urban patrol
#

oh see i embrace the chaos but that's definitely smarter

autumn tide
tender agate
#

what's the trigger for when a map changed?

#

also is there a way to check if a map is considered a 'farm' map?

lucid iron
#

you mean when player change location?

tender agate
#

yeah

lucid mulch
#

detecting a map being farm map isn't trivial, checking if its the farm location is easy

lucid iron
#

LocationChanged

#

u can just use LOCATION_NAME Here Farm yea

#

good enough in most cases

versed wyvern
uncut viper
#

is your coffee maker not furniture?

versed wyvern
#

No, it's an interactable tile in the Clinic

uncut viper
#

I'm confused where Bouncer comes into play then

lucid iron
#

mud do u want to use the mmap question dialogue thing lol

#

it's made for this kinda stuff

#

instead of betas DialogueBox shenanigans

versed wyvern
#

The tile uses DialogueBox to ask if you want to drink coffee and if you say yes it uses EatObject to eat coffee without giving you the item

uncut viper
#

Wait, Mud are you aware that you don't need to provide the name of a real NPC in the action

brave fable
#

bouncer feeds you a coffee asmr SDVitemcoffee

tender agate
#

does c# have the equivalent of 'break'?

inner harbor
brave fable
#

C# has break if that's what you want

versed wyvern
#

When I was setting it up months ago I didn't want to depart from the syntax in any way since I had no idea what I was doing henyaDerp

tender agate
#

oh it does cool

lucid mulch
#

it doesn't have the fun PHP feature of accepting a number of layers to break out of, but most languages dont have that cool feature

uncut viper
#

you can just do Spiderbuttons.BETAS_DialogueBox "Coffee Machine" <Translation Key> <Portrait Asset>

#

(or whatever the syntax is for that traction)

#

just place goto labels at every nesting and jump to them as needed SDVpufferthumbsup

ornate locust
versed wyvern
#

Yeah thank you, it seems simple enough to fix, I just didn't expect Thanosing Bouncer to cause this

ornate locust
#

and I tried to do the same thing and it didn't work at all and I have no idea why yours does and mine does not

lucid mulch
ornate locust
#

what dark coding god did you sacrifice to

uncut viper
#

i think ive used goto in two of my mods so far

lucid iron
#

i mean a goto is just a return but closer

#

i see no issue with it SDVpuffersmile

versed wyvern
#

Uhhh my memory is hazy but I think Button fixed the question thing long ago when I first brought it up?

uncut viper
#

a goto can take u forward or backward though unlike a return

#

oh i definitely didnt do anything to fix questions

#

granted i was tired at the time when looking at Midnight's json but i wasnt immediately aware of why theirs wasnt working when yours was

#

ive been under the assumptions that questions didnt work

versed wyvern
lucid mulch
#

tbh continue can also take you forward or backward depending on what its inside (while/foreach/for etc would go backwards, dowhile would go forward)

ornate locust
#

I even tried to make it the Bouncer to see if that would work

indigo totem
indigo totem
peak girder
#

sigma

versed wyvern
#

Hmm, could swear I remember a conversation from back then where I was trying to get it to work, which included trying quickquestion which doesn't work to this day

versed wyvern
ornate locust
#

I can see if I can find it in a search or something, I ended up changing it so the machine I made just jams coffee in your face. But I basically ended up making it more and more identical to your mod until it was basically Just That and it refused to work

#

just like... out of desperation LOL

#

here's where I originally posted about it

versed wyvern
#

Well that sure is bizarre

ornate locust
#

you understand my confusion

#

You have done Magic

versed wyvern
#

Because it seems to break if I change it off Bouncer

#

But you said it didn't work when you changed it to Bouncer

ornate locust
#

load-bearing bouncer. To be fair, I didn't expect the bouncer vanishing would affect anything, he might have been gone in that test save

#

I was testing some later game-ish things at the time

dusky sail
#

Obviously the solution is to change the casino unlock event so the bouncer just moves to the side instead of exploding (not a genuine suggestion)

versed wyvern
#

Oh, wait a second

#

Hmm. The oddities continue. I set both the machine and the dialogue source to Pierre and it works, but I see your example had them matching and it didn't work

ornate locust
#

Maybe it has to be an existing NPC?

versed wyvern
#

I think I remember that I used Bouncer because I planned to alter the dialogue box size for every actual resident and I wanted to avoid that happening to the coffee machine dialogue

ornate locust
#

maybe it's not working right with new NPCs or something

uncut viper
#

the game cannot tell the difference between a vanilla and modded npc

ornate locust
#

I wouldn't think, but I am otherwise out of ideas

versed wyvern
#

Well it doesn't work if I change all instances of Pierre to someone who doesn't exist

ornate locust
#

Hm

uncut viper
#

(that part is expected and why i assumed questions didnt work at all)

valid folio
#

Hi, do you think it’s possible to create a fertilizer for fruit trees to make them grow faster? I haven’t seen any mod that adds something like this, and I wanted to use some items from my mods to make it, but I don’t even know if it’s possible. I looked at the object data for the tree fertilizer, but as I expected, it didn’t give me any clues about how the item works so I could adapt it. I’m trying to create things I haven’t seen in other mods to avoid being repetitive.

uncut viper
#

(it looks for responses in the npc's dialogue. cant do it if the npc isnt real. but midnights was real, i assumed)

ornate locust
#

At the very least, the Characters/Dialog/Target was the same for both. Looking back, I think I typed her name wrong... but it was wrong in both spaces. So the NPC didn't exist, but the dialog load did

versed wyvern
#

It works with Henchman, which I suspect will also break when you give him void mayonnaise and he disappears

ornate locust
#

Maybe that was throwing me. And then I just happened to use the Bouncer to test with NPCs which also broke

lucid iron
ornate locust
#

She's just a temporary NPC too. Maybe I'll staple this onto Lewis or something

valid folio
# lucid iron C#

I feared as much; I don’t know how to program in C#, it’s going to be more complicated than I thought.

lucid iron
#

-# petitioning harder for button to just do the dialogue dict replace

versed wyvern
#

Okay yeah it breaks when Henchman ceases to exist too so I think it must be someone who exists

dusky sail
#

Maybe you have to make a coffee pot antisocial npc who "exists" so the game has someone to refer to but the npc wont be affected by any vanilla events. Just spitballin here

ornate locust
#

so questions work if it's an existing NPC, mystery probably solved

ivory plume
lucid iron
#

well i might as well do it in this PR and then move all the default logic to a json

#

originally, i actually thought it'd be a C# mod registering the background (and doing their own draws)

#

that was why there's 3 classes

valid folio
ivory plume
lucid iron
#

FruitTree.cs i guess, see how you can progress the stages

#

ah hm does that make LA dependent on content patcher blobcatgooglyblep

valid folio
lucid iron
#

!decompile

ocean sailBOT
lucid iron
#

i was gonna do this just directly in LA
e.LoadFromModFile<Dictionary<string, ThemeData>>("assets/themes.json", AssetLoadPriority.Exclusive);

valid folio
ivory plume
valid folio
# lucid iron !decompile

Tomorrow I’ll ask a friend who’s a programmer along with her husband, to see if they can guide me. I understand how to decompile the game files, but I guess I still need to know how to read the code. Anyway, thanks for pointing me in the right direction.

versed wyvern
lucid iron
#

u can do the ol invisible antisocial npc if u want

#

might not even need betas in that case, you just put em close enough to Action NPCMessage LilyDerp

versed wyvern
#

Well I need BETAS to make the player inhale coffee either way

lucid iron
#

thats true, tho u can just give the buff right NotteThink

versed wyvern
#

but muh immersions

lucid iron
#

but either way i believe you should make your own invisible npc just for this

valid folio
# ivory plume Oh yeah, I did rewrite Central Station later to do it through Content Patcher. B...

Hi, Pathoschild! How are you? I have a few questions and you can answer whenever you can, no rush. I have two mods that change the names of two fruits, but SMAPI says they aren’t updated to the correct CP version. They work fine, but I wanted to update them so that message doesn’t appear. For example, if I simply change "Format": "1.26.0" to "Format": "2.7.0", the mods stop working, so I guess there’s another way I should do it.

Link to the code:
https://smapi.io/json/content-patcher/514adb93f4ce40a2b134915e1d40d0e8

lucid mulch
#

That mod is written with 1.5 or older in mind and isn't directly compatible with 1.6
When CP sees its a version < 2.0 it is automatically migrating it for you, but once you declare its for 2.7, those migrations turn off as it assumes you are writing the mod for the current version in mind

ivory plume
valid folio
# ivory plume Hi! You'll need to apply the [migration guide](<https://github.com/Pathoschild/S...

A few days ago I took a look at it, but I didn’t understand much. I understood that CP will try to migrate automatically, and apparently it does because the mods work. I didn’t write the code myself, but it seems to me that it’s from before 1.6. I just looked at it, copied it, and that was enough for what I wanted to do. But I’ll check the second link you left because I don’t think I saw that one.

ivory plume
latent mauve
#

(probably)

valid folio
#

I’ve saved all the links you gave me; I’ll take a look at them tomorrow when I’m fresher haha.

valid folio
#

Ty guys = )

latent mauve
#

Can probably pull together a quick non-food example tomorrow.

valid folio
valid folio
latent mauve
#

So just the display names and descriptions for your fruits, Hayato?

ivory plume
#

Renaming items is even easier in 1.6 now; you don't need to edit the object data anymore, you just set the translation.

For example, here's the entry in Data/Objects for peach:

  "636": {
    "Name": "Peach",
    "DisplayName": "[LocalizedText Strings\\Objects:Peach_Name]",
    "Description": "[LocalizedText Strings\\Objects:Peach_Description]",
    "Type": "Basic",
    "Category": -79,
    "Price": 140,
    "SpriteIndex": 636,
    "Edibility": 15,
    "ContextTags": [
      "color_pink",
      "fruit_item",
      "fruit_tree_item",
      "season_summer"
    ]
  }

Note the translation key for the display name. You can just edit that key:

{
    "Action": "EditData",
    "Target": "Strings/Objects",
    "Entries": {
        "Peach_Name": "Durazno"
    }
}
valid folio
valid folio
latent mauve
valid folio
valid folio
latent mauve
#

I'll be moving everything text-wise to i18n tokens later, but for now I'm getting the last bits of the NPCs and maps taken care of. 🙂

valid folio
# latent mauve I'll be moving everything text-wise to i18n tokens later, but for now I'm gettin...

Ok, it’s just that if you want, I could start translating it into Spanish for you. It’s better to start little by little than to begin translating once the mod is already released. That’s how I did with WAG, and even so it took me almost two months haha. It all depends on how many lines there are to translate; RPB and WAG each took me that long because they had over 3,000 lines to translate.

valid folio
old quartz
#

is there a way to get what instance called the current method? i figured out how to postfix the marriagedialoguereference .ctor but it doesnt define the npc name.. i was thinking i could get that from getting the npc instance that called the .ctor but afaik there isnt really a way to do it :/

lucid mulch
#

Assuming you are in a harmony patch for a regular method you can use __instance as a parameter, but doing that in a constructor patch would likely do weird things

#

but you don't ever know the caller instance, only the class instance of what you patched

old quartz
#

yeah since i postfixed the .ctor it seems to return the .ctor instance, but beyond that im kind of lost lol

unique tusk
#

I've almost got my custom NPC correctly loading into the game but I keep getting this yellow text and I'm not sure what it means? 🤔

drowsy pewter
#

i think that it means your file isnt formatted correctly

#

which means we need to see it

#

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

gentle rose
lucid iron
#

u can do it in the postfix just fine (see p4a) but doing it in prefix is illegal

gentle rose
#

makes sense

unique tusk
brave fable
#

you have the schema set to read the file as if it's your manifest.json

latent mauve
#

How are you pulling this file into your content.json?

#

As a load? An include?

brave fable
#

schema, as in scheme, as in a plan - like blueprints

unique tusk
brave fable
#

the json parser uses a schema as a template for the expected layout and contents of your json file, so for example with a manifest schema it's going to check and make sure you have the usual manifest fields, such as UniqueID, Dependencies, Version, and ensure that they're all of the expected values, like "" strings, [] lists, or {} dictionaries

#

since your json file has none of those, being a dialogue file (or a content file above), it's throwing a fit because your file isn't a manifest file like you said it was

unique tusk
#

Wait now it says no errors found

latent mauve
#

Well, your Include files probably need to have action blocks and start with { "Changes": [ and end with a closing ] }?

brave fable
#

yep! because even though your file is a really godawful manifest file, it's a perfectly good dialogue json

latent mauve
#

But as a load it shouldn't be an issue I think?

#

I always get confused with files that only look like entries blocks, LOL

gentle rose
#

you’re Including your i18n

#

I think

gentle rose
indigo totem
#

hi! are there any resources on adding fish using content patcher?

#

im starting to put together info for working on my sea slug selebration

drowsy pewter
#

you also need to add them as an Object

urban patrol
#
Stardew Modding Wiki

Adding a new fish to the game has never been easier than in 1.6; nowadays, fish are a simple set of patches via Content Patcher. There are four required steps: you need to load sprite images, define the fish (as an item, and as a fish) and add it to locations. Optionally, you can add aquarium sprites and data, and fish pond data. I'll be using ...

indigo totem
drowsy pewter
#

that looks better

indigo totem
#

thank you both!! i appreciate it :D

turbid oak
#

I wonder if I'm ready to take on the challenge of beginning work on Pierre Hates You or if I should get more practice from micro mods.

dusky sail
#

Youll be learning along the way with either choice, so go with the one you feel more inspired by!

oblique meadow
#

Huh… so c# is just an object oriented language. Looks like there’s a lot of similarities with Java….

brave fable
#

popular consensus since C# was created is that it's legally-distinct microsoft-flavoured java

#

obviously it's developed a lot since then into its own beast, though

oblique meadow
#

Ok. Good to know. I can do Java. Always got nervous to dip my toes in c# for some reason. But… it’s not all that bad.

brave fable
#

it's a very relaxed language, a lot of conveniences and sugar, a lot of helpful libraries, easy project scaling, not much worry about memory management

oblique meadow
#

Ok. I’m going to decompile the game code and understand that. Any majorly weird nuances I should make sure I avoid otherwise I risk blowing stuff up?

indigo totem
#

I was taught c++ and c# in my middle school advanced math class, but i couldn’t really grasp it so I’ve forgotten most of it

brave fable
#

not really, go blow stuff up SDVpufferthumbsup

indigo totem
#

Hell yeah explosions

lucid mulch
brave fable
#

obviously get started with the wiki's intro to C# with the basic template mod to get the boilerplate done

#

it'll also run you through the VS2022 setup and frameworks to install

oblique meadow
#

Oh for sure. I have a pretty easy first project in mind. So I should be ok

lucid mulch
indigo totem
#

sorry for the jump in topics, but can yall pick a favorite between these two? i love them both but the fun fact for them is the same so it feels redundant and bloated to include them both: candidate one is the much beloved "leaf sheep" (Costasiella kuroshimae)! Candidate number 2 is the lovely leaf shaped "eastern emerald elysia" (elysia chlorotica)! they both absorb the chloroplasts from their algae diet into their body, giving them their green color, to perform indirect photosynthesis!

brave fable
#

ah, pants.png. my old friend

gray bear
#

not the pants

brave fable
#

is there really such a thing as never again SDVdemetriums

gray bear
#

there should be

urban patrol
#

is anyone a world map whisperer? i'm getting a bug where i presumably go "out of bounds" and the world map spits out that i'm on the farm instead of the docks. here are two different tile positions i stand in and the corresponding map display

#

(good, desired)

#

(bad, undesired)

uncut viper
#

is your TileArea big enough

urban patrol
#

the tile area i defined was the width of the dock itself; should it be the width of the whole map?

uncut viper
#

does the map start at the very left edge of the dock?

urban patrol
#

yep

uncut viper
#

a quick count seems like the dock is 45 tiles wide

#

but your TileArea lists 44

urban patrol
#

did i do bad math 🤦

uncut viper
#

it may be x44, but thats the 45th tile

#

bc the first tile is 0

urban patrol
#

damn 0 index

#

ok let me try it with 45

uncut viper
#

that said you could also just remove TileArea completely and it defaults to the whole map if you wanted

#

if the map is just the dock im not sure there's good reason to not do that but idk map intricacies

urban patrol
#

what about the ~ 6 ocean tiles? do i need to worry about including/not including them

uncut viper
#

the TileArea just means "if the player is in this rectangle, they are considered in this zone on the worldmap"

#

so if the player somehow walks on the water i would think they should still show in that zone

urban patrol
#

zone being the pixelarea?

uncut viper
#

probably maybe

urban patrol
#

okay removing the tile area entirely worked and is close enough

#

idrc about a few pixels

#

thanks!

#

lmao i still got things to fix, going inside the cannery shows me as being in the blue boat

#

probably because the exterior is short and fat, but the interior is long and skinny, i'm guessing

uncut viper
#

your guess is as good as mine. i didnt know what i just told you about TileArea until 5 minutes ago

urban patrol
#

and yet it worked!

#

i'll play around with it

uncut viper
#

being a C#er is an inherent buff to being able to quickly learn your modding blind spots by looking at the decompile 😌

urban patrol
#

i wish i could read (this is kind of a joke but also not, trying to read C# is like reading hungarian to me)

indigo totem
brave fable
#

you mention a shindig. perchance a rodeo

urban patrol
#

"TargetField": [ "Valley", "MapAreas", "Mountain", "Tooltips" ],
is this the correct way to target field or can i not do this? i want to add information about one new house in the mountain area

#

picture is unpacked data

uncut viper
#

looks correct to me

urban patrol
#

woohoo!

#

thanks

gray bear
#

so im like, staring at dialogue again, is there a way to make an npc say something different depending on the season? i know there's $d but it doesn't seem to account for season? maybe i can use a query

the gist is i want my child to mention which fish they wanna see at the beach depending on what season is it

#

oh wait query only checks between 2 condition sweats maybe i should just set dialouge keys for the seasons

#

ok, new question. do dialogue cmds have a random item from a list (i know there's [<id>+] but that gives a player an item, i want the npc to just mention it)

indigo totem
#

this might be a terrible idea but heres where my brain went:
make a dynamictoken for fish, have it pick a random fish based on season with each season having a list to pick from, and then put the token in the phrase you want it (i dont know if you can put tokens in dialogue which is why i say it might be a bad idea)

gray bear
#

dialouge accepts token

#

my idea was just using a random token, since i already split them off to different seasons

#

now to figure out seasonal fishes lmao

#

how to refrence a display name without typing it out thonk

uncut viper
#

[ItemName] tokenizable string

gray bear
#

do i need all this or just the objects:+ part?

#

or is this not the right string??

#

oh ok found the wiki page. PThumbs

#

random token go brr

uncut viper
#

[ItemName {{Random: ...}}] I suggest this

gray bear
#

[ItemName {{Random:(O)128,(O)138}}]
like this you mean?

#

oh i don't need that extra square bracket

brave fable
#

i knew pants was cursed but i didn't think it was contagious. my border ruler.... is pants..

gray bear
#

what is this 👀

brave fable
#

Pants (pants)

gray bear
#

pant

hard fern
#

Mmm pants

brave fable
#

and at this single critical moment i realise i started with the shorter female pants first, because i named it male for some reason

#

ah yes a.. tll \ sprites are wrong

#

mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm

scenic pecan
#

Does anybody know

#

how to look at game events

brave fable
#

you mean read the actual script, or view them ingame?

scenic pecan
#

the scripts

brave fable
#

!unpack the game assets if you haven't done so already:

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!

brave fable
#

then you can look in Data/Events to find allllllll the different event scripts

scenic pecan
#

thank you

brave fable
#

they're pretty unintelligible if you don't know what all the event commands and preconditions mean, so feel free to ask for more help when you run into them

scenic pecan
#

do you know that?

brave fable
#

i'm guessing you want an event to start when you harvest a particular crop?

scenic pecan
#

it depends

#

is monsters spawning

#

an event?

#

if so, yse

brave fable
#

oh no, that wouldn't be an event, events are cutscenes specifically

scenic pecan
#

but i want it to happen to any crop

drowsy pewter
#

Are you making a C# or CP mod

scenic pecan
#

C#

drowsy pewter
#

Ah I cant help

brave fable
#

have you decompiled the game code SDVdemetriums

scenic pecan
#

No

brave fable
#

do you have any C# experience?

#

this doesn't look like something possible without some slightly advanced techniques

scenic pecan
#

No

scenic pecan
brave fable
#

unless someone knows a Trigger Action for spawning monsters

drowsy pewter
#

I was going to suggest spacecore and betas

brave fable
#

BETAS has a trigger for crops harvested, but i don't know of a trigger action to spawn monsters?

drowsy pewter
#

Let me double check what I was thinking of in spacecore

gentle rose
brave fable
#

in practice even the non-trigger-to-trigger-action method is quite simple, but it takes a little understanding before you can make it work

drowsy pewter
#

Okay I was thinking of spacecore setpieces, but they wont spawn until you leave and reenter a location

brave fable
#

ah

#

C# it is then lol

drowsy pewter
#

But you can put a monster in a setpiece and spawn it with a trigger action other than that

brave fable
#

so your constant codebase companion and almanac of all available options will be the decompiled game code

#

!decompile @scenic pecan

ocean sailBOT
scenic pecan
brave fable
#

when decompiled, it'll spit out a non-runnable non-debuggable but still readable C# solution with a rough reproduction of the game code

#

the only way you'll be able to find a way of writing a solution is by working out how the game works, usually by searching relevant keywords and following breadcrumbs to a reasonable entry point

#

and unfortunately i've already blown my c# onboarding willpower last week so learning the language features is up to you

scenic pecan
#

What does it mean to decompile

gentle rose
brave fable
#

the game code is kept in a DLL file (dynamically-linked library), which is non-human-readable compiled C# code

scenic pecan
#

IlSpy lets me read it?

brave fable
#

a decompiler is a program that tries to reverse-engineer that into something human-readable and vaguely functional

scenic pecan
#

Okay

brave fable
#

ILSpy is the best one for the job

scenic pecan
#

Do you want me to use the search tool

#

and type out things that could find me the "crop.harvested."?

brave fable
#

it's best if you save it as a project by following the decompile guide

#

ilspy is useful, but not very usable

#

you'll want to look over the code in an actual development environment, like visual studio community 2022

gentle rose
#

(or rider)

brave fable
#

and yep, there's a whole bunch of installing and downloading and setup involved before you can even begin to think about writing a C# mod

#

again, refer to the guide on the wiki for that

scenic pecan
#

Do you know what "always qualify member references" means?

gentle rose
#

unrelated, but whatcha working on currently with farmer pants, blueberry?

brave fable
# scenic pecan Do you know what "always qualify member references" means?

a qualified reference is one that specifies where it comes from, so the current instance of the containing class would be this.MyVariable, a static reference of a given class would use the name of that class, such as ModEntry.MyStaticVariable, and a local instance can't be qualified since it isn't a member of any instance or type

#

i'm guessing you've just bumped into this in the ilspy preferences or somesuch, it's not particularly important. you may as well check the box because it's clearer what's being referenced

gray bear
#

oh my god

drowsy pewter
#

Oh

brave fable
#

i mean how else would you describe a yukata

velvet narwhal
#

you're not wrong...... but i'm not gonna say you're right........

brave fable
#

pants once again spreading disease to the ruler

hard fern
#

Im scared

#

Im so scared of pants

dusky sail
#

👖 BOO

scenic pecan
#

When I try saving, i only get "StardewValley" out, nothing else. is that normal?

brave fable
#

did you open StardewValley.DLL?

#

if you chose the EXE, you chose wrong, and fell for the oldest trick in the book

scenic pecan
#

Yeah its probably the DLL

scenic pecan
#

but i think this one is the DLL

brave fable
#

if you chose the DLL, you'd get something like this:

scenic pecan
#

Yeah

#

Do you want me to save this?

brave fable
#

now with the output set to C# at the top-centre, right-click and use save code to make a C# project

scenic pecan
#

I think I did that

#

should I go in to "StardewValley.cs"?

brave fable
#

it shouldn't have made a single CS file

scenic pecan
#

it has made a bunch of stuff

brave fable
#

you should be using this value when you save:

scenic pecan
#

i guess im asking what do i do with this