#making-mods-general
1 messages ยท Page 283 of 1
but that would be reset every time the local changes probably
maybe not actually, seems to only be called when SMAPI specifically reloads i18n i guess.
if you really wanted to misbehave you can also just directly edit their .json files once you reflect in there. i'd not recommend it
sometimes i see logs about CMCT looking at token in me mod and i wonder what token is possibly of interest here 
like, non-trace logs?
no just trace logs, i am being silly
CMCT logs a trace to notify that its tracking a mod and it will just track every single mod by default, its just saying "i found you in the mod list" basically
and anthropomorphizing a dll as a little guy with opera glasses
i support dll anthropomorhpization
DUH! Thank you!!
Hello! My marriage schedule strings aren't working ๐ค (and my npc just stands facing down instead of respecting his facing direction) - Just checked in the wiki and found this bit
Tip: If you want schedule dialogue in marriage schedules, include the exact string marriage somewhere in the key, that will only show it to the npc's spouse.
But I'm not exactly sure what it means 
That's completely different and has to do with how schedule strings work in MP
Can we see your schedule lol
(No worries!)
atra why is schedule parsing so nitpicky
Please direct your question directly to Mr. Ca
I'm so tired and my foot hurte
Ooh, these tiny tumblers at Micheal's are cute
IT WORKS
Well almost, apparently I screwed my i18n?
wait no it's not i18n
why is bro complaining its right there
Did you load a blank
yes'm!
does the 'credits' box on nexus allow the use of HTML?
I would assume just bbcode
hmm i don't know how to write that :(
there's no toolbar at the top like there is for the description
[b]bold[/b]
[url=https://www.bbcode.org/]This is bbcode.org![/url]
[list] [*]item 1 [*]item 2 [/list]
thank youuu
It's BBcode
if you want, you can set it up in the description and copy it over, since you can edit in the description without knowing it
clicking this shows you the BBcode for whatever you've done in your description
ooooh good idea
!patchsummary
Can you do these steps to provide more info?
- Load your save and view the content that should be patched.
- Type
patch summarydirectly into the SMAPI window and press enter. - Upload your SMAPI log to https://smapi.io/log (see instructions on that page).
- Post the log link here.
Log Info: SMAPI None with SDV None on None, with None C# mods and None content packs.
Suggested fixes: One or more mods are out of date, consider updating them
HUH BUT
there is, in halloween.001
yEAH I was searching in the wrong one 
comma colon errors come for us all eventually 
(there's a karma chameleon joke here but i'm lazy /lh)
an error from different key would be affecting all other ones?
comma chameleon...
its in the same patch so i wouldnt be surprised if it bonks the whole patch

Okay. THANK GOD. that feels so good
Aw yis
if I could just trouble you guys for one more error that I've been unsuccefuslly trying to debug for hours
sorry, you've hit the usage quota (5/5 responses)

!ask /lh
Ask your question or describe your issue here, and someone will help if they can!
try again in 24 hours? or you can get the premium plan for a monthly fee
(sorry i just really like getting the chance to use that command)
hopefully!
Is there an easy way to see/print a mod's fishing zones?
Basically, I'm working on a LittleNPCs content pack-- and I'm trying to edit Sterling's marriage dialogue wen the kids age up
Because LittleNPCs loads 4 jsons (femfirstborn,femsecondborn,mascfirstborn,mascsecondborn) -- the easiest was just to have each json do the edits to Sterling's dialogue respectively.
The issue I'm running into, is for example- When you have 2 kids aged into NPCs, his "TwoKids" dialogue is changed -- however, when testing in game, whenever there should be a two kids line- it uses a generic line that I didn't write -- patch summary shows that my content pack is in fact changing sterling's line but it's -- I can only assume the game is reading it as there being no line at all so using a generic one?
https://smapi.io/json/none/a28cae53d2724520b4e588f4a3108432 here's the json for the active kid I'm testing for example
LA 1.50.0+ should have data for bodies of water though i dont know what it looks like or if you just click the hotkey when hovering over water or not
oh theres pictures
is this what you want?
(alternatively you could just open up that mod's location or fish data content file if you just want a single mod's raw data)
No, I'm trying to replicate these https://stardewvalleywiki.com/Fishing_Strategy#Fishing_Zones
Hime I'll be honest Atra kinda left me out to dry here because I have no idea how LittleNPCs works
Not per fish, but per map
I keep reuploading and it gives me the same
did you copy the whole link or are you missing a letter or something
I HAD. Never seen that
no it just gives me that when I click parse
I'm uploading my file directly
Pathos has been making some changes to the validator lately, so @ivory plume might be interested in seeing whats wrong with this link here?
sorry for breaking the validator.
๐ญ
no but this bug has been plaguing me the whole afternoon
and I really want to get it sorted (hopefully)
cropping it to the relevant part though: https://smapi.io/json/none/1b7962b709434160b79c034b675c1297
(also logo unfortunately i dont know of a way to do what you seek
my apologies)
this is how I try to edit Sterling's dialogue
It's okay - thank you, Button.
I may have to just best guess it
there is definitely a generic MarriageDialogue asset, and when a spouse tries to load a key from theirs and it's not present, it loads the one from the generic asset instead. so my guess is either a minor typo, or the patch isn't applying at all so it has to use the fallback
conceptually it should be really easy to do, it's just noone's apparently thought to
i could see it being a simple addition to Data Layers
data layers is also what i was thinking it could be in
If I knew how to code it, I'd completely submit a PR for it
I'm not very adept at patch summary but I think it's showing that it is editing? I just don't know why it's not using my line
It shouldn't be i18n or it'd be showing no translation, right?
Does the dialogue always pull from one that has entries or will it sometimes pull from other ones? Because I know the kid dialogue has other potential options
should there be a _0 after TwoKids?
and OneKid for that matter
i dont know how these dialogue keys work
if it was the i18n it'd show the no translation error though yeah
TwoKids i'm pretty sure uses don't listen to this guy_1, _2, and _3 (no _0)
this.addMarriageDialogue("MarriageDialogue", "TwoKids_" + r.Next(4), false);
They both use 0-4 iirc
4 would not be included here
In base ARV I just have it as the one, and then randomize in i18n
nevermind, old man memory. there's a 0
so I'm only editing the one through the kids mod
i might be missing it but i dont see anything that checks if it randoms 1, 2, or 3 without that entryexisting, though?
I see, I'm just wondering if it's pulling a generic line from 1-3(or 4.. though button says it doesn't pull 4 for some reason)
Random.Next(4) means it'll be up to but not including 4
most randoms will be exclusive on the upper range
the game will pick the key, then try to load it (or fall back if needed)
Then.. why does the fourth option exist 
will it fall back to 0, though, if it chose TwoKids?
or will it fall back to generic marriage dialogue
(r.next(4) gives 4 results; 0, 1, 2, 3, 4; it doesn't give 4 as an answer because then there'd be 5)
so if you only edit 0, then 1, 2, or 3 will all choose the corresponding generic line
thats 5 results bluebs
(i know but it'd be embarrassing to edit it)
understandable
That's what i figured was happening
i guess try adding TwoKids_1 thru TwoKids_3 with the same i18n key and see if it works
one sec
OKAY SO
FWIW soph made me patch export his dialogue and the correct line IS there?? it's just. not showing up in game?
So just to clarify does that mean it will never use TwoKids_4
or am I misunderstanding that
when the game picks a TwoKids line, it chooses a random suffix from 0 to 3 and tries to load that. if it's missing, it loads that key from the generic asset.
you only have TwoKids_0, so if the RNG chooses 1, 2, or 3 (this is the game's RNG, not your random token), then you will see that vanilla line and not yours. (i would expect 75% of the time; you may have simply been (un)lucky so far)
it looks like you have a few more types that may exhibit the same problem (Good, OneKid, Outdoor, Rainy_Night)
you are correct it will never choose TwoKids_4
You can force it to by making TwoKids_0, TwoKids_1, TwoKids_2, and TwoKids_3 = Random(0,4) ๐
Stuff like this:
"TwoKids_0": "{{i18n:TwoKids_{{Random:{{Range:0,7}}}}}}",
"TwoKids_1": "{{i18n:TwoKids_{{Random:{{Range:0,7}}}}}}",
"TwoKids_2": "{{i18n:TwoKids_{{Random:{{Range:0,7}}}}}}",
"TwoKids_3": "{{i18n:TwoKids_{{Random:{{Range:0,7}}}}}}",
Look, ma -- 8 dialogue lines!
Yeah I have the randomized dialogue lines :3 I just didn't realize the fourth ones never would get chosen.. odd the entries are an option in the first place
wdym are an option
the game wont check what you put in their dialogue it just wont use them if it doesnt want to
you can put any dialogue key you want in there
I meant the entry(enties) specifically with TwoKids_4 (or OneKid_4 if it works the same)
The wiki mentions them being options but they never get chosen
Congrats! You found a bug in Json.NET:
- Take a valid JSON which contains this line:
//Once you're done, remove the "/*" and "*/" above and below this block to make it take action.
- Run it through the JSON formatter, which turns it into this:
/*Once you're done, remove the "/*" and "*/" above and below this block to make it take action.*/
- Try to parse the JSON to update error line numbers, and fail because now the syntax is invalid.
yeah that should be 0-3
i transfer this congratulatiosn to Hime who is the one that broke it 
Same for the OneKid entry i presume?
yep!
I wonder if any other entries are like that 
Yay! Do I get a price
/ j
Thank you pathos 
you get the prize of "pathos cant fix this, its in json.net's hands now aka good luck"
(i mean i guess one could fix it themselves if they wanted to do some preprocessing, i suppose, but yknow)
dw
no need now I have the issue
I'm editing my files rq to report bacl
json.net is the regular C# library for it isnt it
oh wait no
im thinking of system.text.json or smth
json.net is newtonsoft
(Json.NET is the package name, and Newtonsoft.Json is the package ID; they're the same thing.)
thanks! 
This is amazing
this is what happens when you leave me out to dry atra
damn hime you live like this
I'm sorry I have to eat
And sleep
And knit
apology accepted
i dunno i think hime at lest moved the furniture out of the hallway
whereas i leave that there when i debug hu 2
sterling provides for us.
the garage is just getting started blueberry ๐ญ man is doing his best.
Has someone made a mod with more (aggressively big) house renovation yet?
can anyone tell me why im getting this error? https://smapi.io/log/73ea3a0374c6469aa1fcf7bee373f4c4
Log Info: SMAPI None with SDV None on None, with None C# mods and None content packs.
Suggested fixes: One or more mods are out of date, consider updating them
it's what it says on the tin: your mod folder doesn't include a map.tmx file in your assets folder. could you share a screenshot of your mod folder(s) here?
Gov... you okay? 
None log with left beef is my favorite calzone
you may have a map.tmx file in the same folder as your content.json file, in which case you can either move it into an assets folder or update the FromMapFile value to match
its a mod ive made, i put the map.tmx from tiled into my assets foler, one sec on the pic
(The {})
(really the surprising thing about the governor log parser error is that he somehow pulls out an update notice for a mere 5 mods and 0 updates)
I think the site is down
oh dear
whomp whomp.
I had everything working and now smapi is having issues finding files?
shadows = spouses :/
(You checked it mid-deploy to fix the issue you reported. Also, it's fixed now! Kind of.)
kind of 
(Here's the 'fix' if you're curious.)
could you also share your content file here via https://json.smapi.io ? as atra says, your FromMapFile value appears to be "{assets/map.tmx}" , which should instead be "assets/map.tmx".
@ivory plume After some investigation, @lucid iron, @crude plank, and I have discovered a bug in vanilla that is currently causing issues with a few mods, primarily when automate is installed, though it also applies to hoppers.
Currently, fully consumed stacks of fuel will leave null slots in an autoloaded inventory. I'm not sure exactly why, but it can be replicated easily by attaching a chest to a furnace via hopper, putting any number of iron ore into it and exactly one coal, then breaking and replacing the furnace.
Vanilla handles this fine, since it has null checks everywhere that would normally be affected, but I do believe this is still not intended behavior, and it does cause issues with mods that expect the drop-in item to be non-null.
(for a specific example, see this thread in the support forum <#1357920932920033331 message>)
i love it
very python, very zen.
Heyyyy
if at first you dont succeed, give up
Aha! thank you so much! I pasted a template, and didn't realize they wernt needed
"well, i tryed."
how did my download number for a mod go up when the mod was hidden?
it was just slow b4
ah
so, fix one problem, encounter another one, invalid location? https://smapi.io/log/0ef08037210949a28cdd47e40f1da56e
Log Info: SMAPI None with SDV None on None, with None C# mods and None content packs.
Suggested fixes: One or more mods are out of date, consider updating them
This one is a bit tricky, since the relevant machine code doesn't know if the inventory is a chest (should remove nulls) or player inventory (definitely shouldn't). I'll need to look into how to deal with that cleanly.
that one looks like you meant to use an internalassetkey but didnt
you cant just put "assets/AvalonFairyTale_Map" wherever the game expects a map path
you have to either Load the map somewhere and use the same load target, or use an internal asset key token
I notice that ConsumeInventoryItem does call RemoveEmptySlots, so I suspect something is not working there
Oh, I guess it already assumes autoLoadFrom is a chest, so that makes it easier.
The secondary ingredients are handled directly in Object.PlaceInMachine:
// consume extra requirements
if (machineData.AdditionalConsumedItems != null)
{
IInventory inventory = autoLoadFrom ?? who.Items;
foreach (var additionalRequirement in machineData.AdditionalConsumedItems)
inventory.ReduceId(additionalRequirement.ItemId, additionalRequirement.RequiredCount);
}
That's fixed in the upcoming 1.6.16. Thanks for reporting it!
Thank you Pathos!
spouse army has been assembled, thank you button for suggesting values bc I'm an idiot.
not an idiot, just learning 
So today in "Excuse me, what?" Sterling is refusing to continue any dialogue with a comma--
"Sterling.Marriage.Good.Muffin_3": "Mmm... I must have moved into a museum, because my husband looks like a work of art.$4^Mmm... I must have moved into a museum, because my wife looks like a work of art.$4",
have you changed the input separator
earlier it also
"Sterling.Marriage.Good.Muffin_3": "Mmm... I must have moved into a museum, because my husband looks like a work of art.$4^Mmm... I must have moved into a museum, because my wife looks like a work of art.$4",
i did notice earlier you had some things with a different input separator set
he's a poet who knows em dashes are superior.
so if you're choosing from random dialogues make sure to change it from comma
Wait
but the random is in my dialogue file
and this is in the i18n
it matters?
oh I guess the i18n is inputting it into the file...
if you are doing {{Random: {{i18n blabla}} }} then remember the i18n is going to be replaced with the dialogue before the randoim happens
i thought hime is randoming on the i18n key tho, unless that changed
i dunno what hime is doing bc i dont remember the json
thank you 
(Tokens are substituted with their value in inner-to-outer order.)
guess a comma did really eat his grandma
but i just remembered that hime was doing ++ as a separator somewhere and it seemed the most likely suspect when splitting dialogue by commas is the issue
This is the default:
"Sterling.Marriage.Good.Muffin_3": "Mmm... I must have moved into a museum, because my husband looks like a work of art.$4^Mmm... I must have moved into a museum, because my wife looks like a work of art.$4",
And this is the dialogue file?
"Good_0": "{{Random:{{i18n:Sterling.Marriage.Good.{{Random: Cookie, Muffin}}_{{Random:{{Range:0,15}}}}{{FirstbornTokenPass}}}},{{i18n:Sterling.Marriage.Good.Both_{{Random:0,1,2,3,4,5,6,7,8}} {{FirstbornTokenPass}}}}}}",
unrelated to the comma issue but have you met my friend ${male^female^other}$, who could save you some text duplication
Yes! I did it for all my new dialogue but I was too lazy to change the old one to the new formatting
correct!
Hime did you know you can use {{Random: {{Range: 0, 15}} }} instead of listing all the numbers out individually? (I am guessing the answer to that is also "yes but I've not bothered to change the old stuff" but just in case!)
I did not until like - Two hours ago!
But then I feared doing that because
"Good_0": "{{Random:{{i18n:Sterling.Marriage.Good.{{Random: Cookie, Muffin}}_{{Random:{{Range:0,15}}}}{{FirstbornTokenPass}}}},{{i18n:Sterling.Marriage.Good.Both_{{Random:0,1,2,3,4,5,6,7,8}} {{FirstbornTokenPass}}}}}}",
The sheer amount of brackets in my json terrifes me ๐
those are two different Good_0 keys, which one is being used here
{{Random:
{{i18n:Sterling.Marriage.Good.
{{Random: Cookie, Muffin}}
_
{{Random:
{{Range:0,15}}
}}
{{FirstbornTokenPass}}
}}
,
{{i18n:Sterling.Marriage.Good.Both_
{{Random:0,1,2,3,4,5,6,7,8}}
\
{{FirstbornTokenPass}}
}}
}}
what are u doin hime 
this is terror
OKAY SO.
in the {{Random: a, b, c}} token, it uses comma to separate the things to choose from (a, b, c).
you are expanding an i18n token inside there, so if that string has a comma in it, it gets split
There's four jsons right- Firstbornfem, secondbornfem, firstbornmasc, secondborn masc -- I change sterling's dialogue in each of those json's so the relevants can apply --
In the first random (cookie, muffin) -- its so that it picks dialogues related to one of the kids since in this case, both are active so it can pick from either one
the second is obviously the range
the second (sterling marriage good both) its meant to replace his Good_0, Good_1, etc keys when you have both kids
then yes whichever Good_0 is the last one you sent is the one with the issue i initially described and needs to be fixed
should I change all the random's in
"Good_0": "{{Random:{{i18n:Sterling.Marriage.Good.{{Random: Cookie, Muffin}}_{{Random:{{Range:0,15}}}}{{FirstbornTokenPass}}}},{{i18n:Sterling.Marriage.Good.Both_{{Random:0,1,2,3,4,5,6,7,8}} {{FirstbornTokenPass}}}}}}",
to have different input separators then? or is one of these specifically the issue? (sorry I'm well aware these are merely logic puzzles, I am just notoriously slow with them)
if there is an i18n token inside of a random token, the random token must be fixed
i wonder if u can write it like this
{{i18n:Sterling.Marriage.Good.{{Random:{{Random: Cookie, Muffin}}_{{Random:{{Range:0,15}}}},_{{Random:0,1,2,3,4,5,6,7,8}}}}{{FirstbornTokenPass}}}}
if there is a random token inside of an i18n token, it doesnt need fixing
unless there is an i18n token further inside that random token
(why use range for only one of the random number tokens?)
my guess would be that chu got lost in the brace sauce and didnt notice
bc i sure didnt
I'm the one who got lost in the sauce writing these
, tbf
(i can't believe chu wrote this.)
unfortunately this is a sauce of your own making 
{{i18n:Sterling.Marriage.Good.
{{Random:
{{Random: Cookie, Muffin}}_{{Random:{{Range:0,15}}}}
,
Both_{{Random:0,1,2,3,4,5,6,7,8}}
}}
{{FirstbornTokenPass}}
}}
i think its like this
for some reason its less parseable to my brain when you present it like this
but this is the abstract syntax tree...
but that misses the both key?
do you typically find abstract syntax trees to be the most human readable form of code
Because there's
Sterling.Marriage.Good.Cookie
Sterling.Marriage.Good.Muffin
Sterling.Marriage.Good.Both
oh yea i forgor
back to the sauce you go chu
AH Thank you chu
its not but only cus most ppl use infix operators
but doesn;t that maintain the comma issue?
no cus i18n is on the outside now
sorry I literally got into i18n three days ago, I swear I'm doing my best to take all of this in and learn for the future 
I appreciate the patience 
my hubris immediately trying to commit i18n crimes 
the actual problem doesn't have much to do with i18n, but rather how Random works
yeah but I'd never really had to deal with any of this before since i18n was what opened the door to this madness
the problem is that lets say this is your i18n:
TestTranslation: Hello, welcome!
then you have this:
Random: {{i18n: TestTranslation}}, 2
after CP does its stuff, it will become this:
Random: Hello, welcome!, 2
as you can see, there are now 2 commas in the random token
so it takes it as a list of 3 things to choose f rom
thus, this would be the correct way to do it:
Random: {{i18n: TestTranslation}} ++ 2 |inputSeparator=++
this is the case every time you have an i18n token inside a random token
Hi question, are there item idโs for specific artisan goods? Like dried cranberries or smoked shrimp in a cooking recipe, for example? @ivory plume if not will such a thing exist possibly soon?
(unless you can be 100% sure none of your i18ns have commas in them)
unfortunately, every dried item is simply Dried
aint that the truth
Ah ratsโฆโฆ
the rat infestation turned out to be junimos actually
if you're using item queries though you can get a little more particular
Thereโs nothing spacecore or some other framework can do either?
well theres various places u can get flavoring from
there's an unreleased feature in PeliQ for this if the place is item query
Thanks.. How so?
i don't know 
Oop sorry
ill say at a glance that this is fine however please understand that the more nested braces one shows me the more my eyes glaze over, intentionally or otherwise
see thats why i tree'd it button
Let me tree it 
i can say i think the input separation is fine but whether it works as intended is up to your random ranges
yes and it made it worse. do better /lh
I wish you could like. highlight different colors in visual studio 
but what mattered was removing the comma in between {{i18ns}} being randomized, right?
correct
There's probably an extension that colours bracket groups
should i ask why you use Cookie, Muffin, Both 0, 1, 2, 3, 4 instead of simply using 0, 1,2,3,4,5,6,7,8,9,10,11,12
one has higher odds
cookie muffin have 15 and both has 8
too late button it's worse now
Sterling\.Marriage\.Good\.(((Cookie|Muffin)_(\d|\d[0-5]))|(Both_[0-8])){{FirstbornTokenPass}}
In hindsight, I could just make both have 15 too
and then I wouldn't have to use a comma....
believe it or not, i do actually like this better
that is basically what i attempted with my refactor at least
sdvpufferregex emoji
what if that, would it still hate commas?
well. no. but you're doing essentially {{Random: 1}} there
you have to either
- do Random inside, i18n outside
- use a different input separate on the outermost Random
unless FirstbornTokenPass is another potential dialogue to choose
but i assumed that was a token passthru into the i18n
pardon, I'm not sure I understand ๐ค
firstborntokenpass is not a randomized thing to choose from, its a passthrough for i18n
so it just has to be there at the end from what I understand
button's solution of using ++ is input separator
my solution of refactor is put i18n on outside
"Good_0": "{{Random:{{i18n:Sterling.Marriage.Good.{{Random: Cookie, Muffin, Both}}_{{Random:{{Range:0,15}}}}{{FirstbornTokenPass}} }}",
lets say this randoms to Cookie and 2, itll be:
"Good_0": "{{Random:{{i18n:Sterling.Marriage.Good.Cookie_2 {{FirstbornTokenPass}} }} }}",
thats just 1 thing in the random list
outside of my random
which if Sterling.Marriage.Good.Cookie_2 had commas in it, it would actually still break, but also theres no point of the random in the first place in that case
using the passthrough in a token is also terrifying good luck with that
wait does that work 
Sorry idk what this meansโฆ does it mean itโs not on nexus yet?
it does but its not recommended
this is a step backwards, you dont need to change the input separator if the inputs dont have commas in them
in the last one i sent you just need to remove the outer random
"Good_0": "{{i18n:Sterling.Marriage.Good.Cookie_2 {{FirstbornTokenPass}}}}",
er
i copied the wrong one pls hold
HOLDING
"Good_0": "{{i18n:Sterling.Marriage.Good.{{Random: Cookie, Muffin, Both}}_{{Random:{{Range:0,15}}}} {{FirstbornTokenPass}}",
thank you for the patience
dont look at me atra im just working with the setup as given
I AM VERY MUCH LOOKING AT HIME
(no worries!)
this will randomly choose a cookie or muffun or both dialogue out of a randomly chosen 15 options
so you do need 15 options for all 3 of them in your i18n
what's "cookie" and "muffin" here
those are baked goods
- without any extra mods, but in a place that uses item query, you can make one of the flavored items like jelly by using FLAVORED_ITEM, it needs to be made one at a time
- peliQ lets you do a nested item query, so u can make every jelly ever at once in 1 item query
- the unreleased thing also support modded flavored items (but differently)
the original usecase for 2 is sell every kind of target bait
Sterling's children!
So it's choosing between
Sterling's dialogue talking about cookie (son)
Sterling's dialogue talking about muffin (daughter)
sterling's dialogue talking about both kids
who let this man name kids
if it helps persuade you otherwise, even Pathos himself does not recommend doing the passthrough token thing
it is very clever. its also very easy to break things with it
OKAY GOD BLESS, this is what I thought earlier- so it won't hate commas here
it will not
i thought {{FirstbornTokenPass}} is supposed to go inside i18n tho
It's not mine! This is from Growing Valley :] basically what it does is it lets me use the display names of the kids because it checks for male female, who was born first, etc
(Uhhh I just wanted vanilla specific types of artisan goods in cooking recipes ๐ not sure if this falls under)
so I just do as growing valley does...
i think it just needs a }} at the end
"Good_0": "{{i18n:Sterling.Marriage.Good.{{Random: Cookie, Muffin, Both}}_{{Random:{{Range:0,15}}}} {{FirstbornTokenPass}} }} yeah this should be it
i know what it does! but its still Very Not Recommended to do it that way dflgkj
i think you need either spacecore or better crafting for that
AH, NODDING
not super sure on exact syntax tho
Iโll check it out ty
having a |inside that token as required to make it a passthrough token like you have it means if you use it slightly incorrectly it will break other tokens when they see an errant |
and attempt to parse what it means
is {{FirstbornTokenPass}} something like | FirstBorn={{ChildNames|indexat=0}} (idk if i got this right
as with all very clever ideas, they work well until they break
yes
you can do that with |valueAt or |inputSeparator too, if you really wanted to
I would listen but unfortunately I wouldn't know another way to be able to get the children display names otherwise 
and it's been working up until now? 
"Name": "FirstbornTokenPass",
"Value": "|ParentFarmer={{Random: {{FarmerRefFirstborn}} }} |CompanionRef={{Random: {{CompanionRefFirstborn}} }} |CoSub={{Random: {{CoSub1}} }} |LCoSub={{lowercase:{{Random: {{CoSub1}} }} }} |CoObj={{Random: {{CoObj1}} }} |LCoObj={{lowercase:{{Random: {{CoObj1}} }} }} |CoPD={{Random: {{CoPD1}} }} |LCoPD={{lowercase:{{Random: {{CoPD1}} }} }} |CoPos={{Random: {{CoPos1}} }} |LCoPos={{lowercase:{{Random: {{CoPos1}} }} }} |CoRef={{Random: {{CoRef1}} }} |LCoRef={{lowercase:{{Random: {{CoRef1}} }} }} |DisplayName={{FirstbornDisplayName}} |SiblingDisplayName={{SecondbornDisplayName}} |CompanionName={{CompanionName}}",
},```
oh it was valueAt right
thats terrifyijng
what the fuc
please put that away
(from the Growing Valley content.json)
wheres your fucking syntax tree now chu
this is syntax mulch
yea its a forest
like i said, itll work well until it doesnt. good luck if it stops working!
NODDING
ok time to test
thank you all for the headaches I have no doubt given you
no despite my grumbling about your tokens its all in good fun i enjoy debugging other peoples issues
ngl i still dont understand what this is supposed to do
|ParentFarmer={{Random: {{FarmerRefFirstborn}} }}
|CompanionRef={{Random: {{CompanionRefFirstborn}} }}
|CoSub={{Random: {{CoSub1}} }}
|LCoSub={{lowercase:{{Random: {{CoSub1}} }} }}
|CoObj={{Random: {{CoObj1}} }}
|LCoObj={{lowercase:{{Random: {{CoObj1}} }} }}
|CoPD={{Random: {{CoPD1}} }}
|LCoPD={{lowercase:{{Random: {{CoPD1}} }} }}
|CoPos={{Random: {{CoPos1}} }}
|LCoPos={{lowercase:{{Random: {{CoPos1}} }} }}
|CoRef={{Random: {{CoRef1}} }}
|LCoRef={{lowercase:{{Random: {{CoRef1}} }} }}
|DisplayName={{FirstbornDisplayName}}
|SiblingDisplayName={{SecondbornDisplayName}}
|CompanionName={{CompanionName}}
are all of these just args in i18n 
why...
it doesnt matter if the i18n doesnt use one of them, itll just be ignored
but it means you dont have to worry about which ones you need to pass thru to any given i18n
you can just write your i18n and use the {{ParentFarmer}} or {{LCoPos}} tokens whenever and wherever'
and as long as you always include your passthru dynamic token in the i18n token, itll work
this syntax forest is dry and a wildfire hazard
i can see the appeal of it. its a siren song
but i would reather just manually pass things in myself
each one of those ParentFarmer, CoSub, LCoRef, etc would just be their own dynamic tokens in my json
yes! so its great to get the farmer's pronouns, whether they use mama/papa/another parent nickname, the display name of the speaking child and the displayname of the other sibling
and id do e.g. |ParentFarmer={{ParentFarmer}}
but it is terrifying
(tbh I'm surprised this works)
(I'm very surprsied this works)
anyways.
maybe eventually you can convince Pathos to add a like, "add these tokens to all i18n tokens by default" feature
pathos...
i always only pass in what i use. something something empathy for the machine
Am I cooked, not cooking?
doesnโt look like I can use specific artisan goods here for ingredients, or am I missing something
Oh hi... I heard my name
silicon! hello
im glad you are here to please defend yourself
It was mostly for translation compatibility ahaha
Hi silicon!
I wanted translators to be able to use any tokens in their i18n for pronouns
you can select for artisan goods by the context tag i believe
Not that. any took me up on the offer, though
trying to bring growing valley the love it deserves
But the option's there
my humble content pack
this is a pretty good case for some kinda "default apply i18n token" then
Hehe
I wanted a specific type of smoked fish not just any, thatโll work with the context tag?
I'd adore that muchly
chu can PR it into Content Patcher if you'd like, silicon
isnt this a smapi feature
:O
well how do you think SMAPI gets it from the i18n token
its i18n so i think we'd have to implement it there first
and then have cp token make use of it
and then change mod translation class builder too
you'd just need Content Patcher to add an e.g. |ParentFarmer={{ParentFarmer}} to all the i18n tokens in your mod
dont need to touch smapi
My only remaining concern after that is that I have separate tokens for the first child and the second child's display name
yes, you need to use the context tag for the smoked fish ID AND ALSO the context tag for the preserve index (which has the flavor info)
im not sure what your point is
Thank you!
a discussion on how the impl should work
And I've been able to use the same line of i18n for both versions, but I'd presume this sorta thing would make them require different lines to use the different tokens?
the passthrough token just removes the need to manyally type |ParentFarmer={{ParentFarmer}} by substituting it in for you (along with a billion others at the same time)
so just have CP do that for all the tokens and args you write
in some other section like DynamicTokens or AliasTokenNam,es
you can just pass in a dictionary<string, string>

TranslationArgs: [
{
"Arg": "ParentFarmer"
"Value": "{{ParentFarmer}}"
}
]
this would pass thru ParentFarmer into every i18n token
something like this
Oooh
yea but i mean u have this in the actual helper
I18n.GetByKey(Keys.Shop_TimeRange, new { openTime, closeTime })
-# (excellent news, sterling is no longer afraid of commas !)
you can also do I18n.GetByKey("My Fancy Key", dictionary) where dictionary is a string, string dictionary? I think???/
just maintain a dictionary of substitutions and pass it in every request
so it should be place where u set a shared dictionary right 
all Content Patcher is doing is that function atra just posted
(I have 7 days until release still, so lmk if you're changing anything in between that โค๏ธ )
this feature would just make content patcher start with a pre-populated dictionary
oh but this has to support tokens i see 
(I can always send a prerelease build to you if so! But I'll see about keeping changes before those 7 days to a minimum ahaha)
ah shoot wait, I don't mean to rush you either LOL
just meant if anything changes in between that time, I can add it np
public override IEnumerable<string> GetValues(IInputArguments input)
{
...
object tokens = (input.HasNamedArgs ? input.NamedArgs.ToDictionary<KeyValuePair<string, IInputArgumentValue>, string, string>((KeyValuePair<string, IInputArgumentValue> p) => p.Key, (KeyValuePair<string, IInputArgumentValue> p) => this.Stringify(p.Value)) : null);
Translation translation = this.TranslationHelper.Get(key, tokens).ApplyGenderSwitchBlocks(apply: false);
...
}
this is CP's translation token, just add more stuff to this dictionary
hm what does it do with local tokens 
or is it just "dont put local tokens in global thing dummy"
But yeah um. The whole "making it so that each child can refer to their parents with different terminology (and thus, there are two values for each token corresponding to each child)" feature I added in the last update minorly complicates matters for my specific use-case I presume?
*what should it do i mean
the tokens get parsed before they become IInputArguments surely
no this seems right i think
But damn if it doesn't sound nice to just pass tokens through i18n automatically regardless ahaha
if it were a new section like DynamicTokens or ConfigTokens, you wouldnt have localtokens
but isnt the point to resolve it just before i18n 
apply gender switch blocks (but don't actually)? is how I'm reading it
ah
a Translation object has a property on it that determines if it applies them before they actually give you the text, which you might not always want
set the field that says don't apply gender switch blox
if you set false but its set to do that, itll- yeah
give you a new Translation with that set
since you dont want to pre-apply them in a token
what do localtokens have to do with it resolving or not
my thinking is that it would be literally no different from doing |ParentFarmer={{ParentFarmer}} in every single i18n token, where {{ParentFarmer}} is a dynamic token
just that it'll see what to use from a different section, which may include Dynamic tokens in their values, in which case it should resolve them, just like it has to resolve them now
but actually they should already be resolved
bc like dynamic tokens they get a cached value when theyre updated
already resolved
the TranslationArgs section would just also need to listen for an UpdateContext
why am i make this PR then
it might not need to actually you might be able to just not care about updating things in there, bc if they use tokens, those already have an updatecontext. just grab their value, it'll be correct
you just seemed to love token parsing and trees and stuff i thought you'd enjoy it
and i didnt wanna do it
bc it seems really difficult
i do see what u mean tho, but i need to investigate lifetime closer
yea but button this is already past the part where the syntax is resolved 
it is now back to regular ol C#
which you're great at! thats why you're the person for the job 
(I'm enjoying this)
(Button has figure out the voluntelling)
help atra im being marketed to really badly
i learned from the best
(I'm also enjoying this)
plus i kinda already told silicon you'd do it sooo
Bahaha
badly as in
every additional marketing is dealing 2 damage to my motivation to actually do it

does your motivation used a signed int, per chance
its a signed char
well thats not helpful
Dang, now I gotta rethink some logistics. I hate logistics (belovedly)
i wonder if i can just open anther field on dynamic tokens tho
(truthfully, if i understood CP's codebase a bit better, id probably at least take a stab at it)
to mark it as provide to i18n
(but the last time i PR'd something into CP i did so kinda badly and im still embarrassed)
what if i wanna pass something into i18n that isnt a dynamic token
tbh i think PRing anything to pathos is indirectly creating more work
thats the case for all PRs innit
he rewrites them pretty hard
that is true that is a big part of the embarrassment bc he rewrote things to fix the things i didnt think of and felt bad for giving him more work 
if u want something that isn't a dynamic token then this goes back to hm what does it do with local tokens
there wont be local tokens

why would you ever have a localtoken in a top-level section in content.json
its the same as asking "what about localtokens in DynamicTokens"
functionally maybe, but i would expect you'd not want to introduce a kinda mostly unrelated system inside of an existing, laready only mostly ujnderstood system people use
the ujnderstood cant get any lower 
if anything it makes it easier bc then you can just use DynamicTokens as a template and just rename some things
the understanding can definitely go lower
the reason why i was just gonna stick it onto dynamic tokens is cus there is this whole context update lifecycle that would become
to me if it is separate

if you copied everything from DynamicTokens but renamed it you could probably just copy paste some stuff to make it work with context updates maybe
just find where DynamicTokenValue.UpdateContext() is called and add stuff to call yours beneath it 
ez 10/10
what would you call the property if you added it to dynamic tokens
and how would you get people to understand that the token doesnt have to be dynamic to be used for it
you're always quizzing me on my implementation ideas its my turn now
(its /gen asking though)
hm so the other reason why i was thinking of doing it in smapi is cus
i would like to find out what's actually requested by the i18n 
im still not sure what you mean or why though
then u can updoot things less
it would still be using SMAPI's existing system
in that code snippet i posted earlier, if you just looped over a mods dynamic tokens list, checked token.shouldPassthrough or whatever and if true, grabbed the token.Value, and added it to the dictionary, you wouldnt need to update anything
but yea ill start with naive implementation 
itd just turn GetByKey(translation, {}) into GetByKey(translation, { token: value }) on the SMAPI side of things
i'd like to expose something like KeysInThisTranslation
but that is extra complexity for later
so that CP can ask what keys are in it, and only grab the ones necessary?
im still not sure why you're assuming things would update tho
nothing should be updating at all if it doesnt need to
well if i had apple banana orange
(is that for possible values of a dynamic token or)
and i am make them pass through to achieve something like
{{i18n:
the.key
|apple={{apple}}
|banana={{banana}}
|orange={{orange}}
}}
if i know that the.key actually only uses apple then i dont have to do things if banana and orange updated right 
at the same time, im not too sure what the current behavior is
in that snippet there, if banana and orange updated but werent used, i think they would still update and cause the whole i18n token to refresh, but i think doing it in the token itself after looping over dynamic tokens would actually fix that
lets say you have those same 3 dynamic tokens, apple banana and orange. if they change, then they have to be updated anyway ofc, theyre dynamic tokens, so we already know we have to accept that update as thats the whole point
but if the i18n token then just goes down the list and says "hey apple do you wanna be passed thru? yeah? ok gimme your value then"
its not asking it to update again
it grabs whatever value it has cached
this would make it behave different than current usecase no?
which i think makes the problem actually, how do you tell the i18n to update, bc now its unaware
yea 
so current behaviour updates too much, this proposal updates too little
so i guess im dumb or something, but what am i missing? https://smapi.io/json/none/e134f71ba0694f34a49494a74484524d
so i want to find out what args are used in a key
how would Content Patcher use that to check if the i18n key should update?
you havent posted a log so who knows, no one knows what errors you're having, but you shouldnt be creating a new location in both CustomLocations and Data/Locations
what is that CustomLocations block that's outside of Changes? i haven't seen that before
its deprecated pre-1.6 behaviour for adding custom locations
ah
so as i understand it rn the return ofUpdateContext is what tells CP a token has changed
for i18n it is true only when locale changed
also redprincess, as said earlier you cant just use "assets/whatever" when the game asks for a path to something, like MapPath. you need to give it an asset name, which involves a Load action, or an internalassetkey
for naive i was gonna just iterate DTs in there and also return true if any "passthrough to i18n" DTs changed
so it'd behave like rn
knowledge of what args r in i18n would par that list down more
its the same errors i was having earlier, tried following a youtube tutorial, but apparently its out of date, and i can't seem to find what your describing on any of the content patcher pages...
!mapmaking i cant remember if someone posted this command for you earlier
If you want to make mods that add or edit maps:
-
Use Tiled to edit .tmx or .tbin files.
-
Refer to the Maps wiki page for details on how maps work in Stardew Valley.
-
Content Patcher allows you to create custom locations through editing Data/Locations
-
Vanilla Maps can be edited via Content Patcher as well: EditMap
alongside the EditMap documentation there you'll need to look at the Load documentation
where would you store what tokens it depends on if SMAPI did have such a feature
i guess if you have the translationhelper you dont need to
yea TranslationValueProvider has ITranslationHelper
hm.
idk where to get DT tho 
uhhhhhhh i forgor
*where to get DT without crimes
CP's ScreenManager has a TokenManager in it
if i cant just get DT then a separate field at top level is prob the way 
idk there seems to be a buncha places you can get the ModTokenContext for a content pack and im not sure which one is the correct to use
ContentPatcher.Framework.TokenManager.LocalTokens i guess maybe?
i thought im supposed to get it from IContext 
idk thats just the dictionary that the TokenManager loops over when calling UpdateContext
it stores cached modcontexts
and ModTokenContext holds Dynamic Tokens
elaborate
{
"Format": "2.6.0-thisthing",
"TranslationPassthrough": [
"apple", "orange", "banana", "season"
],
// have DTs apple orange banana
// have global token seaason
// can do {{i18n:this.key}} and have access to {{apple}} {{orange}} {{banana}} {{season}} as args
}
these r just any tokens
thatd limit you to only being able to pass in dymamic tokens, though
and not literal strings
in which case you may as well just add it on top of dynamictokens
yea but it doesnt seem like i can access DT easily from translation value provider
but i dunno check back in like a day
how would you get the TranslationPassthrough if you cant even get the DynamicTokens
why couldnt you just do the same with a reference to its dynamic tokens
bc i still want to do this mayhaps
still the interface from IContext is IToken? GetToken(string name, bool enforceContext);
is that important i think i mightve lost the plot a little bit idk how we got to the GetToken interface
well whether i was ever on a plot is questionable
i think you were on the plot
but i am at TranslationValueProvider.UpdateContext right
honestly i'm just surprised the series is still going
i mean i do now see the merits of the GetArgs thing in SMAPI
does SMAPI/Content Patcher give you a warning if you forget to add an arg to a translation?
bc if not the GetArgs thing could still be useful for that on CP's end, if nothin else
can warn you if you forgot one
actually i guess obv it doesnt bc of all the times i see people wondering why their i18n has their npc saying {{season}} literally
yea
though i guess what if you intentionally wrote {{season}}
how do you differentiate between a substitution and just, text
maybe if your character is sentient wikitext
it could be a menu, or a sign, or some other messagebox
ah brand new problem translation updoot seem to happen before others 
how is this not circular bolb
dynamictokens do appear to be looped over at the bottom of this updatecontext function
i guess that makes sense? since dynamic tokens are the only ones that can depend on another token
so its not circular because when the dynamic token is checked the other tokens values have already been updated
until now kind of
or something. idk. im not a content patcher specialist
if this work
there is a DynamicTokenDependents collection though idk if thats meant for patches or tokens
i would assume tokens since its in the token context
but it might also mean other dyn tokens now that i think about it
i think its graph theory
i dislike that
like many things in life
and as with every other time ive gone skipping through CP code, i feel like i understand it less than i did prior
idk i feel like the best way i can think of to do this now would be if you passed the modid or icontentpack or imanifest or something identifiable into the TranslationValueProvider and then just have CP ask itself for that mods tokens
dats what i was trying to do kinda?
with this
yeah just instead of asking for its TranslationPassthru just go back to dyn tokens
but i dont remember if either of us knew how to check if the token actually changed or not
my approach i was thinking about was having the dynamic token self-report in its UpdateContext function to go cache a "Hey i updated" bool in the content packs' translationvalueprovider
i dont know which of ours is worse

i have a question about gift tastes. if i make a character love ruby, but like the category of precious stones, does love or like override for the ruby? what determines this logic/is it consistent?
there's a hierarchy
the more specific the taste, generally the higher priority
if you make the character love ruby by item ID that should be top priority
consider: robin likes the cooked foods category, but loves spaghetti
thank you!
Wow it took me a long time to realise I could set a file association for my events.json file to be in JSONL by default
well i got something
it doesnt seem very shippable without explictly letting ppl set what is passthrough from tokens but i guess knowing about args is actually irrelevant cus theres only 1 token i18n 
you got that out like surprisingly fast, i didnt realize you were nerdsniped that hard
+ using Force.DeepCloner; 
is there no other way than shallowcloning where you are or is that just bc prototype
Did you test it while changing language with a loaded save?
theres special-case logic where if the Language token changes, it will infer an i18n change in the global context, but you have removed i18n from being a global context token
I'm also very nervous about the performance implications
would be tokens, as its tokens all the way down, as even just boring literal text is still a token
and when the literal text contains another token thats a child token, and its inputs are also tokens
though I haven't looked into dynamic tokens too much myself, I've looked into patches and how they use tokens
as Content Patcher has a lot of tricks up its sleeve to try and do as little work as possible like baking in immutable tokens into the parents value, and for deterministic tokens, will bake themselves if all their inputs are also deterministic/immutable
tbh rather than using Translation's Tokens method, I'd rather have content patcher just parse the contents of the i18n as a TokenString (or a variant of it), though some work might be needed to let it handle the existing i18n input named keys. (and potentially handling gracefully failing)
That would mean you don't need to stringify every token available in scope, and only the tokens actually used would resolve to a value
also means you would support inputs in the tokens within the i18n like Relationship and other tokens. (would mean you would need to add anti-infintie loop detection to make sure an i18n key doesn't use {{i18n:itself}}
Is there a reason I can't seem to patch export Data/MovieReactions ?
I just checked, and I would have absolutely done the same thing here. The reason is because Data/MovieReactions doesn't exist! It's Data/MoviesReactions, as it turns out.
s really does ruin lives
.<
Hello! i am losing my mind. I cant get the introduction message to work, insted my NPC say the monday dialouge....
plz help me โค๏ธ
dialouge:
https://smapi.io/json/none/3548d6534ebe48f3aae80d5be0b98a5a
characterData:
https://smapi.io/json/none/ab1946b214d44f1aa4b59869cb9e0858#code.294
what day are you on, in game? and do they have a schedule where they move at least a couple of places?
they dont move!
and i started a new file to check if it works ๐ฆ
oh
yes they to hahaha
The thing to note about Introduction is that it's a conversation topic that starts at the beginning of the game, after a few days pass that conversation topic expires and nobody will use that line. If your NPC is in a place where they wont be spoken to for a while then there is no actual need to have it. At quick glance I can't see a problem.
Yeah, I really dont know why it do not work.
Do you have gift tastes?
ah yes that will do it too
no i have not! can that be the problem???
yep
okay thank you :)))
Yeah NPCs won't use conversation topics without gift tastes
very creative. I love her portrait and house ๐
it also doesn't help the file in strings is MovieReactions without an 's' ๐
Okay. I think I am going to go ahead an ask because I am trying to search for it and coming up empty handed. Is there an easy way (via CP), to have X days pass between a trigger or event? For example, if I have a letter "ThisLetter" received and have the game send "That" letter three days later? I'm thinking it would be via a token, but I don't see (or understand?) how to establish a token of "Date this letter was received"+3.
I'm not sure if this is the only way, but people usually use conversation topics for that. Set a CT with your first letter, then have the next one check for...hmm, a) having the mailflag from the first letter and b) NOT having the CT? I've never actually look through the whole process before.
Yup, looks like that's how Sword & Sorcery does it for timegating events. Sets a CT in the first event, then the preconditions for the second event are a) has seen event 1 and b) does not have the CT (so essentially waiting until it has expired).
god shes such a beautiful NPC, and the interior is too
Not sure if I should've pinged you for my response so I will ping you now lol
im currently making a FS mod ๊ฐ for myself, mainly ๊ฑ of shinobu oshino and now im wondering if i should include all her outfits or atleast the outfits she wore throughout the series or if i should just include a select few outfits 
i mean i wouldnt mind posting it for others but idk if others would be interested or not lol
i need to get this hair to work tho. its my nemesis
Recommendation: do the ones you want first
Make the mod
Post it.
When adoring fans come in, do the ones they suggest
Yeah me too but that is why there's attempt at detect what token actually changed. And no I didn't test with changing language yet cus it was 2am
Having the translation resolve as token string would change the semantics (?) of the i18n i feel, though again this is perhaps better as a smapi feature where you get to set some kind of translation preprocessor
Is there like. A checklist anywhere of what i need to prepare to make an NPC? I've got a really rough idea on general dialogue/sprites, but was wondering if anyone had something more concrete
!npc
Keep in mind that making NPCs is a complex process that requires learning many different aspects of Stardew modding.
Here are a few links that can help get you started on all that you need to know:
-
Tiakall has a great tutorial on making a custom NPC for 1.6.
-
NPCs no longer use dispositions, check the wiki page for the new NPC data.
-
Aviroen has put together a template that will allow you to easily create a romanceable NPC.
-
Feel free to jump into the https://discord.com/channels/137344473976799233/1277457201077813280 thread for more interactive feedback and help!
-
Fireredlily has a WIP NPC Builder Please do report any errors you get with it into the NPC thread!
Thanks so much. That helps a real lot. I swore I saw it being done before, but wasn't sure where. I will check out S&S to see how it was done there.
The dynamic token you want to check for is called "VariableTimegate". If you do a "find in files" search across the whole CP folder for S&S you should find quite a few hits for events that will show you how it works.
Thank you!!
Could someone explain what the Format section of content.json means? I've seen a few different numbers in various examples, but I can't dig up what they actually mean
The version number of Content Patcher to use
I set mine to the latest minor version number (which is currently 2.6.0). I'm not sure if that's best practice or if it's better to use the latest version at the time of your mod's release, including bug fix versions (which would be 2.6.1).
Gotcha, thank you!!
Here's the CP documentation about it: https://github.com/Pathoschild/StardewMods/blob/develop/ContentPatcher/docs/author-guide.md#format-version
Thanks everyone for your kind words and all support โค๏ธ
I have another question.. haha.. I am currently making her preferenace, but cant find WHERE to find the item IDs.
Is there any website? or something?
(for gifting)
they are on websites but you can look at your own game files
!itemids
have you extracted them?
I find it faster to use the website because the data/objects file doesn't have the names handy so it's hard to search (I think - just turned off my computer so going by memory here).
Is that them??? haha oh.. but why did i thought you needed both the id and the categories?
Okay thank!! โค๏ธ
depends what you're trying to do
You can set gift tastes for individual items, categories, or context tags iirc
okay! i think i am grasping th concept now ;-)))
By the way @spiral lion sorry if this has been mentioned to you before, but I recommend that you add your mod ID as a prefix to Hazel's internal name as well as the ID of any other new thing you're putting in the game (like maps or tilesheets). It's to ensure your mod isn't incompatible with other mods, since if anyone else makes an NPC just called "Hazel" then both your mods would break if someone tried using both. The {{ModId}} token is very handy for that.
Thank!!! i have done that for some things, but have not consided to do that for her as well. seems like a god idea ๐
The rule of thumb is that if the ID is going to be for something that other mods could access, add {{ModId}}_ in front of it. That means that if it's an i18n key, dynamic token, or config token you don't need the mod ID prefix but for everything else you do.
context tags my beloved!
lovely to have in gift tastes because all items get an automatic context tag based on their category, so e.g. if you want someone to dislike all kinds of milk you can specify category_milk instead of whatever negative number the milk category is
This sounds like a fun trick. Is it kind of like creating a dynamic token?
Haven't seen context tags before
much simpler than that. you just use the text of whatever tag it is directly
context tags are arbitrary strings that can be attached to any object (it's part of the object data)
an object can have any number of them
Oooooohhhh. Interesting!
and then there are lots of places in data and code where you can check for "any item with X context tag" instead of checking for a specific item by id
I may have to look into that eventually. Can't think of anything I need it for right this second, but I bet it comes back around
Thanks!
any time
the only special trick in this case (gift tastes) is that the category-based context tags aren't in the data and are generated by code at runtime. so you have to know about that part
Context tags are a base game feature which makes them automatically better than cp tokens 
I can say that trying to debug movie(s) for NPC reactions is a PAIN in the posterior...
so i tried to help out with making this mod have it's items be randomized but when i tried to add "Random: 0.02" it did not work and idk what to do... i tried to randomize it based on the rarity of the items but it didn't really work ;-; i feel quite bad as i geniuenely wanna help out.
this mod ;-;
tried how?
like, what did you add exactly, can you copy a full example?
don't think random is a boolean (is that the correct term?) in shop code
Someone complained that it's been a year since 1.6 and my mods still aren't updated
wow, entitlement much?
I came very close to writing back that I have absolutely no intention of ever updating a mod ever again
that sounds like a them problem
people can be so annoying like dude, we're allowed to do other things but mod. we owe you nothing
can't you just lock comments or smth?
I recommend locking them instead, otherwise you'll get people chasing you down asking you where to find them
so they're still available but people stop bitching
at least that's what happened to me
I'm glad I'm getting comments with people saying they're excited for when I do update and not pressuring me TO update, I think I would explode actually
"why is this not updated?" don't speak to me or my mods ever again 
The entitlement from people who won't even put in the effort to send a simple SMAPI log is crazy
if people really want updated mods they should do it themselves and only ask you for permission
I was thinking the same thing - like if you want it so bad go make it yourself broski
pardon the quick interruption -- ๐โโ๏ธ i18n'ed my strings and my stringsfrommaps are not working anymore--
https://smapi.io/json/none/21631acd773042d6adbe8ca1a089f220
I know the json works because the top schedule strings are working and showing up
but when I click the stuff around sterling's room, it just gives me Strings/stringsfrommaps/sterlingplant (or w/e it is for example)
so its not a i18n translation issue either -- no issues on my console either ๐ค
if I could have another pair of eyes I'd be grateful
that's the crazy part, all my C# mods are MIT-licensed. literally if you care so much do it yourself. (they don't want to, they just want me to do it for them)
if only 
im wondering if it's because strings is not capitalized
but no content patcher shouldn't do that
From the json you shared, it seems that only the top schedule thing has closing comma?
the comma is after the comment, threw me off too
Oh that works huh. Sorry. ๐
fjfjdjsf
oh that's bc u don't have the .json to .jsonc thing
just for kicks and cause i literally see not a single errors can you see if changing strings to Strings does anything
where specifically? 
in all of the editdata of StringsFromMaps
on Tiled!
You have a couple of extra spaces in your tokens, is that intended?
between the token and i18n?
"halloween.001": "{{i18n:ARV.halloween.00{{Random:1,2}} }}",
"MiaPie": "{{i18n:ARV.MiaPie {{ImportToken}} }}",
before the closing }} on your i18n
I don't know if it matters at all, just something I noticed on a few entries
That import token should NOT be there
maybe that's it
let me try removing that
good catch LOL
(The spaces are fine)
(Thanks)
(It'll be funny if it's the import token and I accidentally pointed out the line for the space instead without knowing that the import token was an issue)
Woah.
I demand Mod updates, what are you all paid for if not to keep mods up to date ๐ ๐คฃ ๐
what did the import token do
i would accept payment to update mods. maybe i should actually consider it
Break the i18n apparently /lh
you can do the thing where you pass in a token to i18n
guessing it was what was in the import token
i forget how but i know you can
Huh.. interesting
If I had a mod I wanted updated that badly, I would offer but I can't think of one.๐
Import token might have parsed to something with unescaped symbols, maybe?
the import token is a sinner
It looked like something my i18nifier might have done (if Hime used it), so now I'm curious why it was there if it wasn't needed ๐
That reminds me, I need to start moving all of my Legend of Zelda NPC dialogue to i18n soon
Once I get the events fixed.
Ive had it turn up on the parser and make me puzzled too, Nomori. I cannot recall if it broke or worked though.
I had to hand-fix all of the places where the i18nifier tried to do tokens. Luckily, it wasn't too hard once I figured out what the problem was
So grateful for that tool, tbh
I put it there to work in a way I always used it, which is make a dynamic token with all the imports and just use that... but later I realized not a lot of people actually do it like this ๐
well I added version 1.0.0 of my movie to Nexus... and also realised there really isn't a suitable category for such a mod, so I added it to 'events'
Hey, another small question, when adding npc dialogue, do I need a dialogue.json and a i18n, or can I just do the i18n and attach with tokens?
A dialogue.json is a design decision you can make
An i18n json is the key way to do translations, though in theory you can skip it if you are ok with translators just changing your content.json and related jsons
Not sure what attach with tokens means in this context
I imagine they mean i18n right
If you do use a dialogue.json, this would ultimately need to be included (referenced) by the content.json (not optional for CP content pack)
The {{i18n: }} token
Yes, that is what I mean
yeah but if you use that token you need an i18n json
stuff
like an i18n folder with default.json
like the token has to pull the stuff from somewhere
Anyways it's recommended to do i18n for basically all mods
If you want to do both then simply Load your i18n/lang.json
when you put {{i18n: }} into your content.json or dialogue.json or whatever it is looks in your i18n folder and at the relevant language's json there
Okay! Thank you, very new to all of this, Iโve been referring to other mods to see how/learn and I saw it done both ways so I wasnโt sure if something was an old way or not.
whoops that pasted weird
Get upscaled doog
let's try that again
I guess maybe it belongs there idk just sharing 
the implications of a Qi monster are horrifying to me... I was thinking about spriting something where it's like... the qi fruit as the head with raggedy versions of his clothes, and then I had a mini crisis (/silly) about thinking of him like.. giving those things a horrible version of life...
Has anyone tried modifying MFM mail through CP already? 
I think you can only do that if it's added by CP as well
Like you did a EditData targeting mfm custom asset
I don't think so? 
Content Pack letters are also loaded into the new custom asset and therefore can be edited with Content Patcher.
I did a patch export and the letters are there, it just looks... intimidating I guess ๐
Yeah i guess it's target fields time 
I always sucked at those...
If you use vscode there's breadcrumbs at the top
Oh, I didn't think of that 
Huh, actually it only looked intimidating... it couldn't me more straightforward I guess
Oh... right... Mail Services Mod doesn't use content pipeline for their C# letters yet 
@mystic skiff Sorry for the ping! I just wanted to ask if you have any plans to make letters added by Mail Services Mod editable by CP? I love the recent update for MFM and Mail Services' wizard letter would be the only one stopping me from handling everything through just Content Patcher ๐
Also interesting how it always looks for the translation in MFM files first and not taking the i18n from the mod the edit is made in 
"trapped": "(no translation:Test)[#]Trapped Souls?",
Isn't that what this update was about? #making-mods-general message
MFM is different from Mail Services Mod, innit?
Mail Framework Mod 1.20.0 released.
Adds a new custom asset to the game. (DIGUS.MailFrameworkMod/MailData) That means MFM letters can now be loaded with Content Patcher and take use of all its features like tokens. It supports the same properties.
Content Pack letters are also loaded into the new custom asset and therefore can be edited with Content Patcher.
Oh I misread
im working on an AT version of some obelisks. I was wondering if anyone knew of a way to only use a patch when an AT texture is applied? ex. in the CP version I can turn "DrawShadow" off with an EditData patch, but for the AT version, I'd like that patch to only be applied when the texture is being used
I didnt see anything in AT docs about their custom tokens but I might have overlooked it, any ideas?
Yeah, I meant that it looks for the translation in the MFM content pack, not in my mod when I'm editing just the text field of the letter
That example wasn't from Mail Services
(i was just responding to matt!)
Ah ๐
If i reference Newtonsoft.Json, I don't have to bundle the dll with my mod, right?
i believe you specifically shouldnt, i think if you did it might cause errors?
since smapi already loads it
ok sweet
You may also want to directly reference smapi's copy
I'm in rider. Do you mean to right click on the .csproj, select Add > Reference... and then select the Newtonsoft.Json.dll from smapi-internal?
(Uh. I do it in at least one mod, I forget hiw)
<Reference Include="Newtonsoft.Json" HintPath="$(GamePath)\smapi-internal\Newtonsoft.Json.dll" private="false" />
Item group
Hi SinZ!
aight thank you!
having it access real cp tokens is already changing the semantics, but currently it can only use a subset that can't accept inputs, if you want i18n to use tokens I would do it fully and treat the entire i18n message as a tokenstring so it can use the full power of content patcher
Performance wise, with a lot of mods and tokens etc, it can already be 20-30ms every TimeChanged events just in TokenManager.UpdateContext alone, its an area I want to dive in further but optimising it is hard
quick question? how possible is it for anyone to update this mod?
https://github.com/daleao/bagi-meads/releases
does it not work?
i love playing with this mod and idk if it's even remotely possible to make a version that works it even better artisan good icons
EBAGI is the update to BAGI
tried it multiple times but don't work
and it's supposed to be a drop in replacement, you just need to change the ContentPackFor field?
Graph theory very scary indeed
Have you asked the original mod author their thoughts? Pretty sure DaLion is still active
i can try that!
Although the original motivation is not access real tokens but avoiding big ol i18n passthrough dynamic tokens
Often mod authors will have some opinion like: "oh yeah, I was going to do that", or "it's fine if you get someone to do it", or "it's on the list...someday"
the less passthrough/dynamic syntax tokens the better
I will come back to this eventually tho, letting people just use real tokens would permanently solve the confusion around i18n and cp tokens
the point was that people were using passthrough tokens with dynamic syntax to do this


