#making-mods-general

1 messages · Page 314 of 1

uncut viper
#

with CP all you can do is AddQuest, RemoveQuest if not using one of the non-Basic types

boreal pulsar
#

Im doing everything in c# ahah

#

I'm just wondering where do I would write that

uncut viper
#

ah, well then, thats a lot better

boreal pulsar
#

Haven't even downloaded CP yet

#

I know I should but idk I wanna see how far I go without it (without things getting messy)
I'm starting to getting used to c# so it's not a problem

uncut viper
#

for those examples you stated it should be easy enough as long as you decide how oftenyou want to check the quest progress

#

if you know precisely what quests you want you could harmony patch the relevant places to send the signal to your quests

boreal pulsar
#

Sorry the ignorance ahahah

uncut viper
#

otherwise, Farmer.NotifyQuests() exists to perform a function for every active quest in the quest log, so you'd just do that periodically, check if the quest is one of yours and what the requirements are (you could fill out the Requirements section any way you want, perhaps thatll be useful) and whether or not its complete

#

!harmony is this the command?

ocean sailBOT
#

Harmony is a framework for patching .NET code, allowing you to take any portion of the game's logic and insert or substitute your own. This gives you more flexibility and control than SMAPI helpers and events, at the cost of being typically more complex and difficult to use safely and correctly, and more likely to break with a future update of the game and/or SMAPI.

If you are trying to do something that isn't possible or practical with SMAPI alone, then Harmony is usually the solution.

For more information, refer to the following:

uncut viper
#

yeah thats the command

boreal pulsar
uncut viper
#

thats what you'd use when harmony patching too, its just that if you harmony patch, for example, the function that hoes a dirt tile to signal after it happens, you can update the quest immediately

#

instead of doing it on like daystart or something

boreal pulsar
boreal pulsar
#

Mh i wonder if it's still doable without the framework

#

Thanks for the help btw!

uncut viper
#

almost certainly not

#

unless you want to just do your checks every tick update

#

which i mean, doing it every second with the smapi events probably isnt the worst thing in the world, i spose

#

but it wont technically be "immediately"

#

