#making-mods-general

1 messages ยท Page 283 of 1

lucid iron
#

still for your case kantrip SVE probably just patch some place in dialogue too, i'd put false dep and call it a day

uncut viper
#

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

lucid iron
#

sometimes i see logs about CMCT looking at token in me mod and i wonder what token is possibly of interest here Dokkan

uncut viper
#

like, non-trace logs?

lucid iron
#

no just trace logs, i am being silly

uncut viper
#

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

lucid iron
#

and anthropomorphizing a dll as a little guy with opera glasses

uncut viper
#

i support dll anthropomorhpization

quasi dew
#

DUH! Thank you!!

orchid acorn
#

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 sweatsnervously

calm nebula
#

That's completely different and has to do with how schedule strings work in MP

orchid acorn
#

Huh I see

#

It was right under dialogue so I figured that might've been my issue me

calm nebula
#

Can we see your schedule lol

orchid acorn
#

Ya! sorry was throwing it in validator

#

it's... a mess

calm nebula
#

(No worries!)

orchid acorn
#

but its specifically the marriage ones!

#

none of them are working

calm nebula
#

The 1910 point?

#

Missing space between 0 and \"

#

Schedule be fun lol

orchid acorn
#

oh my god

#

that might be it for all of them

#

let me fix

uncut viper
#

atra why is schedule parsing so nitpicky

calm nebula
#

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

orchid acorn
#

IT WORKS

#

Well almost, apparently I screwed my i18n?

#

wait no it's not i18n

#

why is bro complaining its right there

calm nebula
#

Did you load a blank

orchid acorn
#

yes'm!

urban patrol
#

does the 'credits' box on nexus allow the use of HTML?

golden spire
#

I would assume just bbcode

urban patrol
#

hmm i don't know how to write that :(

#

there's no toolbar at the top like there is for the description

golden spire
#

[b]bold[/b]

lucid iron
#

I think u can put <a>

#

Try it maybe?

golden spire
#

