#making-mods-general
1 messages · Page 415 of 1
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
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
Code auditing 
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
It's ok i understand that people probably find my code peculiar too
I can also take a glance
I'm strange in a different way to chu, maybe we'll balance out
sold
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
i added some quick annotations
and thank you very much
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
but I thought this way might make if flexible for mods that edit the spouse room tmx
or is that unnecessarily complicated?
I'm not sure if this will work with poly mods if they have someone else's spouse room
GameLocation.RegisterTileAction
Well you don't have to erase the whole tmx or anything
Just add 1 tile property Action at Buildings level
and I'm really not sure how well this will work in multiplayer, have you tested that?
This mod generally won't work with poly mods because it's checking a single spouse 
i tried to host two instances of sdv and test it but it didnt work (I blame stardrop)
do they not just extend HasNpcSpouseOrRoommate?
I haven't delved into their code tbh
why not try split screen mp?
Not that I know of, but you can just use the api if you really want to support it
anyway I'll take another look in a sec in an actual ide, I need my syntax highlighting 
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
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
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
oh dw that happens, are you on a playstation controller?
xbox 360
three horizontal lines
that should be the little one to the right of the Xbox logo I think
it might be labelled start?
lemme try it again
or it might be the back button (other side of the logo)
I remember you having quite a time detecting the frogs but since it turns out the froges are a special class do u actually need to check all the other stuff
I wonder if this is sufficient
int frogeCount = farmhouseLocation.TemporarySprites.Count((tas) => tas is SebsFrogs);
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
what do you mean with other stuff?
Checking for precise frog frames i mean
I also had the problem in earlier builds that suddently the interaction and croaking and stuff worked but the tank became passable
Is there a way to clear objects spawned on a map for an event? Like shells on the beach, for example
The secrions labeled desperate logic to detect frog
I have an item placed in the event but a foreagable spawned in the same spot
but sebs frogs is just handling the animation, right?
the frog spawning happens in farmhouse
You just want to know how many sebsfrogs entities are in the farmhouse right
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)
Actually just figured it out, changeToTemporaryMap rather than changeLocation did the trick
unironically i spent the literal night on it
can anyone explain in simple terms (because of my smol brain) how to make this give me water please
LMAO
No idea personally, but maybe it's worth looking into how the well does it?
is that a map? not a building?
i believe it's just something i have to input into tiled but i have no clue
tiledata, check the vanilla greenhouse map
it is a map! i should've explained 
and you can copy the tiledata directly fom the greenhouse map
Back layer Water T tiledata
ooh, thank you! this is what i had, it was just on the wrong layer i believe
ahh and it also works for multiplayer if the farmhand married sebastian!
Oh right there's too muvh water in this game
YESS thank you! it works!
I have no idea what one water is vs another 😔
tiled is so complicated
what. is. this. mod.
That is so cute what is thisssss

i'm fiddling around with a farm map, you're just looking at something that can refill my watering can 
ohhh okayy
fishiessss : D
finally added their aquarium sprite
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?
You can register 1 tile action, but yes you need to add it to 2 tiles (or more)
I dont think I understand that - maybe on a semantic level
(but english isnt my first language)
Since u be in C# anyways you can just use the set map tile helpers
By register, I mean calling this (with appropriate args) in your Entry
GameLocation.RegisterTileAction(actionname, actioncallback)
You can do froge logic in the callback, trusting that you don't need to check the bounds
To make use of this registered tile action, it must be added to the map
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
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?
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
ok but action doesnt necessarily mean "the player makes an active action/interaction"
right?
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
i have been reading this, but I am confused as to if custom properties can be added?
This is how you can add a custom Action
Could name it like "camiska.Froggos_CheckSebsFrogs"
Here's a example from my mod
Game will call this when player interact with tile https://github.com/Mushymato/LivestockBazaar/blob/main/LivestockBazaar/OpenBazaar.cs#L138
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
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)
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
#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
Ok obrigada viu
Do you think it looks like a ribbon eel? I keep thinking I did a bad job 😭
Just getting opinions
I love them
aww tyy
though maybe it needs an aa darker blue pixel in the throat area
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
I personally prefer these over the first version
same
@soft lance You leveled up to Cowpoke. You can now speak in our voice channels and share images in all channels!
or is the lighter blue in the throat area tryin to symbolize the lower jaw?
no it was quite literally a mistake on my end haha
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)
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