(unless you're doing some wildly expensive checks)

#

it should also be said that Basic quests dont have any sort of tracking information

#

its just the description and hint

lucid mulch
#

im semi surprised there isn't an event that just runs off stat deltas, the closest is the SlayMonster stuff but it just runs its own counter

#

though the overhead of propagating to quests on any stat change would be verbose due to moving itself being a stat

uncut viper
#

stepsTaken strikes again

#

i feel like stepsTaken is the main thorn in the side of a potential PlayerStat token too

lucid mulch
#

CP tokens wont be afraid of stepsTaken as CP doesn't react to the game fast enough to care

uncut viper
#

i know that, but since it'll always be changed, it just feels annoying that itd lose any "didnt change? no update then" optimizations

#

just a thorn, not a major roadblocker or anything

lucid mulch
#

what CP tokens hate is large collections where anything could have changed and has a cost in building the data structure
(cough Relationship cough)

uncut viper
#

so what you're saying is each Friendship object should also store the number of game ticks since the last time you spoke to them, updated every tick

lucid mulch
#

stats already natively being Dict<string,int> or whatever means CP particularly if it has required input turned on can just mostly passthrough with a cache

#

its on my todo list to revisit how TokenManager does token updates, as its a static cost regardless of what patches need to actually need to be evaluated

#

It's mainly not a problem on my current save as I've been avoiding talking to people like the plague and so the relationship token doesn't need to do too much other than concat the list of villagers and set it to unmet

#

Though relationship isn't the only token I'm worried about, it's the worst performer in stock cp.

But mod provided tokens will be a more annoying as it'll need to be a game of whack a mole

rigid musk
#

ope

calm nebula
#

HasFlag

#

For being a contact of mail and world state flafs

#

And smth else forgor

#

I keep on trying ro remind mshwld to take hasflag out of my CP mods and replace with hasseenletter

rigid musk
#

Does anyone who makes npcs know why they would stand at the kitchen facing the left [as a spouse]

lucid mulch
#

yeah HasFlag is an aggregation of a bunch of stuff

rigid musk
lucid mulch
#

anything vaguely related to marriage duties and how they behave is a mess

sour sleet
rigid musk
sour sleet
#

I’m pretty sure it’s to do with that as they don’t follow the schedule when it’s raining. Try checking the schedule data and see if there’s anything wrong there

#

I was having similar issues the other day lol

rigid musk
#

Hm... all the schedules work as normal though? Like as far as i can tell he goes and does all of his things he just... likes... standing to the left

#

unless he stays in the house then he does not. in fact, stand to the left

sour sleet
#

Are his directions set correctly?

rigid musk
#

I wasn't aware the start of the schedule needed a facing direction pondering

#

since there's not really any pathing in the farmhouse (cursed reasons of course)

sour sleet
#

Can I see the schedule?

rigid musk
#

there's a few others with variations (if you choose a certain thing during his 13 heart event he starts going to the saloon and museum)

sour sleet
#

Hmm, I don’t see anything wrong with your schedule. What are the particular days that are the problem? I’m wondering if the 9am start for some are causing issues?

rigid musk
#

nope its every day other than the ones where he's:

  • outside/patio/spouse room (obviously since he's somewhere else)
  • or raining/home schedule where he doesn't go out
#

if it were just 9am or 1030 or the later starts i would expect it to happen with only those ones but it just happens with all of em

#

it's not a game breaking issue or anything it's just odd xD

sour sleet
#

It’s very odd, I wanna know what’s wrong lol. Sorry I can’t help, but let me know if you fix it c:

spice inlet
#

(I'd say because making them compatible with recolors and sve and sve + recolors, .. is a very unreasonable task for anything but a bigger expansion)

fallow grotto
#

tried asking earlyer but it got burried instantly, why isnt this working, i cant unpack the xnb

#

the guide im using told me to use xnbcli but i just get an error message

uncut viper
#

you were answered earlier, use stardewxnbhack

fallow grotto
#

ah your right

#

cause they didnt reply i figered that was part of the same conversation as thee nerd sniping XD

gentle rose
brittle pasture
#

as the message says, put it in the SDV folder

fallow grotto
#

as the picture says, it is

brittle pasture
#

it's inside a folder, pull the executable outside

fallow grotto
#

OH

#

thanks XD

#

because it uses smapi, should i disable the other map mods, or is it fine?

brittle pasture
#

sorry I don't quite get your question. if you're asking if StardewXnbHack touches modded assets, then no

#

it will unpack all vanilla content

fallow grotto
#

yeah

#

ok

latent mauve
#

I am wondering if that might have anything at all to do with it

rigid musk
fallow grotto
#

whats the name of the area obove the farm, twards robins house

rigid musk
#

backwoods

faint ingot
#

The wiki (I think) shows a space in the name of this JSON key. Is that correct or is there supposed to be no spacing (or an underscore)?

brittle pasture
#

no space or underscores

#

the wiki itself has no space, it's just weird spacing between the white area and the rest of the text

lucid mulch
#

I would highly recommend looking at the unpacked content

brittle pasture
#

(I would have said that earlier, but apparently it's not actually used in vanilla)

#

(even Krobus uses Krobus0 and Krobus1)

fallow grotto
#

boom, path way lol

rigid musk
#

AI art/anything is not allowed in here :L

faint ingot
#

Hmmm I had a plan to replace the heart emote for a custom NPC roommate when on the farm, but I guess that would also change it for all the animals

rigid musk
#

and also this isn't the channel for that anyways

vernal crest
brittle pasture
#

NPCs cant emote I thought

#

the heart when kissing them is I think different from the emote

vapid oak
uncut viper
#

pathfinding code reasons

rigid musk
#

to cause pain and suffering to mod authors /j

brittle pasture
#

the tldr technical answer is that the pathfinding cant handle it

fallow grotto
#

damb

faint ingot
uncut viper
#

~ 👻 ~

rigid musk
#

You can do some fancy warp stuff though and have them warp from the mountains to your location like how coal point farm ncps do

brittle pasture
primal rover
fallow grotto
#

what if you just set "ExcludeFromNpcPathfinding" to false? 😬

brittle pasture
#

probably not happening until someone makes an RSV-tier expansion town in the backwoods for some reason

#

that doesn't fix the pathfinding not being able to deal with the two disjointed areas

vernal crest
fallow grotto
#

got it,

primal rover
rigid musk
#

chicken mod? O:

#

oh i came here to ask a question and the chickens distracted me

primal rover
rigid musk
#

:D no but thats lovely!

#

is it an AT pack? or a content patcher retexture?

#

or more chickens

primal rover
#

It’s here

rigid musk
#

ooo if you made it into an AT mod I think i'd use it

#

I do love having fancy chickens

#

and animals

primal rover
rigid musk
#

I hate uploading a bug fix for my mod and then realizing less than an hour later that I have more bugs in the mod that need to be fixed...

primal rover
primal rover
rigid musk
#

its okay all of my 'custom monsters' are silly retextures

brittle pasture
#

obligatory biased opinion: dont make it an AT pack and just use the skins feature

rigid musk
#

I really just put- 👀👀 ho ho ho?

#

i do like choosing though

#

or switching them if i want to

vernal crest
#

Can you choose the animal's skin with the CP skins feature?

rigid musk
#

when you buy them

brittle pasture
#

yes, you can do both with vanilla skins using the AT tools

vernal crest
#

Because I give each of my animals a different skin

rigid musk
brittle pasture
#

AT supports switching vanilla animals and building skins using its tool

fallow grotto
#

question, do i have to make this 4 times (1 for each season?)

vernal crest
#

Nope

brittle pasture
#

you wouldn't make an AT pack, but something that AT can recognize while fully using vanilla features

#

you can put "AT-compatible" on the mod page if you want

vernal crest
brittle pasture
#

heck, or just lie and say it's AT even though it's CP

rigid musk
#

well this one is purple but you get what i mean ... sunglasses

primal rover
rigid musk
#

I love built in integration with cool features... so amazing

brittle pasture
#

yeah not a lot of people know that, and I (and chu) made it a mission to spread that info

rigid musk
#

your mission is bringing great success

primal rover
#

I learn every day.

I decompiled a bunch of dll’s but the amount of info and my brain trying to tie it all together into what is og and where the API’s kick in is pretty overwhelming still

vernal crest
#

A lot of C# mods are open source so you should be able to see their files without decompiling.

#

Also you can just look at the game decompile if you want to see what's vanilla.

fallow grotto
#

so, i used the hack thing to unpack them, how do i repack it?

vernal crest
#

You don't

#

That's xnb modding and we discourage that. Make a CP mod.

#

!startmodding

ocean sailBOT
#

Making mods can be broadly divided into two categories:

Usually it’s easier to start with making content packs, since you don't need to learn programming.

vernal crest
fallow grotto
#

ah, figured it was, unpack, edit and repack kinda thing

vernal crest
#

Not since CP was born fortunately

rigid musk
#

so very fortunately

fallow grotto
#

ah, thats why EVERY mod needs it XD

rigid musk
#

hey @lucid iron why it look like that

#

0 file...

#

(i was still able to download it anyways)

rigid musk
vernal crest
#

Ok back to the garage mines

trim sand
#

pfft. i read that as "garbage mines"

median forum
#

.............

#

oh it says garage

#

i'm in the garbage mines

rigid musk
#

Let's all go to the garbage mines

median forum
#

do i need to specify the winter portraits/sprites for my mod?

rigid musk
#

Im the trash man... I go in.. I throw trash all over the ring

#

Then I start eatin garbage-

trim sand
#

hey don't bring linus into this

rigid musk
#

(/ref)

median forum
#

oh gosh there's a mod idea

rigid musk
#

Linus is Danny DeVito 😭😭😭😭

trim sand
#

was this not just always the case?

rigid musk
#

You'd specify these using the- HAAAAHAHA

#

The appearance system...

brittle pasture
rigid musk
#

It's Pierre isn't it?

median forum
#

oh no i modified vanilla ones for pierre and caroline

rigid musk
#

Though his are already specified so unless you're changing it..

median forum
#

yeah

rigid musk
#

Yeah

#

You'd do a patch for their winter outfits

brittle pasture
#

also don't forget their beach sprites

#

gotta show off pierre's muscles built from years of standing behind the counter for 12 hours at a time

median forum
#

i didn't mess with those since the stuff i changed is just for heart events

median forum
brittle pasture
#

ah yes how could i forgor

median forum
#

i tried putting in the changes in the content.json like this but smapi rejected it

trim sand
#

hmm if only pierre wasn't utterly destestable. i might care about this fact (boxer thing)

rigid musk
#

He's not the worst really

#

Like he's not great

#

But I'd rather talk to him than Demetrius or Lewis

trim sand
#

i like him about as much as clint which is to say id prefer not to acknowlege is presence and caroline deserves better.

rigid musk
#

Because they already have them

uncut viper
#

(you CAN Load over top of them but its not ideal for compat purposes, but also honestly not like, the worst)

median forum
median forum
brittle pasture
#

wild guess: if smapi rejected it chances are there's some other mod that's also Loading it, but with Exclusive for some reason

uncut viper
#

the "some reason" is probably the same reason that Load pictured is loading it exclusively, tbf

median forum
#

yeah i think that was it

brittle pasture
#

hmm is exclusive the default

uncut viper
#

yes

median forum
#

i'll change what i already have and add the winter ones

rigid musk
#

Also if you're specifically aiming for winter portraits/sprites they would have _Winter at the end -

uncut viper
#

(also if Exclusive WASNT the default, one person Loading exclusively wouldnt make non-exclusives error anyway)

primal rover
# vernal crest A lot of C# mods are open source so you should be able to see their files withou...

Yep but that doesn’t tell me the connection between all the moving parts and that’s why I mentioned “trying to wrap my brain around og game code vs API” and then other people’s utility mods likes CP.

I’m also not aware of all the mods that might do something similar as I have in mind to see which code or dependency mod they target. I’m a programmer who wants to try mods for this game I love, but I only had like 10 mods or so installed myself years back. Plus I only recently found the discord so learning so much new stuff (and people having 900+ mods installed 🫣)

I’ve checked a bunch of opensource mods and code. But it takes experience, tons of reading here and a lot of trial and error to find the limitations of what can and can’t be build as C# mod out of the box, and what needs a different mod, or if there’s even a mod out there.

Thankfully the community is filled with people that do have that experience so we can ask.

It’s a journey basically. And an overwhelming one tbh because I’m used to reading docs and figuring stuff out. I feel here I’m way more dependent on the very experienced who know what’s out there in other mods.

TLDR: it’s overwhelming to say the least

median forum
vernal crest
median forum
brittle pasture
#

as mentioned Load isnt the worst; installing two different NPC retexture mods is a user problem anyway

#

though I guess your mod is only retexturing two

primal rover
# vernal crest Can't reply much right now but have you been reading the wiki? There's not much ...

Yep I am jumping between the wiki and GH documentation. Also diving into the properties of the game code.

The documentation is overall good but obviously doesn’t cover every usecase.

For example I was playing around the other day with a mod that automatically switched tool. Only to find out that sword and scythe fall in the same category 😂. I’d have no clue where to find that in docs instead of the og code. And if I wanted to edit that if it even would be possible (besides creating conditionals, which I still need to look into the gamecode for for other exceptions)

brittle pasture
#

nvm me then

trim sand
#

So weird design question, I'm currently drafting out designs for alternate upgrades for the shed with a gimmick of each one "boosting" in some way or another a specific subset of crafting machines, like the Creamery building boosting the cheese press and mayo machine, the smokehouse the fish smoker&charcoal kiln, and distillery for Keg, oil maker and Preserves jar.
Problem I'm having is twofold :
A: I firmly lack the mod assets chops to make a custom building sprite I don't hate but also I feel reusing the big shed is less than ideal.
B: it feels lame to just do a bunch of processing time buffs for everything but I'm at a loss for other ideas to both increase overall profits without also just making recipes produce more which doesn't also feel right.
Admittedly I also haven't read the extra machine config docs super close, but when the goal is to give a reason to not carpet the backwoods and quarry with crafting machines, without being boring in the process...

brittle pasture
#

in my opinion a speed boost is totally fine ™️

#

if you want to go fancy then maybe extra byproduce?

#

re: assets, you can do like a sign draw layer

trim sand
trim sand
brittle pasture
#

if you look at my mod Chicken Feed, the poultry feed silo is just the vanilla silo but with a sign slapped on using the draw layer feature

trim sand
spice anchor
#

quest get

make a mod to remove the family size cap

no time limit

no additional requirements

ping @spice anchor upon quest completion for a big Thank You

brittle pasture
#

chu is working on something like that

fallow grotto
#

do i need to copy the tile set, or what

trim sand
#

yes. but only for map editing. they'll need removed again before packaging the mod.

fallow grotto
#

ok, got it

spice anchor
#

On behalf of @tiny geyser also please make a mod that turns your children into Pokemon-like entities that you can arrange into teams and use to battle other toddlers

rigid musk
#

💸

fallow grotto
#

even with both png and xnb version is still wack

rigid musk
#

youll have to re-load the tilesheets if you moved them

#

tilesets...? i keep forgetting the difference

#

you know what im referencing though

fallow grotto
#

ty

rough lava
#

I'm trying to add the textures from (AT) Bog's Witchy Sheds as AT for the giant sheds of Better Things.

I added a folder "Huge Sheds" in the Bog's Witchy Sheds textures folder of every season. Then I changed the texture.json into this:

{
  "ItemName": "BetterThings_BigShed3",
  "Type": "Building",
  "Seasons": ["Spring"],
  "TextureWidth": 112,
  "TextureHeight": 128,
  "Keywords": ["seasonal"],
  "Variations": 4
}

It keeps saying that message. I tried adding Building_maat. to the ItemName but still won't work.

fallow grotto
#

the tutorial im following says to change it to a csv for compatibility, do i just rename it or do i need a program

#

oh wait, the tile layer format

#

thats default 👍🏻

rigid musk
#

I was about to ask you what on earth you were talking about lol

fallow grotto
#

yeah, i realized it was nonsense and figured out what it meant XD

#

umm

proud wyvern
#

you shouldn't have been using Vortex in the first place

#

it corrupting itself is a blessing in disguise /s

fallow grotto
# rigid musk

do i need to reset the sets to the packed xnb when im done, or is it ok?

#

cause if i delete the png when im done its just gonna x out again?

rigid musk
#

just move the pngs out of the folder while doing testing and put them back when you want to edit it

fallow grotto
#

so even if i take the pngs away it wont screw it up

steel plaza
#

is there a way to make a shop much like the travelling merchant?

fallow grotto
#

why are their two in this template

#

we workin if 4 dimentions now XD

fallow grotto
#

im confused,

steel plaza
#

X and Y is the tile location, then the width and height is the size of what ever your trying to inject in the map IIRC

fallow grotto
#

so i just keep them the same

#

OH i see

median forum
#

what are some ways to keep a heart event visually interesting if it's two people talking? just, like, using emotes?

#

hoping that the writing and portraits will hold enough interest for the player?

fallow grotto
#

how do i?

fallow grotto
median forum
#

oh sound effects, that's an idea

fallow grotto
#

maybe add a bunch of stops, so you arnt reading a paragraph at a time

median forum
#

oh yeah, if they have to keep clicking maybe that'll help

#

thank you!

visual dirge
#

list.sort is unstable ru kidding me 😭

#

maybe c# does still kinda suck even without having to deal w unity

#

first i have to write my own floor division now i have to write my own sorting shit

#

i just wanna make a mod that works 😢

#

c# really needs a million ways to compare strings and zero ways to stably sort a list in-place

spice inlet
#

wdym by unstable

fallow grotto
#

i have no errors, and nothing

visual dirge
#

sorting enumerators in c# is stable but for some reason all the in-place sorting of arrays/lists is unstable 😭

spice inlet
#

they're not equal if their order matters imo

visual dirge
#

what

spice inlet
#

could always sort against two fields instead of just 1

visual dirge
#

you misunderstand

#

im sorting with a custom comparison function that compares only one field

#

i need a stable sort to avoid re-implementing vanilla behavior

final arch
#

C# sort should be stable 🤔

spice inlet
#

OrderBy preserves the initial order

#

so you could do orderby field 1 then orderby field 2

visual dirge
final arch
#

ah youre right

#

need OrderBy for stable

visual dirge
#

the performance would probably suck too

#

like im not just sorting the whole thing, im going over the list and picking out parts to sort with List.Sort(int, int, IComparer)

spice inlet
#

I wouldnt worry about performance that much in this case unless you're dealing with massive amounts of data or updating frequently

#

try it out

fallow grotto
#

YES, altho the collision hasnt changed

visual dirge
#

since the ranges shit is gonna be annoyyyyyinggggg

fallow grotto
lucid iron
#

its ok i had to do 1.7.2 anyways, forgor nameoruniquename not null seriousblep

median forum
#

how do i lock the player out of a building when a cutscene's finished?

#

i don't want them going back in for the rest of the night after my heart event

#

it'd be enough if i could set the time for like 10pm or something so the building locks on its own

mighty ginkgo
fallow grotto
#

both the new map and the old map both have collision

#

and if i enabled passable of the base map, youd have no collisions

mighty ginkgo
#

it's a tile property, not a map property, so it only applies to the tile it's on

fallow grotto
#

it was fantom walls

#

visually the where gone, but if i hovered of it it would give the the tiles id

#

and ereasing the nothing fixed it

#

its 3:53, im going to bed...

orchid anvil
#

anyone know how I can remove the modded items from the community center bundles? I was playing through my save and only just now realized that SDVE adds its own stuff to the community center bundles, and I dont feel like restarting my playthrough, so I just wanna remove the modded stuff from the bundles

blissful relic
orchid anvil
#

doesnt work for a world in progress

#

my issue

blissful relic
#

oh you're right

#

well it's not exactly a removal but you can just spawn in the SVE items into the bundle

#

and call it a day I guess

lucid mulch
orchid anvil
vernal crest
orchid anvil
#

fk me

vernal crest
vernal crest
# median forum how do i lock the player out of a building when a cutscene's finished?

If you're okay with it being all the time instead of just on that one day, you can use LockedDoorWarp with a close time of 2200. If you only want it on that day it's probably still possible with an EditMap CP patch that only applies the 2200 close time for that day; not sure what conditions you'd need though - maybe checking for the same ones as the event does and also not having seen the event so it applies the patch that morning and then unapplies it again the next morning after the event was seen?

median forum
#

thank you anyway!

vernal crest
#

Oh I misread and thought your building stayed open at all times and you wanted a way to lock it at 10pm

#

So everything I wrote was about that lol

median forum
#

ohhh hahah

#

my event is at the seed shop and i think it closes at 9pm?

vernal crest
#

Hmm I don't think there is a way to advance time in the event because of multiplayer.

median forum
#

i forgot multiplayer was a thing tbh

#

that makes sense

vernal crest
#

If it's in the seed shop the player will end up there anyway unless you use warpOut

#

You can use end newDay but I will scowl at you forever if you do

median forum
#

oh yeah no that would be awful

#

that's why i just wanted to, like, lock the doors

vernal crest
#

(And I have no clue what that does with MP - probably just warps the current player to their bed and then they can just leave again maybe)

#

Well my patch idea would still work for that, just bring the door locking earlier

#

Although it will not affect players like me because I use a mod to unlock all doors anyway. Nor would it affect players who have the key to the town.

median forum
#

i guess at that point there's no stopping people. maybe i should give caroline dialogue that says "please leave" lmao

#

i think i saw how to do that

vernal crest
#

Yeah that's probably easier to do as well, depending on how specific your event preconditions are

median forum
#

they're very specific hahah

#

the event ends with caroline asking the player to leave so i was thinking she'd lock them out but maybe her just saying "get out" is enough

#

warpout and "LEAVE" if the player comes back in

vernal crest
#

Yeah if you use warpOut to make them actually leave, that leaves you space to use the LocationChanged update rate for the CP patch to change her dialogue

median forum
#

that'll work!

#

thank you yet again

#

i'll work on that next time i get to code

vernal crest
#

Not a problem ^_^

visual dirge
#
void SortStable<T, K>(IList<T> list, int start, int end, Func<T, K> key)
where K : IComparable<K>
{
    for (int i = start + 1; i < end; i++)
    {
        var v = list[i];
        var k = key(v);

        int j;
        for (j = i - 1; j >= start; j--)
        {
            if (k.CompareTo(key(list[j])) >= 0) break;
            list[j + 1] = list[j];
        }

        list[j + 1] = v;
    }
}
#

😁

#

much easier than messing around trying to get a bunch of enumerator nonsense to do what i want

#

(stable sorting is necessary here bc im doing this in a postfix patch that just reorders ranges of __result and i want to preserve the vanilla ordering for items with equal keys)

flint forum
#

Can anyone point me to an example of making it possible for content loaded by one mod to be modified by another mod? I'm trying to follow the instructions in https://stardewvalleywiki.com/Modding:Modder_Guide/APIs/Content#Let_other_mods_edit_your_internal_assets , but I cannot make it work.

What I'm trying to do is have a core mod that defines a set of new assets (character biographies - in this case) and then one content pack that inserts all of the biographies for the core Stardew characters and another that inserts the biographies for the SVE characters while making updates to the original biographies where necessary (adding Sophia as a friend for Emily and Haley for example). Nothing I've tried seems to work to allow the SVE content pack to add items to the core game content pack.

Stardew Valley Wiki

Creating SMAPI mods

flint forum
uncut fossil
#

Hi ! so I'm making a NPC mod and I've made 12 portraits expression and I just saw that the game supports only 8 expressions... Is there a way to still be able to use more than 8 facial expressions for you're NPC portraits...?

flint forum
median forum
#

yeah

flint forum
#

Default game Haley has 14 portraits for example

uncut fossil
#

Yes I thought so to but if I understood correctly you need a mod for the game to be able to generate the extra expressions

whole raptor
#

You're making a mod.. so you already have that covered

#

You just need to call specific expression, like $14

uncut fossil
#

Oh okk so everything will work fine if I juste call the expressions $Number even if it is above 8 ?

whole raptor
#

Yep

uncut fossil
#

okk thanks !!!

whole raptor
#

Just note that the indexes start from 0, not 1

uncut fossil
#

Oh and also I was wondering if I can add extra outfits too ? I made an outfit for every season but I would like to add a Night Time outfit and a Work outfit for my NPC (I will make him look like he works with Pierre haha)

whole raptor
#

Yeah, you can use appearances for that

uncut fossil
#

okkk thanks !!! Do I have to do a separate portrait png file for the work and nightime portraits or do I have to put it in the same png file as the seasons ? I'm asking because I saw that Alex for example have his Gym outfit not separated from the sesonal outfits

whole raptor
#

I'd say it's best to have it in a separate sheet if it's part of shedule. Alex's gym outfit is just for the event iirc, so it's not used as much

uncut fossil
#

ok ok I will do that, thank you !

vernal crest
whole raptor
#

Ah, by schedule I meant: NPC goes to the location and changes his clothes there (work) 😅

vernal crest
#

Ah yeah that's Appearance with a TIME GSQ then

#

Or location I guess

vernal crest
flint forum
#

Thanks. It may be that I'm trying to do something impossible / beyond what CP was designed to do - but I'm still crossing my fingers there is something sily I'm missing.

vernal crest
opaque field
#

I (think, hope, beg the deities above and below and in between) that my mod is almost at a publishable state. I think I just need one more tiny event for the "choose your own adventure" structure, and some dialogue. I might let myself leave off the mawwaige, resort, festival dialogue and expanding my conversation topics for a later update which just leaves breakup/divorce lines, and green rain lines - and many many rounds of event testing

flint forum
vernal crest
#

I'm hoping that Lixx's typing is about this because they'll know more than me lol

spice inlet
#

all you need to do to create an asset that other mods can edit is this:

Helper.Events.Content.AssetRequested += OnAssetRequested;

private static void OnAssetRequested(object sender, AssetRequestedEventArgs e)
{
  if (e.NameWithoutLocale.IsEquivalentTo("MyMod/MyAsset")) {
    //We need to provide an empty initial collection to which others can append their changes
    e.LoadFrom(delegate () {
      return new Dictionary<string, MyDataModel>();
    }, AssetLoadPriority.Medium);
}  

Other mods can edit your asset eg using CP:

{
  "Format": "2.6.0",
  "Changes": [
    "Action": "EditData",
    "Target": "MyMod/MyAsset",
    "Entries": {
      "DictionaryKeyOfNewData": {
        "Name": "Peter"
      }
    }
  ]
{
#

It's quite simple, really.
All the other things you mentioned might not be though 😄

flint forum
#

Thanks @spice inlet - now let me do a forensic comparison to work out where I mucked up.

lucid iron
#

Is your biography asset a Dictionary or a List

calm nebula
#

Dandm1, have you checked the edit order between your two packs

#

And also can we see the type

#

!log also

ocean sailBOT
#

Important note: Your computer username may appear in the log. If your username is your full name, please be aware of this before uploading it.

Please share your SMAPI log file. To do so:

  1. Open this page: smapi.io/log.
  2. Follow the instructions at the top of the page to upload the log file. (Don't copy & paste from the console window!)
  3. After uploading, it will show a green box with a URL to share. Post that URL here.

Please do it even if you don't see any errors. This has useful info like what mods and versions you have, what the mods are doing, etc. If the issue didn’t occur in your last session, please load the game to the point where the issue occurs, then upload the log.

spice inlet
#

I have awoken the slumbering gods

flint forum
lucid iron
#

Well either is fine

#

It's just content patcher limitation to want one of the two

#

Here's the example i always show ppl

#

It's using lazy loading which i personally prefer

flint forum
#

For a while I kept getting errors that the items I was dealing with were objects (that may not have been the term) and couldn't have new entiries added.

flint forum
lucid iron
#

Yeah so content patcher can only add more entries to Dictionary or List

#

Not other impl of IDictionary

flint forum
#

Yeah. Off the back of that I concluded that it wasn't enough to use a CP "Action": "Load" to create the new data items - I needed to register the items in the C#.

#

Because I couldn't find any way to force loaded things to be a dictionary otherwise.

lucid iron
#

Ah that's another semi related CP quirk yes, although if you were doing Load on c# side with right type it should have been fine

#

In my example there's AssetRequested which create and handover a empty dict of right type

#

If your asset is just a dictionary string string thing though, you won't need any C#

#

Cus u can access the string with [LocalizedText yourassetname:key]

#

And this will have the game load it as dict string string

flint forum
#

Right. Got three different types. One is a Dictionary<string,string> but the others have more structure than that and will need C# registration then.

#

Is the OnAssetInvalidation in your code requried - or just needed to keep the cache consistent if conditional inclusions may change over time?

golden basin
#

Hey everyone!

spice inlet
#

Heya!

lucid iron
#

It nulls the cached copy of the asset so that the next time any code tries to access it i do a Load in the getter

#

This aint strictly necessary cus content load itself is going to give u a cached copy too, after the first load since invalidation

flint forum
#

Thanks. It's possible I've got something that is caching too early - before the patches are loaded. I'll try refactoring for a lazy load and see if that makes a difference. Thanks all for your help.

woeful lintel
#

I tried to do this, but I get an error along the lines of "Technical details: Error reading integer. Unexpected token: PropertyName. Path 'Collisions'." but the "Collisions" property doesn't have a JsonConverterAttribute before it and was parsing fine before I added one on another property

#

Probably should mention that Collisions is parsed as a JToken for now

#

The worst part of this error is that every file I try to parse on the same data model has a different error...

woeful lintel
#

I guess it boils down to: why do I have an error at "Path 'Collisions'" when I added a JsonConverter to another field than Collisions.
My data Model starts like this:

public class FType
{
    public int Priority = 1000;
    public string DisplayName = "No Name";
    public string? Description;

    [JsonConverter(typeof(RotationConverter))]
    public List<string> Rotations;

    public JToken SourceImage;
    public JToken Collisions;
        ...
}

and here is RotationConverter.ReadJson for reference:

public override List<string>? ReadJson(JsonReader reader, Type objectType, List<string>? existingValue, bool hasExistingValue, JsonSerializer serializer)
{
  List<string> result = new();

  if (reader.TokenType == JsonToken.Integer)
  {
    int? rot_count = reader.ReadAsInt32();

    switch (rot_count)
    {
      case 1:
    result.Add("NoRot"); break;
      case 2:
    result.AddRange(new List<string>() {
          "Horizontal", "Vertical"
        }); break;
      case 4:
        result.AddRange(new List<string>() {
      "Up", "Right", "Down", "Left"
    }); break;
      default:
    throw new InvalidDataException($"Could not parse Rotations from {reader.Value} at {reader.Path}.");
    }
  }
  else if (reader.TokenType == JsonToken.StartArray)
  {
    result = JArray.Load(reader).ToObject<List<string>>() ?? new() {"NoRot"};
  }
  return result;
}
#

I kinda already have a workaround by making a separate class for each field type I want to read, but it looks really stupid to have classes like:

[JsonConverter(typeof(RotationConverter))]
class Rotation : List<string> {}
#

I'm going crazy trying to figure out these JsonConverterAttribute on members, Imma play Minecraft.

ivory plume
#

Yep, you can use [JsonConverter] attributes; SMAPI does it under the hood for its own types like Manifest. You definitely chose the hard path with such a complex and dynamic data model though.

Assuming your JSON is valid and it was parsing correctly before the new attribute, it sounds like the reader is getting into an incorrect state (e.g. it was read too far). The only significant difference I see between your code and SMAPI's is that SMAPI uses JToken.Load(reader).Value<T>() instead of reader.ReadAsT(), so it might possibly handle more edge cases like comments.

woeful lintel
#

Hmmm, I see how reading too far would cause the errors I see, I'll try to make the change you're suggesting

ivory plume
#

Also, SMAPI puts its [JsonConverter] attributes on the model properties rather than the property's type; not sure if that matters here though.

woeful lintel
#

using JToken.Load(reader).Value<T>() fixed it instantly! Thank you so much for that!

static otter
#

Can someone help me understand why I'm having trouble editing the Town Map? I haven't had any trouble editing maps thus far and I haven't seen an error like this before. I just made a post in the #1272025932932055121 I thought I'd just be able to make the quick little edits, toss it in a CP file like normal with the content and manifest and everything to load it properly, but alas I was wrong.

lucid iron
#

you can sorta

uncut viper
#

(you can/should repost your issue here as the tech support channel is for users having issues using mods, not making them)

lucid iron
#

hm another question about using [JsonConverter], can the converter know about a value at runtime?

steel plaza
#

any body knows where the fruits tile sheets are at?

ivory plume
lucid iron
#

i was trying to see if this is possible

public sealed class MyModel
{
    public string RuntimeType = "ERROR";

    [JsonConverter(MyModelConverter)]
    public object? RuntimeTypeInstance = null; // somehow deserialize with a unique type dependent on the value of RuntimeType
}
green patrol
#

heeey so random question: I'm working on this mod and trying to make a machine that is unlocked by default (ie: no purchasing the machine recipe from the shop and not obtained from leveling up skills). I can't for the life of me get it to show up on the crafting tab in the game though. Not getting errors from SMAPI and the JSON validator says its fine.

big craftable file: https://smapi.io/json/content-patcher/012cc3ffb0b6478aad43a5d9d8cd37cb

When I use the console commands to force add one of the objects to the game and then use look up anything on it the recipe shows up fine, it's just not unlocking for some reason...

lucid iron
static otter
#

Well, I am editing the native Town map, so there shouldn't be any custom tilesheets or anything?

woeful lintel
static otter
#

When editing the town map I didn't get all the necessary tilesheets, for some reason I figured I didn't need to just making my quick edits. Could this be the reason. I'm saving the town map without having the tilesheets there for it?

woeful lintel
#

Also, this was an obvious solution for me because my RuntimeType equivalent also need a JsonConverter anyway

uncut viper
lucid iron
#

yea you do need all of them

ivory plume
#

Weird, not sure why saving with errors present would change the tile IDs.

uncut viper
#

if you save without the tilesheets actually present, Tiled will recalculate the IDs of all your tiles and fuck it up

#

bc some tilesheets now have 0 tiles

#

smth like that

lucid iron
static otter
#

that makes a lot of sense

lucid iron
#

its fine but u cant targetfield into it ofc

uncut viper
#

you'll have a Tile that expects tile 3,000 or whatever when you initially placed it but now there arent 3,000 tiles when Tiled thinks some sheets have 0

static otter
#

When making my custom farm maps and editing the greenhouse and all that I had all the tilesheets present

#

But my laziness caused this error :3

#

Honestly thought I'd just be able to bing bang boom make like one edit and send it off, didn't think I'd need all the assets

#

Silly me

warm imp
ivory plume
uncut viper
#

the fact that its common enough for people to pick out the cause immediately just from "invalid tile gid" means you're in good company SDVpuffersquee

lucid iron
#

yea i had a suspicion

lucid iron
#

no trees allowed in streaming SDVpufferpensive

#

for me its not so bad cus the thing i parse just becomes a field on a generictype that i wholely control

vernal crest
# static otter teehee

You can fix it just by putting all the tilesheets in the folder, opening the map again, making a change (necessary so the IDs are recalculated) and saving.

static otter
#

Yeah I know the fix is easy enough

#

Just had to get an xnb unpacker for the tilesheets

#

Luckily someone made a very convenient online one

uncut viper
#

should definitely be using StardewXnbhack to unpack your entire Content folder at once

#

i believe it handles some of the xnbs properly versus the other unpackers too? i dont quite remember

iron ridge
#

yeah it has support for the shaders better for one

vernal crest
#

Yes including unpacking maps into tmx instead of tbin

static otter
#

I had done that before, but with the 1.6 update I figured some things might have changed

#

so I haven't unpacked it again

iron ridge
#

xnb.js, as amazing as it is, shouldn't be used for game assets on pc

uncut viper
#

things changing is exactly why you should unpack it again

lucid iron
ivory plume
#

(It can't, it'll just leave those as .xnb files. Those need to be decompiled, not just unpacked.)

iron ridge
#

oh

rare orbit
tight edge
#

Hey there! I redesigned sam’s sprites character sheet and have no idea how to add it into the game, i was wondering if anyone might be willing to help me? its cool if not!

iron ridge
#

!startmodding

ocean sailBOT
#

Making mods can be broadly divided into two categories:

Usually it’s easier to start with making content packs, since you don't need to learn programming.

static otter
#

Hm, for some reason the Town file can't seem to locate these 3 tilesheets for some reason while recognizing some others, even though they are in the same folder

lucid iron
#

please start from new copy

#

its much less painful than trying to fix whatever you have

round timber
vernal crest
rare orbit
#

well i tried to but no replies and plus you've been a major help to me

#

i can make another thread though

lucid iron
#

threads have less visibility than just the main channels

#

feel free to just ask stuff

vernal crest
rare orbit
#

cool cool!

static otter
#

There we go, it looks right

#

I loaded all the tilesheets and got the map to recognize it but there was some stuff wrong so I started fresh and now it looks right

vernal crest
rare orbit
#

sorry been busy for a while with a day program

#

i just posted in the mod help thread now

#

but if ya goin to sleep? take a nap! i pretty much am free today

#

so i got time

rough lintel
# lucid iron feel free to just ask stuff

so coding went semi well yesterday, i think i have the base laid out but i am still trying to figure out the Getting Of The Values of stuff. i just wanted to update u since u encouraged me to go down this horrible journey 🤣🤣🤣

#

mostly unsure of how to grab blueprint ids to then grab the ingredients list, but Only The Wood And Stone, but i can compare it against the inventory since i figured that out 🫡

woeful lintel
lucid iron
rough lintel
#

but like. i need to only reference the specific items of wood and stone

#

i guess im wondering how i pull those and reference them

#

theres no GetIngredientsMatching type thing lol

lucid iron
#

iterate the list

#

and check for O390

#

CarpenterMenu.DoesFarmerHaveEnoughResourcesToBuild is good example here

rough lintel
#

iterate the list

#

i know what that means theoretically

rough lintel
#

i was like thank god this is what i need (but i dont understand how it Knows)

lucid iron
#

only diff is that u need to check if ingredient.QualifiedItemId equals "(O)390" stone or "(O)388" wood

#

how it Knows what?

rough lintel
lucid iron
#

CarpenterMenu.DoesFarmerHaveEnoughResourcesToBuild is specifically using a different method to check

#

Game1.player.Items.ContainsId

rough lintel
#

uh huh

lucid iron
#

but u probably dont want to use that Dokkan

rough lintel
#

wat why not

lucid iron
#

since u actually need the count, consider Game1.player.Items.CountId

rough lintel
#

!

#

how do i know what functions exist in like a thing

lucid iron
#

!decompile

ocean sailBOT
lucid iron
#

and then ctrl+f

rough lintel
#

like how do i know what i can do with Items

#

oh i have the game code repo

lucid iron
#

alternately u just ask nerds here

rough lintel
#

but like. is there an easy way that excludes poring through the Item.cs

lucid iron
#

kinda

rough lintel
#

to see what functions i can do with an item

lucid iron
#

you can right click and go to reference for most things

rough lintel
#

like CountId or whatever

#

nodnod

lucid iron
#

most ides have outlines for a open cs file too

proud wyvern
#

if you have something of type Item, you reference it, then type a dot ., and your IDE will tell you everything you can do

lucid iron
#

ye autocomplete stronk

proud wyvern
#
Item myItem = SomethingYouGetAnItemFrom();
myItem.
rough lintel
#

my autocomplete keeps changing this. to some completely batshit function ive never used

#

how do i make it stop. lmao

lucid iron
#

what is it doing yggy

rough lintel
#

i type “this” to do like, this.Item or this.Blueprint and it just. substitutes a completely rogue function

#

but its fine i deal with it 😔

woeful lintel
rough lintel
#

ive gotten so used to doing that i dont even realize i do it leroy HAHAHAHAHA

rough lintel
#

um im assuming u mean like visual studio or something right heehee

lucid iron
rough lintel
#

i cant pretend im a c# expert, i used it for unity gamedev in college and understood close to zero of it the entire time

#

gamemaker i miss you

#

actually the goated way to code was gamemaker drag and drop no cap

lucid iron
#
public sealed class MyModel
{
    public string RuntimeType = "ERROR";

    internal ActualType RuntimeTypeInstanceReal;

    [JsonExtensionData]
    private Dictionary<string, JToken> _additionalData;

    [OnDeserialized]
    private void OnDeserialized(StreamingContext context)
    {
        // now u can do whatever deserialize here
        ActualType RuntimeTypeInstanceReal = GetActualType(RuntimeType).YourDeserializeStuff(_additionalData["RuntimeTypeInstance"]);
    }
}
#

i think it'd be like this?

#

with like, real methods yknow

woeful lintel
woeful lintel
lucid iron
#

no the whole point is to have cp patch RuntimeTypeInstance, which gets shoved into _additionalData per JsonExtensionData, and then you actually deserialize it to real runtime type which you hold in RuntimeTypeInstanceReal that cannot be patched by cp (its internal)

woeful lintel
#

so the CP patch would have to target ["_additionalData" / "RuntimeTypeInstance"] in your case?

lucid iron
#

cp shouldnt know about _additionalData either

#

if im reading this correctly, any json field that lacks a model field gets put into this extra IDictionary

uncut viper
#

thats w hat smapi uses in the manifest right?

lucid iron
#

there are still limits ofc like RuntimeTypeInstance is an object so once again targetfields banned

ivory plume
uncut viper
#

(has anyone ever actually even used the ExtraFields for anything useful in a mod? im sure someone has, but i havent seen it, but i am curious)

woeful lintel
#

Yeah, I don't fully understand how I would make what I want with this, I'll try my solution of removing the order dependency. I'll go to bed (in minecraft) now, I'm starting to get a headache.

lucid iron
uncut viper
#

i wanna know about practice not theory SDVpuffersquee

ivory plume
#

(You should really consider using a less dynamic data model though; otherwise you'll be getting headaches for many years to come, since you'll need to deal with quirks and edge cases and user support and mod author support even after you get the implementation working.)

lucid iron
#

You may recall the funny Args field in trinkettinker that gets round-triped through newtonsoft

#

To become the real args

uncut viper
#

you overestimate my memory

lucid iron
#

(im wording it like this out of faith in u)

uncut viper
#

(i will pretend like im not going to go look up the trinket tinker docs/source code rn)

lucid iron
#

Rn this roundtripping happens when I actually go initialize the Ability

#

If i do the json extension data thing i could do it when i read rhe data instead

uncut viper
#

oh do you mean just using this attribute

lucid iron
#

The reason why decided not to do it is entirely the cp targetfields problem

uncut viper
#

im sure theres plenty of mods that could benefit from the attribute
i wanted to know specifically if anyones ever used ExtraFields in manifest.json

iron ridge
#

i know stardrop has specific manifest attributes but idk if they use ExtraFields

lucid iron
#

Ah the manifest DokkanStare

uncut viper
#

ive never used stardrop so beats me

#

ive no manifests to check

lucid iron
#

Yeah hm I can't think of any reason to off hand

uncut viper
#

i figured ExtraFields is there for Content Pack frameworks for some purpose

#

a purpose that is probably less useful nowadays

#

with the dominance of CP

glad sigil
lucid iron
#

I think the problem is that any feature i can think of that prefers to have that data in manifest.json is like, something better done with first class support on SMAPI itself

#

At which point it cease to be ExtraArgs

uncut viper
#

like what

#

is one feature translationfor

lucid iron
#

Yeah

uncut viper
#

yeah thats the only one ive got

lucid iron
#

Or like alias unique ids

#

So that people can put their name into unique id of a mod they picked up

#

while still letting ppl know that hey this mod used to be this unique id

uncut viper
#

(i still would really like smth like TranslationFor supported by SMAPI itself but it seems less and less likely as time goes on bc it gets harder and harder to go up against the years of translations that dont use it that already exist SDVpufferpensive)

lucid iron
#

Well I don't think it'd conflict right

orchid lily
#

hello, I have an issue I'm facing.
I want to modify some events from other mod, but it seem that whatever I do I see no change when debuging
I want to modify an event in SVE using a custom mod so I won't always modify the SVE folder,
I already modified some events and it's working fine but a specific event just did read the changes, I wonder if I'm missing something
Any help would be appreciated

uncut viper
#

it wouldnt conflict no but itd affect adoption of it

#

that and the fact that it would be a bunch more work than a normal drag n drop translation

lucid iron
#

Like rn some ppl make portraits that are just replace original pngs (nyapu...)

uncut viper
#

not like, significant work, but still a barrier to entry when the usual way has worked fine for, what, 7 years?

lucid iron
#

But u can always make it not do that, and in exchange u get to put an update key

uncut viper
orchid lily
#

yes I do, I even added the condition for it in the "WHEN" entry

lucid iron
#

What is the When on the original event?

#

Need to make sure it's not behind say, a config token

dusk terrace
#

anybody else noticed issues with fashion sense and swimming/swimsuits? either I'm not using the field properties correctly somehow, or it's getting ignored entirely

#

also any clue why converting my CP pants tilesheet to FS has weird offsets on some animation frames? I thought maybe it was similar to how hairstyles have hardcoded offsets, but I couldn't find any pants offsets in the code after a quick glance

orchid lily
# lucid iron What is the When on the original event?

"Spouse |contains=Wizard": false
I copied the event entirely, then changed the value of it to 'null',
then proceeded to recreate the same event with same entry and condition, but I saw no change, I even modified the event in the SVE folder and there was no change
I'm not sure if this is a bug or the like

lucid iron
#

Do a patch summary and share it perhaps

#

!json

ocean sailBOT
#

JSON is a standard format for machine-readable text files that's used by Stardew Valley mods.

If you need help with a JSON file, you can upload it to smapi.io/json to see automatic validation and share the link here.

When making mods, it's recommended to edit your files in a text editor with JSON support, such as VS Code, Notepad++, or Sublime Text. These programs will check for syntax errors.

lucid iron
#

Also share ur edit vs the sve edit

static otter
#

How are mods like SVE able to make changes to the farm map in-game via config? like it updates in-game

rare orbit
#

yo? for anyone who uses starblue valley 1.6 unofficial and any mod that requires lumisteria's tilesheets-outdoor dm me! i need some test help and feedback to make sure it looks good visually! i.e. it won't look jarring compared to starblue valley's recolor

orchid lily
# lucid iron !json

Thanks for pointing that out, I forgot about the patch summary, so I can look what's going on.
It's just that my file is quite big ( over 1000 lines) and I forgot that I copied the event from the SVE folder and pasted it in two different location and forgot, I deleted the duplicate and kept the modified version
everything works now

half tangle
#

VS Code randomly decided to start auto indenting lines further down in my code when I pressed enter and it took me 15 minutes to track down that somehow my "format on type" setting for specifically C# had gotten changed or the C# formatting style itself changed in my settings... no idea how, but hopefully that doesn't happen again. Anyway, sharing this here in case anyone else crosses path with this irritation. (It might've been an extension but I don't exactly use a ton of those)

tribal ore
#

I noticed that some users using foreign languages will have a display name for the character in other characters. I have a dialogue asset with entries like "Anniversary_Lance", but I'm guessing that won't just work when I'm feeding in a name key like "肯尼斯". How do I match the translated name to the correct NPC? Is that npc.GetDialogueSheetName()?

rough lintel
lucid iron
tribal ore
#

npc.getName() is what I'm using right now in the C#

lucid iron
#

switch over then

tribal ore
lucid iron
#

as confusing as it may be, NPC.Name is the real internal id and whats used as key to Data/Characters

#

if you look at NPC.getName() its backed by displayName

tribal ore
#

Alright, thank you!

lucid iron
#

for vanilla npcs in english these values happened to be the same

#

btw kantrip i was looking at Special Spouse Dialogue Framework

#

how do you feel abut supporting GSQs as a way to pick dialogue

steel plaza
#

sorry for asking this but where is the tilesheet of the travelling merchant?

steel plaza
#

thanks

round timber
#

when in doubt, its always cursors

#

or springobjects SDVpufferclueless

gaunt orbit
#

!cursors

#

Aw I thought we had a meme macro for that

round timber
#

!springobjects

ocean sailBOT
#

Most vanilla object sprites are in the Maps/springobjects asset. See a table of springobject sprites by index.

Some newer object sprites are in TileSheets\Objects_2. You can check the entry in Data/Objects to see where its sprite is stored; SpriteIndex is the position, and Texture is the asset name (defaulting to Maps/springobjects).

round timber
#

hmm

#

not a meme

#

sadge

lucid iron
round timber
#

its a lot less threatening when its teeny like that

mellow knot
#

hello @ivory plume me again with a question. I am loving the new local tokens functions in the latest cp version - is there any chance we would be able to target arrays in the future?

Right now I have some nice templates set up to generate crop, object, machine info, but ill have to edit fields like context tags, machine phases, crop phases etc separately since i cant use local tokens with the array fields. If its not doable that's reasonable! Just figured id ask if it was possible.

lucid iron
#

wait i thought u can let me try

ivory plume
#

Can you give an example of what you want to do? Local tokens should work exactly like any other token.

mellow knot
#

oh can i ?? i was troubleshooting with soph about how to handle it holdon ill grab an example

uncut viper
#

if you mean you want to set the value of a localtoken to an array itself, thats somethin you cant do bc it is ofc just an ordinary token

mellow knot
#

ok so if this is my template

        "LogName":"Advanced {{ITEM_TYPE}} Objects",
        "Action": "EditData",
        "Target": "Data/Objects",
        "Entries": {
            "{{ModId}}_{{ITEM_FLAVOR}}_{{ITEM_TYPE}}": {
                "Name": "{{ModId}}_{{ITEM_FLAVOR}}_{{ITEM_TYPE}}",
                "DisplayName": "{{i18n:AtelierGoods_{{ITEM_FLAVOR}}_{{ITEM_TYPE}}.name}}",
                "Description": "{{i18n:AtelierGoods_{{ITEM_FLAVOR}}_{{ITEM_TYPE}}.description}}",
                "Type": "ArtisanGoods",          
                "Category": -26,
                "ExcludeFromShippingCollection":"{{PerfectionToggle}}",
                "Edibility": "{{EDIBILITY}}",
                "IsDrink":"{{DRINKABILITY}}",
                "Price": 100,
                "ContextTags":[],
                "Texture": "Mods/{{ModId}}/Objects",
                "SpriteIndex": "{{ITEM_SPRITE}}"
            }
        }
    },```

i wasnt sure if the [] should be inside my token or left in the template, and i was getting some errors in vsc trying to format it
#

So ContextTags for Example would be the one im questioning about

lucid iron
#

is this the freaking

uncut viper
#

you'd have to do "ContextTags": [ "{{TAG1}}", "{{TAG2}}" ]

#

(for example with 2 tags)

#

where TAG1 and TAG2 are localtokens ofc

mellow knot
#

ok that makes sense, but how about Frames for machines, cuz thats [1,2,3,4,5] for example ?

#

or crop phases is also a similar one

uncut viper
#

uhh that one i defer to Pathos bc of not remembering how LocalTokens work when a string should be turned into an int

mellow knot
#

HEY i still appreciate the context tag help! thats one less append i have to make

lucid iron
#

what if u give "1,2,3,4,5"

uncut viper
#

the thing is the localtoken will always be a string

lucid iron
#

might work?

uncut viper
#

i dont think putting one big string into an int array would work. ordinareily tokens that can be known to be ints only wouldbe auto converted into individual ints but localtokens can be anything

mellow knot
#

ok so in the localtokens itd be "PHASES":"1,2,3,4,5" and in the template it'd be [{{PHASES}}] ?

lucid iron
#

but tokens r sets on the inside Bolb

ivory plume
#

In theory you can do the same thing and the strings will get converted into numbers:

"Frames": [ "{{Frame1}}", "{{Frame2}}", ... ]

(I don't recall off-hand how strict the type validation for local tokens is though, you'd need to try it.)

uncut viper
#

i thought i recalled issues with localtokens when used in places like "Price" fields bc of the auto conversion, but i couldnt recall if that was fixed (or if my memory made it up)

mellow knot
#

thank you everyone!

mellow knot
ivory plume
#

(I'd be surprised if that works.)

uncut viper
#

i would say it should definitely NOT work if it does lol

mellow knot
#

ah lol ok gotcha XD at any rate ive got somewhere to go with all of this now SDVpufferthumbsup

uncut viper
#

if i put "1,2,3,4,5" as a context tag i would expect CP to respect that thats what i want the tag to be, not an object with 5 different tags of 1, 2, 3, 4, and 5

lucid iron
#

[Content Patcher] Can't apply data patch "(CP) (O)390 and friends > Include o390.json > EditData Data/Objects > entry #1" to Data/Objects: failed converting entry to the expected type 'StardewValley.GameData.Objects.ObjectData': Error converting value "1, 2, 3, 4, 5" to type 'System.Collections.Generic.List`1[System.String]'. Path 'ContextTags'..

#

nop Dokkan

mellow knot
#

well, thank you for trying incredibly fast for me chu ❤️

uncut viper
#

wait chu what was your json there

lucid iron
#

the content modders yearn for the foreach

mellow knot
#

i was thinking since phases is written that way perhaps itd handle it differently then the tags

uncut viper
#

did you just do "ContextTags": "1,2,3,4,5" essentially

lucid iron
#

yea

uncut viper
#

well i admire your hopeful spirit at least

#

i thought you were going to try "ContextTags": [ "1,2,3,4,5" ] (which also shouldntr work)

lucid iron
#

well that would just add like

#

a context tag named 1,2,3,4,5 right

uncut viper
#

yeah

#

thats the only way you'd be able to put smth like that in there with a localtoken

mellow knot
lucid iron
#

i dunno but since i have this up ill go try it too

#

it might just say nop

ivory plume
#

Note that Content Patcher will treat the comma as a value separator. So if you set the token value to 1,2,2,3, then the token will output 1, 2, 3 (unique values with spaces after the commas).

mellow knot
#

ah so itd be read differently than if the token was written as "1 2 3 4 5"

#

i see why the way you broke it up makes sense then

uncut viper
lucid iron
#

more or less expected alas

[Content Patcher] Can't apply data patch "(CP) (O)390 and friends > Include o390.json > EditData Data/Machines > entry #1" to Data/Machines: failed converting String value to the expected type 'System.Collections.Generic.List`1[[System.Int32, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]': Error converting value "1, 2, 3, 4, 5" to type 'System.Collections.Generic.List`1[System.Int32]'. Path ''..
mellow knot
#

ah well thank you for testing! ❤️

ivory plume
lucid iron
#

on the flip side, u can do something like this as a include

{
  "$schema": "https://smapi.io/schemas/content-patcher.json",
  "Changes": [
    {
      "Action": "EditData",
      "Target": "Data/Machines",
      "TargetField": [
        "{{L@MachineName}}",
        "WorkingEffects"
      ],
      "Entries": {
        "FiveFrameWorkingEffect": {
          "Id": "FiveFrameWorkingEffect",
          "Interval": 100,
          "Frames": [ 1, 2, 3, 4, 5 ]
        }
      }
    }
  ]
}
#

then u just give L@MachineName to apply it onto w/e machine

#

whether this is worth it depends on how many machines have exactly 5 frames lol

ivory plume
#

Another option would be to set the array fields in a separate non-templated patch. For example:

{
    "Action": "EditData",
    "Target": "Data/Crops",
    "Fields": {
        "SomeCropId": {
            "DaysInPhase": [ 1, 2, 2, 3 ]
        },
        "AnotherCropId": {
            "DaysInPhase": [ 1, 3, 4, 4, 5 ]
        }
    }
}
lucid iron
#

-# ForeachFields when

ivory plume
#

(ForEachFields wouldn't help in this case, since you need an array of values for a single field.)

lucid iron
#

WorkingEffects is too deep to do Fields at top level tho NotteThink

ivory plume
#

Fields works with TargetField too.

lucid iron
#

yea but u wouldnt be able to apply to a bunch of machines

mellow knot
lucid iron
#

but i guess its ok if u dont care about just replacing all of WorkingFields?

ivory plume
#

Yeah, you'd need separate patches for deeply nested fields unfortunately.

mellow knot
#

chu ty for your example as well thats also great to have as a reference

lucid iron
#

the include version would append onto any existing WorkingFields that are not Id=FiveFrameWorkingEffect

#

so its good when u want to say, have a item be on sale across a bunch of stores

mellow knot
#

yeah the localtokens overall are a HUGE improvement for my pile of objects and machine rules etc so im super happy with them rosehappy a few separate patches is still a huge win hehe

#

and adding new items/categories will be a breeze once ive set the new code up

uncut viper
#

hm i always forget the Lost Books are like a library thing handled in LibraryMuseum.cs
is this an important feature to include for a custom museum framework do we think. any thoughts on this. or will people not really care about making custom lost books specific to their museum

calm nebula
#

Literature is good

lucid iron
#

this issue has been assigned to spiderbuttons@

#

idk if it's your job really, it's quite simple to replicate it with conditional map patches

#

having a nice menu is the harder part but that is also decidedly not your job

uncut viper
#

thing is i dont think you even need a framework for doing that for the vanilla museum, im pretty sure it might already be possible with CP alone?

#

you can just keep giving the player lost books and itll increment the networldstate stat

#

and thats whats used as the iterator count in the for loop in the museum, which just adds lost books to all the lost book locations, which are just TileDatas

#

and the Note map action just reads from Strings\Note:<noteId>

lucid iron
#

it's quite simple to replicate it with conditional map patches

uncut viper
#

this is for lost books specifically though, this request seems to want like... BOOK books

#

they dont need to be conditional

#

they can just be

#

hell, they can technically be in a custom location too if you set the map type to LibraryMuseum (id not recommend it i think)

#

the vanilla museum doesnt conditionally patch the books, neither would you need to SDVpufferthumbsup

lucid iron
#

well button do u want to dehardcode the bit in LibraryMuseum then

uncut viper
#

my point was that its not actually hardcoded

#

as long as you want your new lost books to appear in the vanilla museum

lucid iron
#

but ur mod is about doing museum things not in the museum Bolb

uncut viper
#

my "would people even want this from a museum framework" question is if ppl would be interested in things that are not lost books but their own totally seprate thing specific to their museum

#

like secret note framework custom notes but for museum books

lucid iron
#

that said i think u are like, fairly close to just making it work too

uncut viper
#

or if ppl just dont give a dang about lost books at all

#

its more docs to write SDVpufferpensive

lucid iron
#

no i mean

#

atm when you inspect item you get something like a tileaction Message right

uncut viper
#

more or less

lucid iron
#

can you make it also allow Letter

#

so if people want a novel they can

uncut viper
#

what you're describing is a seprate system where peopl would donate book items

lucid iron
#

yea basically

#

i feel this would be low amount of work + doc

uncut viper
#

as opposed to the lost book system of digging up artifacts and getting a Item Go Poof and then a TAS in the museum until you read it

#

(or however else the mod author would want to give their Item Go Poof)

dusk terrace
#

@polar escarp Hi! Sorry for the ping, not sure what's the best way to contact you directly...
I'm working on converting a mod to use Fashion Sense and I noticed a few bugs and mistakes (e.g. incorrect animation conditions in the templates, dead links in the docs, etc) but most notably, I dug into the source code and found a fix for bodies rendering over water while swimming, just need to add these 3 lines from the vanilla draw call, but I'm just not sure if you've redefined Farmer.yOffset somewhere

// Swimming body render cutoff
if (!FarmerRenderer.isDrawingForUI && who.swimming.Value)
{
    sourceRectangle.Height /= 2;
    sourceRectangle.Height -= (int)who.yOffset / 4;
}

I can send a PR your way if you'd like. Not sure if you'd also like a PR for the doc fixes or to just DM you

lucid iron
#

i think the fact that someone did actually just make a book collecting mod in secret note framework means non zero demand but whether people wish to see their book in physical location is unclear

uncut viper
#

(the reason i care abt the specific lost book esque system is bc i have been trying to give these custom museums full feature parity with the vanilla museum so that a mod author can do everything they might wanna do that the normal museum can... and id just forgorten that lost books are technically a requirement for feature parity)

faint ingot
#

Can I replace the dialogue where the farmer's spouse/roommate says they got up early and fed the farm animals?

rigid musk
#

If you know the string for it yes

faint ingot
#

I can't find it in the unpacked marriage dialogue file

#

or in the wiki

rigid musk
#
"NPC.cs.4470": Something about checking sprinkler systems? I don't recall what this one is I just know that's what I wrote for mine lmao.. maybe something about farm maintenance 
"NPC.cs.4474": Farm animals
"NPC.cs.4481": repaired fences ```
uncut viper
#

its in StringsFromCSFiles

rigid musk
#

They aren't in- yeah

uncut viper
#

bc theyre generic

rigid musk
#

I suggest making sure that your patch has a condition for when it's done for the specific spouse - otherwise it will overwrite all of the dialogue... so if someone chooses to marry leah then leah will say those lines

faint ingot
#

thanks I found it, and yeah I will make it specific

next plaza
#

I just learned that Harmony prefix patches which "have no side effects" (ie. no affecting the return value, or having ref input arguments) are not skipped when another prefix skips the original method, regardless or patch priority.

That certainly explains some things.

(I'm not modding right now, found out about this for other nefarious purposes, but thought I'd mention it because people might find it interesting/useful)

uncut viper
#

(in case the difference matters to someones patching: the prefix specifically has to return void, too, so it wont go to another skipping prefix either even if that second skipping prefix doesnt affect or skip ever)

rare perch
#

https://github.com/Aurekata/connors-cool-haircuts

I'm trying to create a fashion sense mod (for hair), and I know the conditions/manifest are working since I get a working file (hair) from another mod to show up and be wearable in game, but my png file with the hair that I made won't show up in the mirror item, and there's no errors in SMAPI. Are there any tests I can run to troubleshoot/diagnose? I'm not sure if my dimensions in hair.json are bad or if the png won't load.

GitHub

Stardew Valley haircut mod by Aurekata. Meant for Fashion Sense. Doesn&#39;t work and the current hair images 2&amp;3 are dummies from &quot;Harry&#39;s Short Haircut&quot; mod ...

dusk terrace
#

what does it say when you run fs_reload?

fallow grotto
#

it gets mad without the pngs, how do i revert it to use the default tile sets?

#

i was told to set the scorce as the png, and the remove them from the folder when im done editing, but that breaks it

urban patrol
#

!tilesheetclimbing

ocean sailBOT
#

When creating or editing maps in Tiled, one common error is tilesheet climbing, marked by red text containing "invalid tilesheet path '../../..'. This is caused by SMAPI not being able to find the tilesheets needed by the map file. To prevent this error, make sure that you have a copy of all necessary tilesheets in the folder containing your WIP tmx file. Copies of vanilla tilesheets can later be deleted, but must be present while working on your map.

If you get this error with a completed map, an easy way to fix it is to open your tmx file in VS Code or a similar text editor, find all of the places with <image source=, and remove the filepaths to so that only the tilesheet names remain. For example, if the code says <image source="Content (unpacked)/Maps/townInterior_2" width="512" height="64"/>, change it to just <image source="townInterior_2" width="512" height="64"/>.

urban patrol
#

you always need to have the tilesheets in the folder while editing, and then remove them when done with them, but if you go back to edit again then you'll need to have the tilesheets in the folder again

#

there's a tutorial with some suggestions for how to set up your map workspace, let me see if i can find it

#

personally, i copied all the tilesheets and maps into a folder on my desktop, including my custom maps and tilesheets, and i make edits to files in that folder, and then when i'm done editing a map file i copy it to my mod folder. i never open maps from my mod folder.

fallow grotto
#

i figured that out, i acidently modified the map in the ingame mod folder and not my working foler

#

but how do i fix this?

urban patrol
#

is your tilesheet prefixed with spring_?

fallow grotto
#

yes

lucid iron
#

it looks like you are targeting the wrong sheet entirely

fallow grotto
#

thers like 4x more

lucid iron
#

did you do a Load at any point NotteThink

fallow grotto
#

what that

lucid iron
#

oh i think i know why, your sheets are relative to your map tmx but not directly next to em

fallow grotto
#

the png have to be n the same folder as the map?

lucid iron
#

so the name is different than what game expects, perhaps a/subfolder/spring_outdoorsblahblah instead of spring_outdoorsblahblah

#

yes if you are using vanilla sheets

#

and also do not actually include the sheets in your mod folder

lucid mulch
#

That error is an internal access key that points to a missing file

urban patrol
#

did you copy the vanilla tilesheets, or move them?

fallow grotto
#

all you people are great 😁

#

(trees are wird cause i used a cheet to skip time)

ornate trellis
#

I broke my entire map :(

blissful panther
#

Might be easily fixable with manual editing!

#

I would have a look if I wasn't on my phone, but someone might be able to if you uploaded the map?

ornate trellis
#

i think...I got it to work again?

gaunt orbit
#

Sounds like a file lock?

ornate trellis
#

idk what happened but all my tilesheets were gone from the map, y'know the one when you delete all sheets with the red botes...and when i tried readding them one didnt want to and gave me that error

#

yay its fixed

#

still no clue what exactly happened

sour sleet
#

Hi all! Can someone help me understand how to format the adding or removing of friendship when selecting specific answer dialogue in an event? This is what I currently have and it's not working. (The friendship amount is too much ik, it's just so I can test) quickQuestion #{{i18n:event-Alden8Hearts.07}}#{{i18n:event-Alden8Hearts.08}}(break)speak AldenLilybrook \"{{i18n:event-Alden8Hearts.09}}\"\\friendship AldenLilybrook 500\\(break)speak AldenLilybrook \"{{i18n:event-Alden8Hearts.10}}\"\\friendship AldenLilybrook -1000\\/pause 500/

#

(this isn't the whole event, just the relevant part lol)

rigid musk
sour sleet
#

Yep, no difference in hearts

round timber
#

this probably isnt it but have you tried switching the order of the friendship command and the speak command? thats the only difference i see right now when compared to my own events

#

/quickQuestion {{i18n:{{ModId}}_8Heart.10}}(break)speak {{Honeyfuggle}} \"{{i18n:{{ModId}}_8Heart.11}}\"(break)speak {{Honeyfuggle}} \"{{i18n:{{ModId}}_8Heart.12}}\"(break)friendship {{Honeyfuggle}} -500\\speak {{Honeyfuggle}} \"{{i18n:{{ModId}}_8Heart.13}}\" for comparison

sour sleet
#

I shall try that now

ivory plume
#

Not sure off-hand if it matters, but there shouldn't be a \\ at the end of the inner script (before (break) or /); that'll be treated as an extra invalid event command.

#

(Also you don't need {{ModId}} in your i18n keys, since i18n is already scoped to your mod; keys like {{i18n: 8hearts.10}} are fine.)

sour sleet
#

Does this look okay? quickQuestion #{{i18n:event-Alden8Hearts.07}}#{{i18n:event-Alden8Hearts.08}}(break)friendship AldenLilybrook 500\\speak AldenLilybrook \"{{i18n:event-Alden8Hearts.09}}\"(break)friendship AldenLilybrook -1000\\speak AldenLilybrook \"{{i18n:event-Alden8Hearts.10}}\"/pause 500

ivory plume
#

I think that looks fine.

round timber
#

ok but i like having the mod id in the i18n kek

ornate trellis
#

Aba told me the same before and I was like "but...brain says....modid..."

sour sleet
#

Ok, so no errors now, but it's not changing the friendship

ivory plume
#

(It's more verbose, but I feel like the 1.6.16 way is easier to read and troubleshoot.)

choose "" "{{i18n:event-Alden8Hearts.07}}" answerA "{{i18n:event-Alden8Hearts.08}}" answerB/

label answerA/
friendship AldenLilybrook 500/
speak AldenLilybrook "{{i18n:event-Alden8Hearts.09}}"/
goto resume/

label answerB/
friendship AldenLilybrook -1000/
speak AldenLilybrook "{{i18n:event-Alden8Hearts.10}}"/

label resume/
pause 500/
round timber
#

grabby hands

lucid iron
#

If u like having ur mod id in the i18n

#

You can always just load ur i18n and use the translation key directly

#

I think it work in events?

ornate trellis
#

why so many "

round timber
#

idk what that means SBVWhat

sour sleet
ornate trellis
#

i look forward to the well explained wiki pages later for that new stuff because brains nopeing out

ivory plume
sour sleet
#

Ohh! I'm dumb haha. I look forward to the new style though! I'm confused as to what is wrong with my current script though SDVpufferclueless

lucid iron
# round timber idk what that means <a:SBVWhat:1153140209412755516>

if u do this

{
  "Action": "Load",
  "Target": "{{ModId}}/i18n",
  "FromFile": "i18n/default.json"
},
{
  // for translations
  "Action": "Load",
  "Target": "{{ModId}}/i18n",
  "TargetLocale": "zh-CN",
  "FromFile": "i18n/zh.json",
}

u can do speak actor {{ModId}}/i18n:yourDialogue

#

or use it like [LocalizedText {{ModId}}/i18n:yourDialogue] in other places Dokkan

ivory plume
lucid iron
#

and its still valid i18n

ivory plume
sour sleet
#

Oh wow, wait til you hear this. I had enabled 'No friendship decay' within CJB omg

#

All working good noe c:

uncut viper
#

i also use that for a c# component to have access to the translations. I'd probably just use reflection now though out of laziness

lucid iron
#

I remember LoC having elaborate thing to load the translations from content pack into the C#'s translation helper

rough lintel
#

wait a minute, you’re not pathos

#

why are you posting smapi stats SDVpetgoat

fair depot
rough lintel
#

LMAO

#

you posted random smapi site costs from 2015 to apr 2025?

ornate trellis
#

this jsut adds to the confusion i already had on how to add a ticket machine from central station to my map

rough lintel
#

why do you have that image saved lowkey LMAOOO

fair depot
#

Because that was not a picture in my phone

#

I only pulled my phone out of my pocket to ask my girlfriend if she wants snacks at Walmart what the fuck

rough lintel
round timber
#

it looks like u did a remix which u dont gotta save the image to do

fair depot
round timber
#

its in the pins of this channel!

tawdry tundra
#

wanted to see what was the api you accidentally posted

fair depot
#

I’m getting out of this channel. I’m so sorry. Enjoy my mess of me keeping my phone in my pocket. good luck coding.

rough lintel
#

lmao

ornate trellis
#

i like it when things work the first time around

urban patrol
#

just to check, heart events have no prerequisite where you have to view them in order, right?

#

like if someone hasn't seen the 5 heart event they can still see the 7 heart event?

round timber
#

not necessarily, but you can add a SawEvent precondition to the event if you want it to work like that

fallow grotto
#

fo walling off out of bound areas, do i use a spacific tool, or just spam flower pots or smth on the building layer

round timber
#

it doesnt matter what the tile you use to block things off, just as long as its on the Buildings later

fallow grotto
#

ok

urban patrol
#

and unfortunately they're on android soooo

fallow grotto
#

flower pots it is

round timber
#

do they have Event Limiter? that might be interfering

urban patrol
#

nope, just my mod

#

i just don't know how to troubleshoot because they can't do things like debug ebi

round timber
#

hrm

#

wish i could be of more help but i am pretty much an event babby myself lol

urban patrol
#

no worries haha

#

i know android is weird too

round timber
#

yeah if no other obvious problem comes up id chalk it up to that

urban patrol
ocean sailBOT
#

Log Info: SMAPI v4.1.10.3 - 1735840167 with SDV 1.6.15 build 24354 on Android Unix 29.0.0.0, with 2 C# mods and 1 content packs.

brave fable
fallow grotto
#

these are spawn points right?

ivory plume
worldly sundial
#

Does anyone mind showcasing my mod? https://www.nexusmods.com/stardewvalley/mods/34075
Adds conveyor belts for automation! The belts automatically "pull" and "push" items from machines and chests. The Factory Must Grow.

Nexus Mods :: Stardew Valley

Adds conveyor belts for automation! The belts automatically 'pull' and 'push' items from machines and chests. The Factory Must Grow.

brittle pasture
#

when do we get biters

lucid iron
#

hm what exactly happens if u need more than 4 inputs for whatever strange reason

#

(i shall not name the strange reason)

worldly sundial
#

Then use a bigger machine?

brittle pasture
#

(speaking of, is furniture machines supported, I know there's only like 2.5 mods that use it rn)

worldly sundial
#

I didn't test with furniture machines but I think it would work fine, I'm assuming furniture machines' harmony patches make it work with automate? The push/pull logic I used isn't too dissimilar to automates

#

hmm actually idk how furniture works, its probably not in location.objects so maybe not

brittle pasture
#

yeah furnitures are saved to GameLocation.furniture and not GameLocation.objects

lucid iron
#

i think the only jank is whether you are check for furniture by its entire bounding box

brittle pasture
#

but yeah their logic is otherwise identical

#

just PlaceInMachine (or performObjectDropInAction) and grab the output

lucid iron
#

im glad we have the 3 automations for Junimos Neutral Joja

fallow grotto
brittle pasture
#

btw cool mod! if I escape the cheeto curse and somehow play enough to start a new playthrough I'd switch off junimatic for this

lucid iron
#

these pots will all be visible is that the desire

fallow grotto
round timber
#

looks nice

brittle pasture
#

we now have 5 different codebases that (have to re)implement taking machine output and handling all the "on machine collected" updates (vanilla, automate, junimatic, dalionheart, and now stardio), it makes adding your own "output collected" handler very non-trivial

lucid iron
worldly sundial
#

Yeah I had to do EMC since this came from me working on a mini factory expansion that uses it haha
I'll get FM supported as well, since I think its neat

lucid iron
#

or maybe do it like quests

#

fire some event ppl can hook to inspect

worldly sundial
#

Will furnituremachines be unhappy if I pass null to IsFurnitureMachine

brittle pasture
#

looks like it will, sorry

ivory plume
# lucid iron <@226803198218731520> can you make `Object.TakeMachineOutput` please

That isn't really trivial, since...

  • there's so many ways that vanilla machines work even before you account for mods;
  • the game needs to support cancelling taking output (e.g. if the player or chest doesn't have enough space in their inventory);
  • sometimes it may need to support partial output;
  • and the machine code is still all over the place (even after the 1.6 refactor which improved things significantly).

So it's definitely something we can discuss next time we have a mod author beta, but it's not a quick change I can just throw in without looking into it further.

lucid iron
#

yea for certain DokkanStare

visual dirge
#

machine code is eeeevil omg

lucid iron
#

i have some bias towards having event hook so people dont have to harmony as much

#

but its not clear how you'd actually allow a mod to take away the output in this case

ivory plume
#

(The machine code was much worse before 1.6. Automate had to work by manually reimplementing the entire machine logic for every machine.)

visual dirge
#

oh wow

#

well im glad it's better than that now

#

still very cursed though

fallow grotto
#

if i use spring_day_ambiant, will it also change with the season like tiles do?

vernal crest
#

Any tilesheet that is prefixed with the season will be automatically switched to the appropriate season by the game.

blissful berry
#

so if im passing the Random token into my default json, do i need to include the arguments???? right now i have it set up like this...
in a seperate Animations.json file: "lift_weight": "{{i18n:animation.lift.weight |random={{Random}} }}"
in my default.json: "animation.lift.weight": "{{Random: 1876... 1877... 1878... 1879..., *grunts* Must get stronger...}}"

when i ran the game i got this error-- "System.InvalidOperationException: The 'Random' token requires input arguments." so.... i should list the arguments twice? both inside and outside of default?

vernal crest
#

So yes, but obviously make sure you have made summer, fall, and winter versions too.

worldly sundial
#

@brittle pasture ezpz furniture machine supported (matching code block for pushing)

vernal crest
# blissful berry so if im passing the `Random` token into my default json, do i need to include t...

What are you trying to achieve with your random token? If you want to use it to specify different dialogue lines it needs to look something like the following:

dialogue.json (in my case)

"FlowerDance_Accept_Spouse": "{{i18n: Hiria.FlowerDanceSpouse.{{Random:1,2,3}}}}"

default.json

"hiria.FlowerDanceSpouse.1": "FlowerDanceSpouse.1 PLACEHOLDER",
"hiria.FlowerDanceSpouse.2": "FlowerDanceSpouse.2 PLACEHOLDER",
"hiria.FlowerDanceSpouse.3": "FlowerDanceSpouse.3 PLACEHOLDER",
ivory plume
blissful berry
#

ahhhh okay, i see. thank you both for the responses!

blissful berry
ivory plume
brittle pasture
sour sleet
#

What happens if you gift an NPC with an item not specified in their gift tastes?

vernal crest
#

I think it should apply the universal taste

sour sleet
#

Oh that's good - I was concerned I needed to specify everything!

ivory plume
worldly sundial
lucid iron
#

hm i got update ping even tho its got a -beta.0 key and is a pre-release

[SMAPI]    TrinketTinker 1.6.0-beta.0: https://github.com/Mushymato/TrinketTinker/releases (you have 1.5.9-beta)
ivory plume
#

You have a pre-release version installed, so it'll show update alerts for newer pre-release versions.

lucid iron
#

oh thats good then ty

#

i kind of assumed it wouldnt check for greater actual version b4

ivory plume
next plaza
#

(also, really nice looking mod Jukthefoo! SDVpufferthumbsup)

ivory plume
#

!fourcakes

rough lintel
ivory plume
#

!cakeshop

brittle pasture
#

my sixth cake will be hiring joja workers

#

the ultimate conclusion to the joja route - become joja itself

fallow grotto
#

i didnt add that squirell XD

whole raptor
#

Joja takeover! (but it's the farmer taking over joja and starting an empire)

lucid iron
#

thats a map critter

#

why not start our own grocery empire

whole raptor
#

Another opportunity to piss off Pierre, sign me up

brave fable
vernal crest
next plaza
#

I have conclusively proven there is a hard limit for the maximum number of cakes (it's the highest supported number for nexus mod IDs)

lucid iron
#

does nexus store their mod id in a int tho

#

what if its a string

next plaza
#

(The soft limit is the highest supported number, minus other mods. To surpass the soft limit you have to steal old mod pages and retroactively turn them into cake)

lucid iron
#

nexumods string-ids fork

next plaza
worldly sundial
#

what if its a 16bit int, we're halfway done with all the stardew mods SDVpufferwaaah

lucid iron
#

im psure skyrim is past that right

uncut viper
#

just parse the last character in the string as an int, increment, carry as necessary one char at a time, convert back to string

#

very standard practice /j

lucid iron
#

150376 skyrim special ed. mods

next plaza
next plaza
next plaza
#

Whether reserved, or people making them private for various reasons (like when collections were added, or when they changed the DP distribution)

whole raptor
#

So a third of SDV mods is hidden? Interesting SDVpufferthink

worldly sundial
#

Ok everybody we only need 90k more released mods to beat skyrim so get cookin

vernal crest
#

Hmm I have 34 unreleased mods I could add...