[url=https://www.bbcode.org/]This is bbcode.org![/url]

urban patrol
#

oh thank you

#

i can confirm HTML does not work lol

golden spire
#

[list] [*]item 1 [*]item 2 [/list]

urban patrol
#

thank youuu

ornate locust
#

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

urban patrol
#

ooooh good idea

calm nebula
ocean sailBOT
#

Can you do these steps to provide more info?

  1. Load your save and view the content that should be patched.
  2. Type patch summary directly into the SMAPI window and press enter.
  3. Upload your SMAPI log to https://smapi.io/log (see instructions on that page).
  4. Post the log link here.
ocean sailBOT
#

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

calm nebula
#

Hmmm

#

I don't see your editdata patch in that

#

You sure it's included somewher

orchid acorn
#

isnt it these?

#

because its included right here too

calm nebula
#

Ahah!

#

Invalid token

#

Random,1,2

#

Where you meant "Random:1,2"

orchid acorn
#

HUH BUT

uncut viper
#

there is, in halloween.001

orchid acorn
#

yEAH I was searching in the wrong one UGiggle

uncut viper
#

comma colon errors come for us all eventually SDVpufferpensive

orchid acorn
#

tytytyty

#

restarting my game to retest but

tiny zealot
#

(there's a karma chameleon joke here but i'm lazy /lh)

orchid acorn
#

an error from different key would be affecting all other ones?

uncut viper
#

comma chameleon...

#

its in the same patch so i wouldnt be surprised if it bonks the whole patch

orchid acorn
#

BRO SPEAKS

rigid musk
orchid acorn
#

Okay. THANK GOD. that feels so good

rigid musk
#

Aw yis

orchid acorn
#

if I could just trouble you guys for one more error that I've been unsuccefuslly trying to debug for hours

brave fable
#

sorry, you've hit the usage quota (5/5 responses)

orchid acorn
uncut viper
#

!ask /lh

ocean sailBOT
#

Ask your question or describe your issue here, and someone will help if they can!

brave fable
#

try again in 24 hours? or you can get the premium plan for a monthly fee

uncut viper
#

(sorry i just really like getting the chance to use that command)

calm nebula
#

I mean I'm off to eat dinner and knit

#

Button can handle the next queries

uncut viper
#

hopefully!

haughty charm
#

Is there an easy way to see/print a mod's fishing zones?

uncut viper
#

(did LA ever get that PR'd in?)

#

(it might've?)

orchid acorn
#

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

uncut viper
#

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?

brave fable
#

(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)

haughty charm
uncut viper
#

Hime I'll be honest Atra kinda left me out to dry here because I have no idea how LittleNPCs works

haughty charm
#

Not per fish, but per map

uncut viper
#

also your smapi.io link seems to be uhh. broken?

orchid acorn
#

...

#

uh

uncut viper
#

i have no idea what to make of this smapi.io error

orchid acorn
#

I keep reuploading and it gives me the same

uncut viper
#

did you copy the whole link or are you missing a letter or something

orchid acorn
#

I HAD. Never seen that

#

no it just gives me that when I click parse

#

I'm uploading my file directly

uncut viper
orchid acorn
#

pleading sorry for breaking the validator.

golden spire
#

you don't need validating anyway HIme

#

๐Ÿ˜›

orchid acorn
#

๐Ÿ˜ญ

#

no but this bug has been plaguing me the whole afternoon

#

and I really want to get it sorted (hopefully)

uncut viper
#

(also logo unfortunately i dont know of a way to do what you seek SDVpufferpensive my apologies)

orchid acorn
#

this is how I try to edit Sterling's dialogue

haughty charm
#

I may have to just best guess it

tiny zealot
brave fable
#

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

uncut viper
#

data layers is also what i was thinking it could be in

haughty charm
#

If I knew how to code it, I'd completely submit a PR for it

orchid acorn
#

It shouldn't be i18n or it'd be showing no translation, right?

rigid musk
#

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

uncut viper
#

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

tiny zealot
#

TwoKids i'm pretty sure uses _1, _2, and _3 (no _0) don't listen to this guy

uncut viper
#

this.addMarriageDialogue("MarriageDialogue", "TwoKids_" + r.Next(4), false);

rigid musk
#

They both use 0-4 iirc

uncut viper
#

4 would not be included here

orchid acorn
tiny zealot
#

nevermind, old man memory. there's a 0

orchid acorn
#

so I'm only editing the one through the kids mod

uncut viper
#

i might be missing it but i dont see anything that checks if it randoms 1, 2, or 3 without that entryexisting, though?

rigid musk
#

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)

uncut viper
#

Random.Next(4) means it'll be up to but not including 4

#

most randoms will be exclusive on the upper range

tiny zealot
#

the game will pick the key, then try to load it (or fall back if needed)

rigid musk
#

Then.. why does the fourth option exist pondering

uncut viper
#

will it fall back to 0, though, if it chose TwoKids?

#

or will it fall back to generic marriage dialogue

brave fable
#

(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)

tiny zealot
#

so if you only edit 0, then 1, 2, or 3 will all choose the corresponding generic line

uncut viper
#

thats 5 results bluebs

brave fable
#

(i know but it'd be embarrassing to edit it)

uncut viper
#

understandable

rigid musk
uncut viper
#

i guess try adding TwoKids_1 thru TwoKids_3 with the same i18n key and see if it works

orchid acorn
#

one sec

#

OKAY SO

rigid musk
tiny zealot
orchid acorn
#

NODDING

#

let me grab my rice and try filling those in

tiny zealot
#

it looks like you have a few more types that may exhibit the same problem (Good, OneKid, Outdoor, Rainy_Night)

uncut viper
tribal ore
#

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!

rigid musk
#

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

uncut viper
#

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

rigid musk
#

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

uncut viper
#

wait, where does the wiki mention it

#

bc it shouldnt mention 4 as being an option

rigid musk
ivory plume
# uncut viper Pathos has been making some changes to the validator lately, so <@22680319821873...

Congrats! You found a bug in Json.NET:

  1. 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.
  1. 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.*/
  1. Try to parse the JSON to update error line numbers, and fail because now the syntax is invalid.
uncut viper
#

yeah that should be 0-3

#

i transfer this congratulatiosn to Hime who is the one that broke it SDVpuffersquee

rigid musk
uncut viper
uncut viper
rigid musk
#

I wonder if any other entries are like that pondering

orchid acorn
#

/ j

#

Thank you pathos UGiggle

uncut viper
#

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)

orchid acorn
#

dw UGiggle no need now I have the issue

tiny zealot
orchid acorn
#

I'm editing my files rq to report bacl

uncut viper
#

json.net is the regular C# library for it isnt it

#

oh wait no

#

im thinking of system.text.json or smth

ivory plume
#

(Json.NET is the package name, and Newtonsoft.Json is the package ID; they're the same thing.)

tiny zealot
#

thanks! SDVpufferheart

uncut viper
#

this is what happens when you leave me out to dry atra

orchid acorn
#

he spoke folks ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘

#

(thank you y'all were correct)

brave fable
#

damn hime you live like this

calm nebula
#

And sleep

#

And knit

uncut viper
#

apology accepted

lucid iron
#

i dunno i think hime at lest moved the furniture out of the hallway

#

whereas i leave that there when i debug hu 2

orchid acorn
#

the garage is just getting started blueberry ๐Ÿ˜ญ man is doing his best.

calm nebula
#

Has someone made a mod with more (aggressively big) house renovation yet?

safe badge
ocean sailBOT
#

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

brave fable
#

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?

lucid iron
#

None log with left beef is my favorite calzone

brave fable
#

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

safe badge
#

its a mod ive made, i put the map.tmx from tiled into my assets foler, one sec on the pic

calm nebula
#

(The {})

brave fable
#

(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)

orchid acorn
#

I think the site is down

safe badge
brave fable
quasi dew
#

whomp whomp.
I had everything working and now smapi is having issues finding files?

#

shadows = spouses :/

ivory plume
uncut viper
#

kind of SDVpuffersweats

ivory plume
brave fable
gaunt orbit
#

@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>)

brave fable
#

very python, very zen.

calm nebula
#

Heyyyy

uncut viper
#

if at first you dont succeed, give up

safe badge
brave fable
#

"well, i tryed."

opaque cobalt
#

how did my download number for a mod go up when the mod was hidden?

lucid iron
#

it was just slow b4

opaque cobalt
#

ah

safe badge
ocean sailBOT
#

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

ivory plume
uncut viper
#

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

gaunt orbit
ivory plume
#

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!

quasi dew
#

spouse army has been assembled, thank you button for suggesting values bc I'm an idiot.

uncut viper
#

not an idiot, just learning SDVpufferthumbsup

orchid acorn
#

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",

uncut viper
#

have you changed the input separator

orchid acorn
#

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",

uncut viper
#

i did notice earlier you had some things with a different input separator set

quasi dew
uncut viper
#

so if you're choosing from random dialogues make sure to change it from comma

orchid acorn
#

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

uncut viper
#

if you are doing {{Random: {{i18n blabla}} }} then remember the i18n is going to be replaced with the dialogue before the randoim happens

lucid iron
#

i thought hime is randoming on the i18n key tho, unless that changed

uncut viper
#

i dunno what hime is doing bc i dont remember the json

orchid acorn
#

thank you salute

ivory plume
#

(Tokens are substituted with their value in inner-to-outer order.)

orchid acorn
#

guess a comma did really eat his grandma

uncut viper
#

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

orchid acorn
#

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}}}}}}",