no this looks really nice right now as it is! I was just wondering if it matches the rest
Here it is with some proper shading and fixes
at least i think lol
precious baby
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
i love ur banner btwww
thanks!
New quote added by chu2.718281828459045235360287471 as #6619 (https://discordapp.com/channels/137344473976799233/156109690059751424/1412792900151935057)
is maybe a harmony postfix a good idea? so I can spawn them on command and have the whole thing be easily applicable to custom tanks?
We call that Patient Zero
Uh this bit is just to count how many SebsFrogs have spawned
yeah but that got me thinking
You want to add SebsFrogs to like sciencehouse?
one person notices tortilla centering, MADNESS ENSUES
Doing that on the smapi Warp event should be enough, don't need to harmony imo
to any custom tile location that is 3x3
Yeah u can make people put a map property like
tortilla goes brrr. tortilla farm map when
camiska.SebFroggos_FrogPosition
can smapi warp also adjust the odds? because currently it is only 85% for the first frog
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
thanks!
this was my biggest worry the whole time
haha
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)
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
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
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
pseudocode is just "wanna-be" code, its like when your brainstorming an idea for a sprite or artwork of yours, and you make a sketch of it, that sketch is essentialy pseudocode, its not a true coding language, and it can't run, but it's a mockup of what you essentialy want
ah ok so just simpler terms for complex operations
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
and therefore predefined classes by someone who wanted other to have a nicer and easier time?
its just a sketch for what you want your code to kinda look like or do
its not even needed in coding, it never will reach your code
its just a sketch for yourself
ah ok!
Yeah, pretty close to what it kinda is, its yourself giving..well...yourself instructions on what to do
thats quite literally what it is
but of course, the instructions is just in general, its not in a specific coding language
that is nice
(if u don't wish to summon me here you can press the "@ On" to turn it off)
i usually just did annotations
does this look like a sensible approach for a harmony postfix?
https://pastebin.com/C1mMztBY
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
Who said I didn't intend to summon you?
Who said that the moon must be aligned for this day?
Where has thou-
Nah I was just agreeing with you lol nothing else
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
You do not need a harmony postfix to do this
Also thank you all, especially you chu, for bearing with me through all of this
I hate it when no one has the notification when they reply to me or else I forget, but yeah, if I remember then I'll turn it off just for you
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 
I'm not upset about it dw, it's just that i usually interpret a ping as something that needs my response
Some people are upset about it which is why you have those names
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™)
Thanks! My husband has just finished cooking, so I’ll look into it later!
What'd he cook? 👀
I thinks it’s chimichanga?
GIVE. Lol go eat, and enjoy! That sounds very good
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
I understand, sometimes it is annoying, I'll turn it off for some that want it, though don't expect everyone to follow the same thing, since it's the default discord option
Oh hmm..cheese crust?
Ohh yeah it prob is
I haven't had it in years so it prob is
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
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?
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).
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
if it's Cooking it might be universal like
it's not mentioned in the exception to prolly
but [[Tortilla]] pierre already hates them it seems