tiny zealot
#

unrelated to the comma issue but have you met my friend ${male^female^other}$, who could save you some text duplication

orchid acorn
vernal crest
#

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

orchid acorn
#

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 ๐Ÿ˜Œ

lucid iron
#

oh this one's random on outside right

#

so the , is sep

orchid acorn
#

wait

#

can you reexplain that slower

uncut viper
#

those are two different Good_0 keys, which one is being used here

lucid iron
#
{{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 SDVpufferpensive

#

this is terror

orchid acorn
#

OKAY SO.

tiny zealot
#

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

orchid acorn
#

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

uncut viper
#

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

orchid acorn
#

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)

uncut viper
#

if there is an i18n token inside of a random token, the random token must be fixed

lucid iron
#

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}}}}

uncut viper
#

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

brave fable
#

(why use range for only one of the random number tokens?)

uncut viper
#

my guess would be that chu got lost in the brace sauce and didnt notice

#

bc i sure didnt

orchid acorn
#

I'm the one who got lost in the sauce writing these UGiggle, tbf

brave fable
#

(i can't believe chu wrote this.)

uncut viper
#

unfortunately this is a sauce of your own making SDVpufferpensive

lucid iron
#
{{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

uncut viper
#

for some reason its less parseable to my brain when you present it like this

lucid iron
#

but this is the abstract syntax tree...

orchid acorn
uncut viper
#

do you typically find abstract syntax trees to be the most human readable form of code

orchid acorn
#

Because there's

Sterling.Marriage.Good.Cookie
Sterling.Marriage.Good.Muffin
Sterling.Marriage.Good.Both

lucid iron
#

oh yea i forgor

uncut viper
#

back to the sauce you go chu

orchid acorn
#

AH Thank you chu

lucid iron
orchid acorn
#

but doesn;t that maintain the comma issue?

lucid iron
#

no cus i18n is on the outside now

orchid acorn
#

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 UGiggle

#

I appreciate the patience UGiggle

#

my hubris immediately trying to commit i18n crimes SBVLmaoDog

lucid iron
#

the actual problem doesn't have much to do with i18n, but rather how Random works

orchid acorn
#

yeah but I'd never really had to deal with any of this before since i18n was what opened the door to this madness

uncut viper
#

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

fathom hound
#

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?

uncut viper
#

(unless you can be 100% sure none of your i18ns have commas in them)

lucid iron
#

nop

#

what r u doing

brave fable
#

unfortunately, every dried item is simply Dried

uncut viper
#

aint that the truth

fathom hound
#

Ah ratsโ€ฆโ€ฆ

uncut viper
#

the rat infestation turned out to be junimos actually

brave fable
#

if you're using item queries though you can get a little more particular

fathom hound
#

Thereโ€™s nothing spacecore or some other framework can do either?

lucid iron
#

well theres various places u can get flavoring from

orchid acorn
lucid iron
#

there's an unreleased feature in PeliQ for this if the place is item query

brave fable
#

i don't know SDVpufferthumbsup

fathom hound
#

Oop sorry

uncut viper
lucid iron
#

see thats why i tree'd it button

orchid acorn
#

Let me tree it hamnod

uncut viper
#

i can say i think the input separation is fine but whether it works as intended is up to your random ranges

uncut viper
orchid acorn
#

I wish you could like. highlight different colors in visual studio UGiggle

#

but what mattered was removing the comma in between {{i18ns}} being randomized, right?

uncut viper
#

correct

vernal crest
#

There's probably an extension that colours bracket groups

brave fable
#

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

uncut viper
#

one has higher odds

orchid acorn
#

cookie muffin have 15 and both has 8

lucid iron
#

too late button it's worse now
Sterling\.Marriage\.Good\.(((Cookie|Muffin)_(\d|\d[0-5]))|(Both_[0-8])){{FirstbornTokenPass}}

orchid acorn
#

In hindsight, I could just make both have 15 too

#

and then I wouldn't have to use a comma....

uncut viper
lucid iron
#

that is basically what i attempted with my refactor at least

orchid acorn
brave fable
#

sdvpufferregex emoji

orchid acorn
#

what if that, would it still hate commas?

uncut viper
#

well. no. but you're doing essentially {{Random: 1}} there

lucid iron
#

you have to either

  • do Random inside, i18n outside
  • use a different input separate on the outermost Random
uncut viper
#

unless FirstbornTokenPass is another potential dialogue to choose

#

but i assumed that was a token passthru into the i18n

orchid acorn
#

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

lucid iron
#

button's solution of using ++ is input separator

#

my solution of refactor is put i18n on outside

uncut viper
#

"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

orchid acorn
#

outside of my random

uncut viper
#

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

orchid acorn
#

AH, thank you

uncut viper
#

using the passthrough in a token is also terrifying good luck with that

lucid iron
#

wait does that work yggy

fathom hound
uncut viper
#

it does but its not recommended

uncut viper
#

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

orchid acorn
#

HOLDING

uncut viper
#

"Good_0": "{{i18n:Sterling.Marriage.Good.{{Random: Cookie, Muffin, Both}}_{{Random:{{Range:0,15}}}} {{FirstbornTokenPass}}",

orchid acorn
#

thank you for the patience

calm nebula
#

oh my god

#

oh my god

#

anyways

#

enjoy!

uncut viper
#

dont look at me atra im just working with the setup as given

calm nebula
#

I AM VERY MUCH LOOKING AT HIME

orchid acorn
#

UWahVanish sorry for my crimes, I really thought I was being clever atra

#

I take all criticism UWahVanish

calm nebula
#

(no worries!)

uncut viper
#

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

calm nebula
#

what's "cookie" and "muffin" here

uncut viper
#

those are baked goods

lucid iron
#

the original usecase for 2 is sell every kind of target bait

orchid acorn
lucid iron
#

who let this man name kids

uncut viper
#

it is very clever. its also very easy to break things with it

orchid acorn
uncut viper
#

it will not

lucid iron
#

i thought {{FirstbornTokenPass}} is supposed to go inside i18n tho

uncut viper
#

is that not inside the i18n

#

ok if you fix my braces then itll work

orchid acorn
fathom hound
orchid acorn
#

so I just do as growing valley does...

uncut viper
#

i think it just needs a }} at the end

orchid acorn
#

"Good_0": "{{i18n:Sterling.Marriage.Good.{{Random: Cookie, Muffin, Both}}_{{Random:{{Range:0,15}}}} {{FirstbornTokenPass}} }} yeah this should be it

uncut viper
lucid iron
orchid acorn
#

AH, NODDING

lucid iron
#

not super sure on exact syntax tho

fathom hound
#

Iโ€™ll check it out ty

uncut viper
#

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

lucid iron
#

is {{FirstbornTokenPass}} something like | FirstBorn={{ChildNames|indexat=0}} (idk if i got this right

uncut viper
#

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

orchid acorn
#

I would listen but unfortunately I wouldn't know another way to be able to get the children display names otherwise ferretplead

#

and it's been working up until now? ferretplead

orchid acorn
# lucid iron is `{{FirstbornTokenPass}}` something like `| FirstBorn={{ChildNames|indexat=0}}...
            "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}}",
        },```
lucid iron
#

oh it was valueAt right

uncut viper
#

thats terrifyijng

lucid iron
#

what the fuc

uncut viper
#

please put that away

orchid acorn
#

(from the Growing Valley content.json)

lucid iron
#

@ silicon i have questions

uncut viper
#

wheres your fucking syntax tree now chu

brave fable
#

this is syntax mulch

lucid iron
#

yea its a forest

orchid acorn
#

IT'S BEEN WORKING THUS FAR

#

I CAN ATEST

uncut viper
#

like i said, itll work well until it doesnt. good luck if it stops working!

orchid acorn
#

NODDING

#

ok time to test

#

thank you all for the headaches I have no doubt given you

uncut viper
#

no despite my grumbling about your tokens its all in good fun i enjoy debugging other peoples issues

lucid iron
#

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 LilyDerp

uncut viper
#

it assigns every possible thing they might expect in an i18n token

#

yes

lucid iron
#

why...

uncut viper
#

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

lucid iron
#

this syntax forest is dry and a wildfire hazard

uncut viper
#

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

orchid acorn
#

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

uncut viper
#

and id do e.g. |ParentFarmer={{ParentFarmer}}

orchid acorn
#

but it is terrifying

calm nebula
#

(I'm very surprsied this works)

#

anyways.

uncut viper
#

maybe eventually you can convince Pathos to add a like, "add these tokens to all i18n tokens by default" feature

orchid acorn
#

pathos...

tiny zealot
#

i always only pass in what i use. something something empathy for the machine

fathom hound
#

Am I cooked, not cooking? 5266_pensive_clown doesnโ€™t look like I can use specific artisan goods here for ingredients, or am I missing something

wise berry
#

Oh hi... I heard my name

uncut viper
#

silicon! hello

lucid iron
#

im glad you are here to please defend yourself

wise berry
#

It was mostly for translation compatibility ahaha

vernal crest
#

Hi silicon!

wise berry
#

I wanted translators to be able to use any tokens in their i18n for pronouns

lucid iron
wise berry
#

Not that. any took me up on the offer, though

orchid acorn
#

trying to bring growing valley the love it deserves

wise berry
#

But the option's there

orchid acorn
#

my humble content pack

lucid iron
#

DokkanStare this is a pretty good case for some kinda "default apply i18n token" then

wise berry
#

Hehe

fathom hound
uncut viper
#

chu can PR it into Content Patcher if you'd like, silicon

lucid iron
#

isnt this a smapi feature

wise berry
#

:O

uncut viper
#

well how do you think SMAPI gets it from the i18n token

lucid iron
#

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

uncut viper
#

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

wise berry
#

My only remaining concern after that is that I have separate tokens for the first child and the second child's display name

drowsy pewter
lucid iron
#

yggy but i use args in smapi translations sometimes

#

wouldnt we want parity

uncut viper
#

im not sure what your point is

lucid iron
#

a discussion on how the impl should work

wise berry
uncut viper
#

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

calm nebula
uncut viper
#
TranslationArgs: [
  {
    "Arg": "ParentFarmer"
    "Value": "{{ParentFarmer}}"
  }
]

this would pass thru ParentFarmer into every i18n token

#

something like this

wise berry
#

Oooh

lucid iron
#

yea but i mean u have this in the actual helper
I18n.GetByKey(Keys.Shop_TimeRange, new { openTime, closeTime })

orchid acorn
#

-# (excellent news, sterling is no longer afraid of commas !)

uncut viper
#

why are you worried about the C# side here though

#

C# mods can already do this

calm nebula
uncut viper
#

just maintain a dictionary of substitutions and pass it in every request

lucid iron
#

so it should be place where u set a shared dictionary right think

uncut viper
#

all Content Patcher is doing is that function atra just posted

orchid acorn
# wise berry Oooh

(I have 7 days until release still, so lmk if you're changing anything in between that โค๏ธ )

uncut viper
#

this feature would just make content patcher start with a pre-populated dictionary

lucid iron
#

oh but this has to support tokens i see yggy

wise berry
orchid acorn
#

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

uncut viper
#
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

calm nebula
#

ApplyGenderSwitchBlocks(apply: false)

#

is it bad I want to know

lucid iron
#

hm what does it do with local tokens yggy

#

or is it just "dont put local tokens in global thing dummy"

wise berry
#

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?

lucid iron
#

*what should it do i mean

uncut viper
#

the tokens get parsed before they become IInputArguments surely

uncut viper
wise berry
#

But damn if it doesn't sound nice to just pass tokens through i18n automatically regardless ahaha

uncut viper
lucid iron
#

but isnt the point to resolve it just before i18n LilyDerp

calm nebula
#

ah

uncut viper
#

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

calm nebula
#

set the field that says don't apply gender switch blox

uncut viper
#

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

uncut viper
#

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

lucid iron
#

Sleepden why am i make this PR then

uncut viper
#

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

lucid iron
#

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 3sSmolMiku

uncut viper
#

which is exciting new territory for you im sure

#

good practice for you

lucid iron
#

it is now back to regular ol C#

uncut viper
#

which you're great at! thats why you're the person for the job SDVpufferthumbsup

calm nebula
#

(I'm enjoying this)

uncut viper
#

i'd ask atra but i dont want to ruin their actual modding

#

it happens so rarely

calm nebula
#

(Button has figure out the voluntelling)

lucid iron
#

help atra im being marketed to really badly

uncut viper
#

i learned from the best

haughty charm
#

(I'm also enjoying this)

uncut viper
#

plus i kinda already told silicon you'd do it sooo

wise berry
#

Bahaha

lucid iron
#

badly as in

#

every additional marketing is dealing 2 damage to my motivation to actually do it

uncut viper
#

does your motivation used a signed int, per chance

lucid iron
#

its a signed char

uncut viper
#

well thats not helpful

wise berry
#

Dang, now I gotta rethink some logistics. I hate logistics (belovedly)

lucid iron
#

i wonder if i can just open anther field on dynamic tokens tho

uncut viper
#

(truthfully, if i understood CP's codebase a bit better, id probably at least take a stab at it)

lucid iron
#

to mark it as provide to i18n

uncut viper
#

(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

lucid iron
#

tbh i think PRing anything to pathos is indirectly creating more work

uncut viper
#

thats the case for all PRs innit

lucid iron
#

he rewrites them pretty hard

uncut viper
#

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 SDVpufferpensive

lucid iron
#

if u want something that isn't a dynamic token then this goes back to hm what does it do with local tokens

uncut viper
#

there wont be local tokens

lucid iron
uncut viper
#

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"

lucid iron
#

then... they are just dynamic tokens

#

but provided to i18n by default

uncut viper
#

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

lucid iron
#

the ujnderstood cant get any lower PecoSmile

uncut viper
#

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

lucid iron
#

the reason why i was just gonna stick it onto dynamic tokens is cus there is this whole context update lifecycle that would become bolbwaitwhat to me if it is separate

orchid acorn
uncut viper
#

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 SDVpufferthumbsup

#

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)

lucid iron
#

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 bolbthinking

uncut viper
#

im still not sure what you mean or why though

lucid iron
#

then u can updoot things less

uncut viper
#

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

lucid iron
#

but yea ill start with naive implementation Dokkan

uncut viper
#

itd just turn GetByKey(translation, {}) into GetByKey(translation, { token: value }) on the SMAPI side of things

lucid iron
#

i'd like to expose something like KeysInThisTranslation

#

but that is extra complexity for later

uncut viper
#

so that CP can ask what keys are in it, and only grab the ones necessary?

lucid iron
#

yea

#

and updoot less

uncut viper
#

im still not sure why you're assuming things would update tho

#

nothing should be updating at all if it doesnt need to

lucid iron
#

well if i had apple banana orange

uncut viper
#

(is that for possible values of a dynamic token or)

lucid iron
#

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 yggy

#

at the same time, im not too sure what the current behavior is

uncut viper
#

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

lucid iron
#

this would make it behave different than current usecase no?

uncut viper
#

which i think makes the problem actually, how do you tell the i18n to update, bc now its unaware

lucid iron
#

yea bolbwaitwhat

uncut viper
#

so current behaviour updates too much, this proposal updates too little

safe badge
lucid iron
#

so i want to find out what args are used in a key

uncut viper
#

how would Content Patcher use that to check if the i18n key should update?

uncut viper
urban patrol
uncut viper
#

its deprecated pre-1.6 behaviour for adding custom locations

urban patrol
#

ah

lucid iron
#

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

uncut viper
#

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

lucid iron
#

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

safe badge
uncut viper
#

!mapmaking i cant remember if someone posted this command for you earlier

ocean sailBOT
#

If you want to make mods that add or edit maps:

  1. Use Tiled to edit .tmx or .tbin files.

  2. Refer to the Maps wiki page for details on how maps work in Stardew Valley.

  3. Content Patcher allows you to create custom locations through editing Data/Locations

  4. Vanilla Maps can be edited via Content Patcher as well: EditMap

uncut viper
#

alongside the EditMap documentation there you'll need to look at the Load documentation

uncut viper
#

i guess if you have the translationhelper you dont need to

lucid iron
#

yea TranslationValueProvider has ITranslationHelper

uncut viper
#

hm.

lucid iron
#

idk where to get DT tho 3sSmolMiku

uncut viper
#

uhhhhhhh i forgor

lucid iron
#

*where to get DT without crimes

uncut viper
#

CP's ScreenManager has a TokenManager in it

lucid iron
#

if i cant just get DT then a separate field at top level is prob the way blobcatgooglyblep

uncut viper
#

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?

lucid iron
#

i thought im supposed to get it from IContext LilyDerp

uncut viper
#

idk thats just the dictionary that the TokenManager loops over when calling UpdateContext

#

it stores cached modcontexts

#

and ModTokenContext holds Dynamic Tokens

lucid iron
#

but hm new idea

#

set of tokens that r accessible from i18n

uncut viper
#

elaborate

lucid iron
#
{
  "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

uncut viper
#

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

lucid iron
#

but this seems easier

#

to spaget

uncut viper
#

does it really

#

i thought you thought adding a new top level section was harder

lucid iron
#

yea but it doesnt seem like i can access DT easily from translation value provider

#

but i dunno check back in like a day

uncut viper
#

how would you get the TranslationPassthrough if you cant even get the DynamicTokens

lucid iron
#

i give it to provider immediately

#

its invariant so

uncut viper
#

why couldnt you just do the same with a reference to its dynamic tokens

lucid iron
uncut viper
#

you could still do that

#

just skip the tokens whose names dont have an arg

lucid iron
#

still the interface from IContext is IToken? GetToken(string name, bool enforceContext);

uncut viper
#

is that important i think i mightve lost the plot a little bit idk how we got to the GetToken interface

lucid iron
#

well whether i was ever on a plot is questionable

uncut viper
#

i think you were on the plot

lucid iron
#

but i am at TranslationValueProvider.UpdateContext right

brave fable
#

honestly i'm just surprised the series is still going

uncut viper
#

i mean i do now see the merits of the GetArgs thing in SMAPI

lucid iron
#

where i can obtain the ITokens changed

#

oh but do i know they r changed yggy

#

i guess not

uncut viper
#

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

lucid iron
#

yea

uncut viper
#

though i guess what if you intentionally wrote {{season}}

#

how do you differentiate between a substitution and just, text

lucid iron
#

maybe if your character is sentient wikitext

uncut viper
#

it could be a menu, or a sign, or some other messagebox

lucid iron
#

ah brand new problem translation updoot seem to happen before others bolbthinking

#

how is this not circular bolb

uncut viper
#

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

lucid iron
#

until now kind of

uncut viper
#

or something. idk. im not a content patcher specialist

lucid iron
#

if this work

uncut viper
#

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

lucid iron
#

i think its graph theory

uncut viper
#

i dislike that

lucid iron
#

like many things in life

uncut viper
#

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

lucid iron
#

dats what i was trying to do kinda?

uncut viper
#

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

lucid iron
#

hmmm

#

this approach im on is gonna permanently ban {{i18n}} in dynamic tokens think

uncut viper
#

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

lucid iron
urban patrol
#

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?

tender bloom
#

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

brave fable
#

consider: robin likes the cooked foods category, but loves spaghetti

urban patrol
#

thank you!

vernal crest
#

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

lucid iron
#

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 LilyDerp

uncut viper
#

you got that out like surprisingly fast, i didnt realize you were nerdsniped that hard

#

+ using Force.DeepCloner; SDVpuffersweats

#

is there no other way than shallowcloning where you are or is that just bc prototype

lucid mulch
#

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

lucid mulch
#

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

lucid mulch
#

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}}

golden spire
#

Is there a reason I can't seem to patch export Data/MovieReactions ?

blissful panther
gray bear
#

s really does ruin lives

golden spire
#

.<

spiral lion
golden spire
#

what day are you on, in game? and do they have a schedule where they move at least a couple of places?

spiral lion
#

they dont move!
and i started a new file to check if it works ๐Ÿ˜ฆ

#

oh

#

yes they to hahaha

golden spire
#

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.

spiral lion
#

Yeah, I really dont know why it do not work.

vernal crest
#

Do you have gift tastes?

golden spire
#

ah yes that will do it too

spiral lion
#

no i have not! can that be the problem???

golden spire
#

yep

spiral lion
#

okay thank you :)))

vernal crest
#

Yeah NPCs won't use conversation topics without gift tastes

spiral lion
#

Okay!! thank for your help!

#

Oh it kind of works not ๐Ÿ™‚

vernal crest
#

Kind of works?

#

(She is looking gorgeous, by the way!)

hard fern
#

Oh i never thought of using walls as stair railings

#

I'll have to try that

gray bear
#

very creative. I love her portrait and house ๐Ÿ’œ

golden spire
final sequoia
#

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.

vernal crest
#

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

craggy cape
vernal crest
craggy cape
#

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 5thonking

#

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

calm nebula
#

Recommendation: do the ones you want first

#

Make the mod

#

Post it.
When adoring fans come in, do the ones they suggest

lucid iron
#

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

midnight oyster
#

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

calm nebula
#

!npc

ocean sailBOT
#
Creating a Custom NPC

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

final sequoia
vernal crest
midnight oyster
midnight oyster
#

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

vernal crest
#

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

midnight oyster
#

Gotcha, thank you!!

vernal crest
spiral lion
#

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)

golden spire
#

they are on websites but you can look at your own game files

vernal crest
#

!itemids

ocean sailBOT
golden spire
#

have you extracted them?

vernal crest
#

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

spiral lion
#

Is that them??? haha oh.. but why did i thought you needed both the id and the categories?
Okay thank!! โค๏ธ

golden spire
#

depends what you're trying to do

vernal crest
#

You can set gift tastes for individual items, categories, or context tags iirc

spiral lion
#

okay! i think i am grasping th concept now ;-)))

vernal crest
#

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.

spiral lion
#

Thank!!! i have done that for some things, but have not consided to do that for her as well. seems like a god idea ๐Ÿ™‚

vernal crest
#

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.

tiny zealot
gray bear
#

used those to make jorts and jean love all seafood sushi

#

no typing every single item SDVpufferwoke

tribal ore
#

Haven't seen context tags before

tiny zealot
#

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

tribal ore
#

Oooooohhhh. Interesting!

tiny zealot
#

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

tribal ore
#

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!

tiny zealot
#

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

lucid iron
#

Context tags are a base game feature which makes them automatically better than cp tokens PecoSmile

golden spire
#

I can say that trying to debug movie(s) for NPC reactions is a PAIN in the posterior...

rare orbit
#

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 ;-;

hallow prism
#

like, what did you add exactly, can you copy a full example?

gray bear
#

don't think random is a boolean (is that the correct term?) in shop code

calm nebula
#

Someone complained that it's been a year since 1.6 and my mods still aren't updated

gaunt orbit
#

wow, entitlement much?

calm nebula
#

I came very close to writing back that I have absolutely no intention of ever updating a mod ever again

gray bear
#

that sounds like a them problem

calm nebula
#

Tbh I should hide them

#

I really should

#

Anyways

gray bear
#

people can be so annoying like dude, we're allowed to do other things but mod. we owe you nothing

crude plank
#

can't you just lock comments or smth?

calm nebula
#

At that point I should just hide them tbh

#

They don't work anyways

gaunt orbit
crude plank
#

so they're still available but people stop bitching

gaunt orbit
#

at least that's what happened to me

rigid musk
#

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

gray bear
#

"why is this not updated?" don't speak to me or my mods ever again angymoon

rigid musk
#

The entitlement from people who won't even put in the effort to send a simple SMAPI log is crazy

gray bear
#

if people really want updated mods they should do it themselves and only ask you for permission

rigid musk
#

I was thinking the same thing - like if you want it so bad go make it yourself broski

orchid acorn
#

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 ๐Ÿค”

#

ferretplead if I could have another pair of eyes I'd be grateful

gaunt orbit
#

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)

gray bear
#

hime i think i see a missing comma. lemme

#

nvm i was wrong

orchid acorn
#

if only UWahVanish

gray bear
#

im wondering if it's because strings is not capitalized

#

but no content patcher shouldn't do that

devout otter
#

From the json you shared, it seems that only the top schedule thing has closing comma?

gray bear
#

the comma is after the comment, threw me off too

devout otter
#

Oh that works huh. Sorry. ๐Ÿ˜…

orchid acorn
#

SO FUNNY? thats not what it looks like on my json omg

gray bear
#

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

orchid acorn
#

where specifically? doggy

gray bear
#

in all of the editdata of StringsFromMaps

orchid acorn
#

OH let me try

#

okay still same old me

devout otter
#

Well, it's not i18n error at least.

#

How do you patch the string onto the map?

orchid acorn
#

on Tiled!

latent mauve
#

You have a couple of extra spaces in your tokens, is that intended?

orchid acorn
#

between the token and i18n?

latent mauve
#

"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

orchid acorn
#

That import token should NOT be there

#

maybe that's it

#

let me try removing that

#

good catch LOL

calm nebula
#

(The spaces are fine)

latent mauve
#

(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)

orchid acorn
#

IT WAS THE IMPORT TOKEN

#

THANKS

devout otter
#

Woah.

reef kiln
gray bear
#

what did the import token do

tiny zealot
latent mauve
#

Break the i18n apparently /lh

gray bear
#

oh wait yeah i18n doesn't accept tokens does it

#

wait no that's not the issue

tender bloom
#

you can do the thing where you pass in a token to i18n

gray bear
#

guessing it was what was in the import token

tender bloom
#

i forget how but i know you can

whole raptor
reef kiln
latent mauve
#

Import token might have parsed to something with unescaped symbols, maybe?

gray bear
#

the import token is a sinner

whole raptor
#

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 ๐Ÿ˜…

latent mauve
#

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.

inner harbor
#

Ive had it turn up on the parser and make me puzzled too, Nomori. I cannot recall if it broke or worked though.

tribal ore
#

So grateful for that tool, tbh

whole raptor
#

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 ๐Ÿ˜…

golden spire
#

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'

safe badge
#

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?

tender bloom
#

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

lucid iron
#

I imagine they mean i18n right

tender bloom
#

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)

lucid iron
#

The {{i18n: }} token

safe badge
tender bloom
#

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

lucid iron
#

Anyways it's recommended to do i18n for basically all mods

#

If you want to do both then simply Load your i18n/lang.json

tender bloom
#

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

safe badge
#

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.

faint ingot
#

whoops that pasted weird

lucid iron
#

Get upscaled doog

faint ingot
#

let's try that again

lucid iron
#

Good doog

faint ingot
#

I guess maybe it belongs there idk just sharing SDVpufferheart

rigid musk
#

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

whole raptor
#

Has anyone tried modifying MFM mail through CP already? SDVpufferthinkblob

lucid iron
#

I think you can only do that if it's added by CP as well

#

Like you did a EditData targeting mfm custom asset

whole raptor
#

I don't think so? SDVpufferthink
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 ๐Ÿ˜…

lucid iron
#

Yeah i guess it's target fields time DokkanStare

whole raptor
#

I always sucked at those...

lucid iron
#

If you use vscode there's breadcrumbs at the top

whole raptor
#

Oh, I didn't think of that SDVpuffereyes

#

Huh, actually it only looked intimidating... it couldn't me more straightforward I guess

whole raptor
#

Oh... right... Mail Services Mod doesn't use content pipeline for their C# letters yet SDVpufferpain

#

@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 SDVpufferthink
"trapped": "(no translation:Test)[#]Trapped Souls?",

tawny ore
uncut viper
#

MFM is different from Mail Services Mod, innit?

tawny ore
#

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

strange dew
#

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?

whole raptor
#

That example wasn't from Mail Services

uncut viper
#

(i was just responding to matt!)

whole raptor
#

Ah ๐Ÿ˜…

rigid oriole
#

If i reference Newtonsoft.Json, I don't have to bundle the dll with my mod, right?

uncut viper
#

i believe you specifically shouldnt, i think if you did it might cause errors?

#

since smapi already loads it

rigid oriole
#

ok sweet

calm nebula
#

You may also want to directly reference smapi's copy

rigid oriole
#

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?

calm nebula
#

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

rigid oriole
#

aight thank you!

lucid mulch
# lucid iron Having the translation resolve as token string would change the semantics (?) of...

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

rare orbit
uncut viper
#

does it not work?

rare orbit
#

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

brittle pasture
#

EBAGI is the update to BAGI

rare orbit
#

tried it multiple times but don't work

brittle pasture
#

and it's supposed to be a drop in replacement, you just need to change the ContentPackFor field?

tender bloom
#

Have you asked the original mod author their thoughts? Pretty sure DaLion is still active

rare orbit
#

i can try that!

lucid iron
#

Although the original motivation is not access real tokens but avoiding big ol i18n passthrough dynamic tokens

tender bloom
#

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"

uncut viper
#

the less passthrough/dynamic syntax tokens the better

lucid mulch
#

then the status quo is fine?

#

its zero passthrough and dynamic syntax

lucid iron
#

I will come back to this eventually tho, letting people just use real tokens would permanently solve the confusion around i18n and cp tokens

uncut viper
#

the point was that people were using passthrough tokens with dynamic syntax to do this