id admit i know it's possible to change how an npc reacts to a certain item, but not the how
it's not too difficult but you have to know how to wield TextOperations
i don't
like i managed to change it to a universal love, but how do i make it so they say something special
that’s handled in dialogue
oh, i see what you mean
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)
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
-# this is the sort of thing that makes content modders yearn for the foreach
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
when i do patch summary asset it splits up the output into one section for each content pack
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
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.
we clearly needs SQL syntax trust
pretty hecking easy
see the link selph sent
(you know what I really want now? regex key matching)
you just need to add a single dialouge key to tortilla, make sure you use the item for it (it's 229 i think)
yes i did memorize the tortilla ID
spring_\d\d? and summer_[MTWFS][a-z]{2} when
regex matching would be fantastic for content packs, chaos for sure, but very useful
until someones mod matches when you dont want it too
Thanks. I can't wait to get started on this. I hope I have an easier time than my very first mod.
Chu you absolute Yoba send
since you've already made one it should be easier
but what about dialogue keys 
Make it a config then, rather than a new version
Dialogue should just accept GSQ :)
(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
)
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"
}
}
}
}
]
}```
Still a great mod though.
uhm, how did you come by code? why is there a when?
i've many questions
I have no idea what I'm doing is the answer
!unpack did you do this?
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!
Yes but haven't explored it a lot. I will now.
do that and then look into "content (unpacked) -> characters -> dialouge" should help find the target
Thank you!
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
Should the intitial action be "EditData" or "EditCharacter"?
the second one, doesn't exist.
see https://github.com/Pathoschild/StardewMods/blob/develop/ContentPatcher/docs/author-guide.md#actions
Thanks
had anyone implemented a way to make bigger sprites for NPCs in the game?
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
it'd be entries and not fields
Thanks
i'd also rec to make the value itself i18n instead of static, y'know, for the tortilla translators
but yeah that is correct
How do I do that?
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"
fields would work just as well here
i never know the difference
after reading the docs im not sure what that difference is
Done. Should the "Default" file be blank or contain something?
I just noticed your link
I am very confused
Wait, will it contain a copy of my Content?
no, it will contain your content
So I'll use that instead of Content.json?
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
yay
it’s (O) not (0)
oh, right. what nic said
"Format": "2.8.0",
"Changes": [
{"Action": "EditData",
"Target": "Character\Dialogue\Pierre",
"Entries": {
"AcceptGift_(0)229": "{{i18n:NAME-OF-VALUE}}$5"
}
}
]
}```
O stands for object
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 - ~~
Thanks. So what do I put in the i18n file besides the text?
Will it be called a string?
I already have that open and am still confused
can you be more specific?
I am confused what is going in the i18n file for a string of dialogue
can you screenshot what you have right now? what exactly do you him to say
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
its just a key/value dictionary
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"
}```
Thank you so much!
i need to go to bed, so can't help anymore. good luck with ur mod!
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.
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?
no like, the dialogue key not the dialogue
the spring_Mon bit etc
I know it would be C#...
oh I see
but I want the regex so we can override all the existing dialogue, not make fallback dialogue 
C# unless you get someone to make a fair games framework for you
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.
I want to have a way to make Abigail exclusively say lorem ipsum text with a single patch 
is your mod content patcher or c#?
Content Patcher
can you send your json here with the json validator so we can have a look?
!json
rip governor
What's the json validator?
uh iirc it's https://smapi.io/json
that command was supposed to bring up the explanation and link but governor is sleeping on the job 
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??
krobus' language?
I thought only the dwarves had a custom language
and it's definitely not Welsh, it's a simple substitution cypher iirc
Well given that Fair Games Framework seems like a lot of work, I guess im learning C#
Thanks Chu
oh there's also the language in the cavern and the junimo language, but those are also cyphers
(I know, just thought the possibility of the immigration was funny)
"Format": "2.8.0",
"Changes": [
{"Action": "EditData",
"Target": "Character\Dialogue\Pierre",
"Entries": {
"AcceptGift_(0)229": "{{i18n:"Pierre.Tortilla.Reaction"}}$5"
}
}
]
}```
It's really not, you just gotta dehardcode the calls to various fair minigames
I'm just confused what you're talking about for a krobus language
did you see my message above? it’s (O) not (0)
Thanks! I must have missed it.
i just realized my other message accidentally replied to bea’s messages instead
oh probably just a spam thing based on SEO I'm guessing
that's the result for "stardew Valley Welsh language" and yeah unrelated spam
just found it funny
Krobus is shockingly fluent in english the common language in stardew valley
He learned so that he can read books about yoba (probably)
Then again can krobus read?
Well, I fixed that but the mod still doesn't work
I have no idea what I did wrong
What does your manifest file look like?
!json
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.
"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"
}
}```
ooooohhhh. Thanks!
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
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?
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 ?
you don’t need the quotes inside the quotes
Which quotes?
I am once again attempting a custom NPC... Where did I mess up this time? 😭
https://smapi.io/json/manifest/1149109bd40b49d2979b1958f9d497e6
just "{{i18n:Pierre.Tortilla.Reaction}}$5"
Thanks
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
Yay, no errors this time!
stray closing ] on line 5
you closed your burger too early and the guts are spilling out
= 🏴 confimed
(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)
#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
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)
TY SM but also this is the funniest way somebody has explained coding to me
that’s what your i18n file should look like. is it like that
It looks like what I just showed you but with the actual rant
found the issue
the target should be Characters/Dialogue/Pierre
oh wait wrong person to ping
Ohhh, thank you so much!
Sneaky S
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
the $5 probably, I don’t think Pierre has more than 4 portraits
Remember those start at 0 too
he has 5 but yeah, start at 0
I switched it to $a
That also works
to see if that changes it
but yeah if you want his fifth portrait, it's $4
Thanks. Just saw this. Is it angry?
I don't know Pierre's portrait sheet actually. I just know they all start at 0
I found the sheet. Looks like I actually want $3
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
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
what happens if you try putting the portrait command inside the i18n entry
mind sharing what your i18n entry parses to?
Trying that now
It contains a funny rant I don't want to spoil. It works, It's just the portrait part that hasn't been.
Fair enough, was mainly wondering if the syntax was causing an issue with how it parsed.
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)
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.
"Pierre.Tortilla.Reaction": "(the rant)$3"
}```
I just added the $3 to this
waiting to see if it works
IT WORKS!
Thank you all
congrats!!!!!
im also new to this so i cant give advice but ive been watching the progress the whole time :D !!
Thanks. Hope it's been exciting.
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?
(genuine question) why not create a new save yourself? it doesn't take long
New save highly recommended I create and destroy a dozen timelines every week
chu thanos confirmed? /j
I created a new save and Pierre is still missing from the social tab. This means either it takes effect regardless of if you are a Joja member, or it takes effect regardless. I really don't want to delete my Joja save to find out if the latter is the case. That's why I need someone with no Joja saves to tell me if it takes effect.
save data is partitioned off per each save, so you don't need to delete other saves or anything
other saves don't impact your current save
if it doesn't work in a new save, then something is wrong
(this sounds like such an obvious statement but ykwim)
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.
are you sure the flag you're using is correct? I can't remember the syntax tbh
"Format": "2.8.0",
"Changes": [
{"Action": "EditData",
"Target": "Data/Characters",
"Fields": {
"Pierre": {
"CanSocialize": "false"
},
"When": {
"HasFlag": "jojaMember"
}
}
}
]
}```
is it required to use contains when you want true?
no
This is ok I think, need to check the flag tho
can you check what happens when you go talk to him?
sure, hold on
anyone tried out to make some new bundles with the the unlockable bundles mod ?
He talks (the mod doesn't affect that), but his intro dialogue is skipped. You can't give him a gift and he still doesn't appear on the social tab. This is what the mod is supposed to do, but only if you're a Joja member.
is this your only patch to his Data/Characters entry?
can you do a patch summary on Data/Characters please?
Yup. I'm brand new to modding and this is all I did so far. Or do you mean could I have another mod I installed meddling with this?
How do I do that?
Type patch summary "Data/Characters" into the SMAPI console window
actually, lemme doublecheck that that you don't need asset in there before Data/Characters
should it be "Data/Characters/Pierre"? Otherwise it will bring up patches on everyone.
Data/Characters/Pierre is not a file that exists
thanks
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
There is yellow text about the mod in my console. Maybe that's why it's not working
it says:
!log
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:
- Open this page: smapi.io/log.
- Follow the instructions at the top of the page to upload the log file. (Don't copy & paste from the console window!)
- 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.
Just upload it to there. 🙂
"[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
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!)
it's also why putting it in the validator helps so much because the shared link would have made that way easier to see.
Hate it when I check mod files (when the mod itself is super nice an stuff) and THEN I see the formatting- 😭😭
Now move your comma to the } before When
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
did you test on a new save
Yes. He still doesn't exist on the social tab.
and did you patch reload/restart the game after saving that latest version of the mod
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
I had the game closed and reopened it. What is patch reload?
!reload
- 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 theConfigSchemaorDynamicTokensections if you use them). - Translation files: enter
reload_i18nin the SMAPI console window. If it's for a Content Patcher pack, also runpatch reloadafterwards. - C#: see the Visual Studio hot reload or Rider hot reload feature.
it's quicker than booting up the game each time
Are there any errors in your console now?
I still get that same yellow one
did you do that patch summary in the end?
What's that?
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.
the thing I asked you to do earlier, that Lily explained how to do?
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
Oh yeah, sorry I didn't think I had to
and be sure to upload your log file to the log site, using the instructions on the site. copy/paste won't work
please do what nic just said
I will
https://smapi.io/log/49e7af9660344605a9ea01c9dc43ce22?Levels=warn~error~alert~critical What could be this error? I'm trying to learn from another mod but i dont get why the code i have pasted for debug (it's the same from the mod page) doesnt work
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
What am I looking for in the log? Do I paste the whole thing there?
follow the instructions on the page at smapi.io/log to upload the file, do not copy/paste
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
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
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.
I saved it again. It's still showing the same yellow message
make sure you're saving it in the correct folder, not in any other location
make absolutely sure you are saving to your mods folder insideC:\Program Files (x86)\Steam\steamapps\common\Stardew Valley\Mods
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
I went to go work on more pixel art and got flavorblasted by “some of these things are not like the others”
It works how it's supposed to now!
yay!
Now to figure out how to update the mod I uploaded.
I can't figure out how to update it
never mind
Beat me to it, I was just about to write how
No theyre all the same because theyre all beautiful
It's updated!
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
Wow i never knew
-# (Icon should be blueberry's profile pic)
The whole tortilla frenzy is still going strong I see
its not a frenzy its a lifestyle </3
I contributed with tortillanimos
oh i should cheeto myself before i get scared again
not yet
youve found a gap in the market
I just had surgery so someone else will have to fill that gap
has anyone made tortilla chips
don't forget to have the tortilla be able to be combined with every butter mod
Exotic butters
i don't know how to make mods. can some1 pls make a tortilla rug. thank
mod that requires ALL the butter variants for a recipe to make the Ultimate Butter
!modideas
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.
I actually did want to make a tortilla rug but I think I need to stop
hm.. cornucopia does need more furniture..
Does Cornucopia have a decorative cornucopia?
yup
pleasing
when you think about it, a cornucopia is really just a burrito
True...
Burritocopia
if not related to tortillas (made of corn) then why is it called corn ucopia
Could someone explain to me where I fucked up please? ;v;
https://smapi.io/json/manifest/355f487aaeb24310b27f7195c78c8042
all of your patches need to be within the changes list [ ]
Probably a missing { or }
you've closed it out too early
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
!json
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.
thats also just not inside of any patch
(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
you are correct of course, it's not inside the patch
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?
You shouldn't just copy paste it without knowing where it goes 🤔
So, you're interested in creating a new character for Stardew? Good news: with version 1.6, creating a character is easier and allows for more flexibility than ever. However, NPCs are one of the more complicated things to create for Stardew, as they have a LOT of moving parts. This guide aims to provide...
That has the Home bit under data/Characters, yeah
Maybe we could add compatibility with butterfish from sve and combine it with sugar to make those sugar tortilla snacks
Yeah thats hilarious
mmmmm do i work on outfits, start to draw sea slug sprites, or actually play the damn game
decisions
Second vote for sea slugs, they're cool
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 
is Helper.Events.GameLoop.TimeChanged triggered when you wake up?
one sec i got a document with my stuff
Kroby/Dwarf reconciliation pt. 1, after Lemur’s last smoluanu sewer flood event Krobus tries to give dwarf a helm Krobus found, but freaks out entering the mines due to trauma. Dwarf thinks it’s a trick and gets angry, but sees Krobus outside having a panic attack and realizes that Krobus wanted...
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? 
Turns out that my coffee machine mod which I set to use the Bouncer to deliver the dialogue stops working after blowing him up
what a terrifying thing youve done
oh crap that's permanent-
i believe it's cus Game1.getCharacterByName helper looks for the character in the world
and thats what BETAS uses
it's easy to feel discouraged when doing events, but keep at it! i highly recommend having the list of event commands up side by side with your code so you can find exactly what you need to make your vision happen
why was the coffee machine named Bouncer,
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
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
got it, I actually haven't even implemented any of my stuff yet soooo 
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
oh see i embrace the chaos but that's definitely smarter
literally my life motto-
what's the trigger for when a map changed?
also is there a way to check if a map is considered a 'farm' map?
you mean when player change location?
yeah
detecting a map being farm map isn't trivial, checking if its the farm location is easy
LocationChanged
u can just use LOCATION_NAME Here Farm yea
good enough in most cases
I just chose him on a whim since it seemed like very few other things would ever touch him 
is your coffee maker not furniture?
No, it's an interactable tile in the Clinic
I'm confused where Bouncer comes into play then
mud do u want to use the mmap question dialogue thing lol
it's made for this kinda stuff
instead of betas DialogueBox shenanigans
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
Wait, Mud are you aware that you don't need to provide the name of a real NPC in the action
bouncer feeds you a coffee asmr 
does c# have the equivalent of 'break'?
Haha, I (almost) always write the whole thing first! In my early days this led to massive debugging processes. Now I can sometimes get it to play from beginning to end without crashing once. (Although they do sometimes walk in the wrong direction or face the incorrect way)
C# has break if that's what you want
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 
oh it does cool
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
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 
So I have questions about that machine, because apparently that BETAS dialog box is not supposed to WORK with questions
Yeah thank you, it seems simple enough to fix, I just didn't expect Thanosing Bouncer to cause this
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
which is unironically the correct solution but people look at you funny if you use them
what dark coding god did you sacrifice to
i think ive used goto in two of my mods so far
Uhhh my memory is hazy but I think Button fixed the question thing long ago when I first brought it up?
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

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)
I even tried to make it the Bouncer to see if that would work
do you have a favorite? id love to learn about a species i dont know about :D
same to you :D
sigma
https://en.wikipedia.org/wiki/File:Chelidonura_varians.jpg I love these guys
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
Could you show me what you tried?
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
Because it seems to break if I change it off Bouncer
But you said it didn't work when you changed it to Bouncer
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
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)
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
Maybe it has to be an existing NPC?
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
maybe it's not working right with new NPCs or something
the game cannot tell the difference between a vanilla and modded npc
I wouldn't think, but I am otherwise out of ideas
Well it doesn't work if I change all instances of Pierre to someone who doesn't exist
Hm
(that part is expected and why i assumed questions didnt work at all)
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.
(it looks for responses in the npc's dialogue. cant do it if the npc isnt real. but midnights was real, i assumed)
C#
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
It works with Henchman, which I suspect will also break when you give him void mayonnaise and he disappears
Maybe that was throwing me. And then I just happened to use the Bouncer to test with NPCs which also broke
@ivory plume hi i am addressing comment on https://github.com/Pathoschild/StardewMods/pull/1151
did we want to let content packs edit the lookup anything theme?
She's just a temporary NPC too. Maybe I'll staple this onto Lewis or something
I feared as much; I don’t know how to program in C#, it’s going to be more complicated than I thought.
-# petitioning harder for button to just do the dialogue dict replace
Okay yeah it breaks when Henchman ceases to exist too so I think it must be someone who exists
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
so questions work if it's an existing NPC, mystery probably solved
Eventually yes, I think ideally other content packs could register their own theme. It probably wouldn't be in this PR though, we just need to set it up in a way where we can do that in the future.
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
Any hints on where I should start looking?
If you want to do it, I suggest looking at how Central Station sets up its assets with the initial data; I'd probably do something similar here.
FruitTree.cs i guess, see how you can progress the stages
ah hm does that make LA dependent on content patcher 
Ok, any idea where that file is? I don’t want to give up without trying haha.
!decompile
If you want to make SMAPI mods with C#, one important resource is decompiling the game to read the game code. Here's how to do it: https://stardewvalleywiki.com/Modding:Modder_Guide/Get_Started#How_do_I_decompile_the_game_code.3F
i was gonna do this just directly in LA
e.LoadFromModFile<Dictionary<string, ThemeData>>("assets/themes.json", AssetLoadPriority.Exclusive);
I see, ty
Oh yeah, I did rewrite Central Station later to do it through Content Patcher. But basically yeah, that's what I had in mind; Lookup Anything would register a Load to provide the initial data (whether directly or by reading it from a JSON file), which content packs could then edit.
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.
And I tried it with SVE'S Sophia just now and it also works so it should work the same with modded characters 
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 
Well I need BETAS to make the player inhale coffee either way
thats true, tho u can just give the buff right 
but muh immersions
but either way i believe you should make your own invisible npc just for this
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
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
Hi! You'll need to apply the migration guide to update the content pack for newer changes. If the content pack was created before Stardew Valley 1.6, you may need to apply the Stardew Valley 1.6 migration guide too (e.g. that JSON will need to use the new object format).
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.
(We should probably add some examples to Modding:Objects.)
(probably)
I’ve saved all the links you gave me; I’ll take a look at them tomorrow when I’m fresher haha.
Please haha
Here's my Lon Lon Milk object code if anyone wants that for an example: https://smapi.io/json/content-patcher/07b03c8e63fe41149f1343d6b72fe4d1
Can probably pull together a quick non-food example tomorrow.
But that’s for adding a new item as far as I can see; I know how to do that. My idea is just to rename some fruits for localization purposes.
(Anyway, I'm going to copy that code, you can never have too much, they say haha)
So just the display names and descriptions for your fruits, Hayato?
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"
}
}
I just want to change the name of Fresa (Strawvbeey) to Frutilla, and Melocotón (Peach) to Durazno, nothing else haha. I can do it currently, but I want to update the code. One question: is that milk from one of your mods? Is it published? Can I see it?
Ooooh I see
Now I understand why simply changing the version didn’t work.
it's part of my in-progress Legend of Zelda NPC Overhaul mod, it is not yet released.
Oh, have you already started working on the default.json?
Thanks, Pathoschild = ) you saved my life again haha
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. 🙂
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.
Thaaank youuu, it worked perfectly!
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 :/
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
yeah since i postfixed the .ctor it seems to return the .ctor instance, but beyond that im kind of lost lol
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? 🤔
i think that it means your file isnt formatted correctly
which means we need to see it
!json
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.
would it? this seems to imply it should work relatively fine
u can do it in the postfix just fine (see p4a) but doing it in prefix is illegal
makes sense
It's been nearly an hour and I'M STILL STUCK ON WHAT CHANGES IT WANTS FROM ME 
you have the schema set to read the file as if it's your manifest.json
you can change the schema above your actual json content:
https://smapi.io/json/none/3ca42d7a7c7041a597e2dc81f8f43e4a
What's a schema??? 
schema, as in scheme, as in a plan - like blueprints
This is my content json ksdhjksadg
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
OOOOHHHH
Wait now it says no errors found

Well, your Include files probably need to have action blocks and start with { "Changes": [ and end with a closing ] }?
yep! because even though your file is a really godawful manifest file, it's a perfectly good dialogue json
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
you’re both including and loading the same file, which should never be a thing
hi! are there any resources on adding fish using content patcher?
im starting to put together info for working on my sea slug selebration
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 ...
nod nod, thank you for pointing that out
that looks better
thank you both!! i appreciate it :D
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.
Youll be learning along the way with either choice, so go with the one you feel more inspired by!
Huh… so c# is just an object oriented language. Looks like there’s a lot of similarities with Java….
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
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.
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
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?
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
not really, go blow stuff up 
Hell yeah explosions
For added context, Microsoft did have a JVM implementation, along with J++ but got sued by then Sun microsystems and settled, and around that time was when .NET sprung up
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
Oh for sure. I have a pretty easy first project in mind. So I should be ok
For added fuel to that linkage, Anders Hejlsberg worked on J++ prior to being lead architect on C# and then jumping over to Typescript
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!
ah, pants.png. my old friend
not the pants
is there really such a thing as never again 
there should be
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)
here's my world map json and my world map png https://smapi.io/json/content-patcher/33c49ec2fcce411d8054667ff2394b88
is your TileArea big enough
the tile area i defined was the width of the dock itself; should it be the width of the whole map?
does the map start at the very left edge of the dock?
did i do bad math 🤦
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
what about the ~ 6 ocean tiles? do i need to worry about including/not including them
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
zone being the pixelarea?
probably maybe
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
your guess is as good as mine. i didnt know what i just told you about TileArea until 5 minutes ago
being a C#er is an inherent buff to being able to quickly learn your modding blind spots by looking at the decompile 😌
i wish i could read (this is kind of a joke but also not, trying to read C# is like reading hungarian to me)
i have heard the people's opinions, and we have gotten our winner. leaf sheep will be the photosynthesizing slug in the sea slug shindig
you mention a shindig. perchance a rodeo
"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
looks correct to me
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
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)
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)
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 
[ItemName] tokenizable string
do i need all this or just the objects:+ part?
or is this not the right string??
oh ok found the wiki page. 
random token go brr
[ItemName {{Random: ...}}] I suggest this
[ItemName {{Random:(O)128,(O)138}}]
like this you mean?
oh i don't need that extra square bracket
i knew pants was cursed but i didn't think it was contagious. my border ruler.... is pants..
what is this 👀
Pants (pants)
pant
Mmm pants
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
you mean read the actual script, or view them ingame?
the scripts
!unpack the game assets if you haven't done so already:
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!
then you can look in Data/Events to find allllllll the different event scripts
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
Does the game say anything when you harvest a crop?
do you know that?
i'm guessing you want an event to start when you harvest a particular crop?
oh no, that wouldn't be an event, events are cutscenes specifically
but i want it to happen to any crop
Are you making a C# or CP mod
C#
Ah I cant help
have you decompiled the game code 
No
do you have any C# experience?
this doesn't look like something possible without some slightly advanced techniques
No
"advanced techniques" are relative
unless someone knows a Trigger Action for spawning monsters
I was going to suggest spacecore and betas
BETAS has a trigger for crops harvested, but i don't know of a trigger action to spawn monsters?
Let me double check what I was thinking of in spacecore
yes, to experience, which is probably why blueberry asked about that 
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
Okay I was thinking of spacecore setpieces, but they wont spawn until you leave and reenter a location
But you can put a monster in a setpiece and spawn it with a trigger action other than that
so your constant codebase companion and almanac of all available options will be the decompiled game code
!decompile @scenic pecan
If you want to make SMAPI mods with C#, one important resource is decompiling the game to read the game code. Here's how to do it: https://stardewvalleywiki.com/Modding:Modder_Guide/Get_Started#How_do_I_decompile_the_game_code.3F
okay
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
What does it mean to decompile
(I feel like maybe we should add the "non runnable, non debuggable" part to the command, because twice recently I've mentioned that and people weren't aware)
the game code is kept in a DLL file (dynamically-linked library), which is non-human-readable compiled C# code
IlSpy lets me read it?
a decompiler is a program that tries to reverse-engineer that into something human-readable and vaguely functional
Okay
ILSpy is the best one for the job
Do you want me to use the search tool
and type out things that could find me the "crop.harvested."?
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
(or rider)
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
Do you know what "always qualify member references" means?
unrelated, but whatcha working on currently with farmer pants, blueberry?
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
wearable tortilla
oh my god
Oh
i mean how else would you describe a yukata
you're not wrong...... but i'm not gonna say you're right........
pants once again spreading disease to the ruler
👖 BOO
When I try saving, i only get "StardewValley" out, nothing else. is that normal?
did you open StardewValley.DLL?
if you chose the EXE, you chose wrong, and fell for the oldest trick in the book
Yeah its probably the DLL
I did that
but i think this one is the DLL
if you chose the DLL, you'd get something like this:
now with the output set to C# at the top-centre, right-click and use save code to make a C# project
it shouldn't have made a single CS file
it has made a bunch of stuff
you should be using this value when you save:
i guess im asking what do i do with this






