#making-mods-general

1 messages · Page 300 of 1

latent mauve
#

Yet another reason to run away screaming from SVE compat /joking

golden spire
#

so have to

        "Action": "EditData",
        "Target": "Data/Festivals/spring13",
        "Priority": "Late",```
ivory plume
#

(Festival compatibility being so tricky is something I'd like to tackle in future Stardew Valley updates.)

valid folio
#

I didn’t fully understand. I’m working with the content.json. I was about to replace this: "MapPath": "{{InternalAssetKey: assets/Maps/Map.tmx}}" with this: "MapPath": "Maps/{{ModId}}_Sunnyfield", and then add this:
{
"Action": "Load",
"Target": "Maps/{{ModId}}_Sunnyfield",
"FromFile": "assets/Maps/Map.tmx"
},
{
"Action": "EditMap",
"Target": "Maps/{{ModId}}_Sunnyfield",
"MapProperties": {
"Pathoschild.CentralStation_TicketMachine": "74 3 Bus"
}
}
because I don’t know how to do it in Tiled. I’m not sure which way you think is easier or simpler to do.

golden spire
#

my solution has been to go out of bounds for Easter Egg/jokes :p

tiny zealot
latent mauve
#

(If we can figure out how to append advancedMove at a certain point in events, I'd be a very happy camper)

tiny zealot
ivory plume
# valid folio I didn’t fully understand. I’m working with the content.json. I was about to rep...

I suggest leaving the content.json as-is (with just the patch we added before for the bus stop).

Then:

  1. Open assets/Maps/Map.tmx in Tiled (fix any spritesheet errors the same way as before).
  2. Click Map > Map Properties to open a panel on the left side.
  3. Under "Custom Properties" at the bottom of that panel, click the + button.
  4. Add a property named Pathoschild.CentralStation_TicketMachine (keep the default type) and click OK.
  5. In the value field in the left panel (it should already be selected), paste 74 3 Bus.

Then save, launch the game, and take the bus to Sunnyfield. Now you should see the new ticket machine.

valid folio
ivory plume
golden spire
#

installs 500 NPCs, every space automatically filled.

#

can't move anywhere with ease

brave fable
#

why not simply stand them on top of one-another. npc tower

rigid musk
#

The Amalgamation TM

golden spire
#

for some reason that made me think of stacking meeples in Carcassonne

ivory plume
#

Have a little conveyer belt, so they all slide past so you can talk to all of them.

golden spire
brave fable
#

carcassonne...

lucid iron
#

idk i still like the festival parallel universes

tiny zealot
golden spire
#

my fave tabletop "board"game

valid folio
ivory plume
#

Yep. You should be able to copy that custom tilesheet into the folder the same way as the vanilla tilesheets.

#

(If you don't see it, try checking that mod's content.json to see which file it loads it from.)

valid folio
ivory plume
#

Can you post a screenshot of what you see?

calm nebula
lucid iron
#

yes pls

ivory plume
#

(Dropbox, the filesharing service?)

lucid iron
#

theres 2 things

  • if 2 mods attempts to add Action DropBox on the same tile one mod loses
  • only one ❓ is drawn per location
ivory plume
# valid folio

I think you'll see it if you scroll down the left pane, but you can just click the + icon in the bottom-left corner of that pane:

calm nebula
calm nebula
#

Well, actually, special order dropboxes

#

My suggestion is to treat the Dropbox indicators in data/specialorders as the click interactive, possibly?

#

There is a secondary issue that if two active quests use one drop box you can only turn in items to the first active quest

valid folio
ivory plume
#

Oh, it is there; I'm just not used to that color scheme.

ivory plume
#

Yep.

valid folio
ivory plume
# calm nebula

Hmm. Not sure there's any simple way to handle this in the base game without custom UI logic to choose which dropbox you want to interact with.

calm nebula
#

tbh that's basically the solution I was going to go with

#

a little set of arrows at the top, selecting which dropbox you want, or something like the chests anywhere dropdown

#

using the Name field of the special order

valid folio
ivory plume
#

I generally try to avoid vanilla changes that don't apply to the base game (e.g. refactoring game code to make it extensible is fine, but adding features which the game will never use is generally out of scope). How often does this happen?

calm nebula
#

well, I got two bug reports over that issue in about three days, when I asked about it Selph immediately had examples, etc.

ivory plume
#

Hmm. Well when we eventually have a modder beta for 1.6.16, we can discuss it again then to see what the options are.

calm nebula
#

no idea otherwise, and tbh I'm annoyed enough that I will just put together a mod that changes how the dropboxes work

sour sleet
#

Is it possible to not be able to enter a specific building (outdoors) until the player has a certain letter in the mail?

#

The building is not their house

valid folio
tiny zealot
lucid iron
north palm
#

hello..

what am I doing wrong with this schedule

"Tue": "800 Hospital 16 8 0 "Strings\schedules\{{lr_cnt}}:Work1"

The npc wouldn't leave their house or appear at the spot even if the time already passed.

golden spire
#

you need more than 1 schedule point

north palm
#

actually it's a long string

"Tue": "800 Hospital 16 8 0 "Strings\schedules\{{lr_cnt}}:Work1"/1200 Hospital 20 12 2 "Strings\schedules\{{lr_cnt}}:Lunch"/1300 Hospital 4 6 2/1400 Beach 22 24 3/1500 Town 48 82 2/1700 {{ModId}}_CustomHouse 9 5 0/2200 {{ModId}}_CustomHouse 13 4 1 sleep",

tiny zealot
#

did you sleep a day or use a new save for your test?

north palm
#

I also had this error

tiny zealot
#

if your NPC is newly added to an existing save, they won't follow their schedule the first day

sour sleet
golden spire
#

seen event/flag/relationship.. whatever you want

calm nebula
sour sleet
#

I understand the conditions part but I don’t know how it’s applied to the door being locked until then

golden spire
#

you just patch the tile data to become an openable door once the condition is met

#

so before that.. it might just be a label "no admittance" or something.

tiny zealot
#

in your tmx (the default state of the door), make it whatever Action it is to be locked (Message or something like that; consult vanilla).
in your patch, check for the flag and change it to Action Warp or whatever it is for doors that are always unlocked. i don't remember what the correct properties are offhand

sour sleet
#

Ahh so as a Tile property then! I thought I had to include it in the Location Data. Thanks both of you SDVpuffersquee

golden spire
#

and then you can do the thing I like to do, have the NPC yell at the player if they warp to them before the door is accessible 😛

north palm
#

the schedule apear but he wasnt on the spot

golden spire
#

"What are you doing in here!?! I'm going to call the police!"

sour sleet
#

Haha! Love it

valid folio
# ivory plume Hmm. Well when we eventually have a modder beta for 1.6.16, we can discuss it ag...

The image where everything looks brown and my character is in the center is if I travel through Central Station. The other image is if I travel using the Bus Location mod. It's clear that when I made the content.json part, I did it wrong and by mistake, I traveled using the Bus Location mod when I should have traveled through Central Station. Up to Central Station everything works fine, but when I travel from the ticket machine, when my character arrives in Sunnyfields, it looks like this, as if there are no textures. It also seems that the bus stop can’t be used as a warp and that other locations need to be used. That’s what I understood from the message.

indigo yoke
#

hey, just want to check to make sure my logic is sound on this. I got some complaints on EXP control that they were losing their fractional exp values so I am trying to store them.

lucid iron
#

how many sigfigs do u care about

ivory plume
light jasper
#

that's a lot of precision

indigo yoke
valid folio
ivory plume
#

Yep.

light jasper
valid folio
ivory plume
#

Yep. This time you should land in the actual town instead.

calm nebula
#

there will be rounding error but it's less than 2 sig figs

light jasper
#

but they're using decimal atra

#

they need all 28

calm nebula
#

(back of envelop says float is 7, double is 15)

light jasper
#

or whatever it is

calm nebula
#

they're rounding to two sig figs for some reason

#

or is that at least two sig figs

light jasper
#

ik lol but I think it's funny to pretend they need it

calm nebula
#

tbh it's been ages since I've been in C#, I've been in python/verilog/worse

#

anyways. tbh the last time I did something like that I just used proportional round iirc

#

proportional random round

ivory plume
#

(It can probably be a lot simpler; just assign the floored whole number to the player's XP, and save whatever is left for later.)

decimal totalExp = ...; // calculations here
int newExp = Math.Max(0, (int)totalExp);
decimal storedExp = totalExp - newExp;
calm nebula
#

which gives you the same expected value over time anyways and involves no storage

indigo yoke
calm nebula
#

what's the current version

#

proportional random is the same expected value.

indigo yoke
#
howMuch = (int)Math.Round(ModEntry.Config.FarmingEXP * howMuch);
calm nebula
#

that's not proportional random

#
    public static int RandomRoundProportional(this float val)
    {
        double below = Math.Floor(val);
        return Random.Shared.NextDouble() < (val - below) ? (int)(below + 1) : (int)below;
    }
indigo yoke
indigo yoke
ivory plume
calm nebula
#

(couple of things - don't use modDataForSerialization, that's a specialzed thing for the serializer)

#

just use modData

valid folio
ivory plume
valid folio
ivory plume
#

Yep.

indigo yoke
indigo yoke
calm nebula
#

Pathos is negative xp a real thing?

indigo yoke
#

yes

#

that was an issue with the luck skill actually

valid folio
indigo yoke
#

since it gave you exp based on your daily luck value *750, on negative luck days you could loose exp

calm nebula
#

(the game sure doesn't expect negative xp, I can tell you that.)

ivory plume
indigo yoke
valid folio
ivory plume
#

(So that's why SpaceCore did that.)

calm nebula
#

why spacecore did what?

valid folio
#

I think that’s the important part of the error message.

[game] Location 'novaphene.sunnymap_Sunnyfield' failed to load seasonal asset name 'SMAPI\novaphene.sunnymap\assets\Maps\summer_outdoorsTileSheet.png' for tilesheet ID 'spring_outdoorsTileSheet'.
SContentLoadException: Failed loading asset 'assets/Maps/summer_outdoorsTileSheet.png' from SMAPI\novaphene.sunnymap: the specified path doesn't exist.

@ivory plume

ivory plume
#

Yeah, that's normal. It's because you copied the tilesheets into the folder; that's why you'll need to delete the ones you added when you're done. You can just ignore it for now, it won't affect what you're working on.

#

Can you upload your SMAPI log to smapi.io/log and post the link here?

valid folio
ivory plume
#

The full log is better. I can filter the log as needed, I'm used to it.

sour sleet
#

Hope it's ok to ping

rigid oriole
#

barleyzp's field of thoughts

tiny zealot
sour sleet
#

Ahh ok, will try that. And what did you mean by patching the door, how do I do that?

calm nebula
#

I swear there was a GSQ door or smth

tiny zealot
indigo yoke
# calm nebula ```cs decimal totalExp = ...; // calculations here if (player.modData.TryGetVal...

just want to make sure as well since I heard different things in the past. This part here: player.modData[YourKey] = storedExp.ToString();

I've done

                    if (player.modData.TryAdd("moonslime.ExpControl.CombatEXP", storedExp.ToString()) == false)
                    {
                        //Set the modData to the new stored exp value
                        player.modData["moonslime.ExpControl.CombatEXP"] = storedExp.ToString();
                    }

to make sure the key data exists before changing it, if it doesn't exist using the TryAdd will create it.

#

is that correct?

calm nebula
#

no, you can just straight up add a key

#

like, player.modData[YourKey] = value is fine if the key isn't previously there

#

(this is for dictionaries specifically)

ivory plume
tiny zealot
calm nebula
#

Pathos, while you're here - for some reason, the spinny circle makes smapi logs at least feel slower to load 😦

#

like, painfully slow when I'm on mobile

#

like, "yeah I'm not dealing with this" slow

sour sleet
ivory plume
# calm nebula like, "yeah I'm not dealing with this" slow

(It might be slower on mobile because your phone needs to fetch the log and render it clientside. The loading indicator probably doesn't change it much, except insofar as you don't have a few seconds where it looks loaded until you scroll down and see a bunch of {{placeholder}} values.)

ivory plume
indigo yoke
#

also ty for the help

tiny zealot
#

since CP is applying the always-open state, it was probably wrong of me to use LockedDoorWarp for the example of how to format a tile property patch

calm nebula
#

AHAH

#

ichor, this is the one I'm thinking of

#

ConditionalDoor

tiny zealot
#

there you go then! don't bother with all this stuff and just put a conditional door in your map and dust your hands

sour sleet
#

Can I do that within CP?

ivory plume
# valid folio

Oh, I see the issue. Try changing the map property's value from 74 3 Bus (which places it near the top of the map) to 74 39 Bus.

tiny zealot
sour sleet
#

Thanks for your help!

tiny zealot
calm nebula
valid folio
ivory plume
#

Sure!

#

(Sorry, I disappeared for a bit to do some quick chores.)

valid folio
valid folio
sour sleet
#

Is it ok to use 2 NPCs to check for 6 hearts with a when? Like this? "When": { "Hearts:Polly Peter": "6" },

#

I want the mail to only send when BOTH NPCs are at 6 hearts

ivory plume
#

No, but like this will work:

"When": {
    "Hearts:Peter": 6,
    "Hearts:Polly": 6
},
calm nebula
#

(this is exactly 6 hearts though)

ivory plume
#

Keep in mind that means exactly six hearts; if you want to allow any number beyond 6 too, you'll need a range or query.

calm nebula
#

fragile. You can trivially jump almost 4 hearts with an iridium loved gift

#

if you're sending mail, there's a gsq which is pretty easy to do a range

sour sleet
#

Ahh thanks! I actually do want to go as a minimum of 6 now I think on it

tiny zealot
#

purple loved and a stardrop tea (or two, or more!) on a birthday and you can go from zero to full hearts instantly

sour sleet
#

Good point, didn't think of that lol

#

Would it be this as the GSQ? PLAYER_HEARTS <player> <npc> <min hearts> [max hearts]

vernal crest
#

Yup

ivory plume
#

Yep: "PLAYER_HEARTS Current Peter 6, PLAYER_HEARTS Current Polly 6".

sour sleet
#

And one last thing (before I sleep) For the map patch after receiving the mail, is it "PatchMode": "Replace",
"When": {
"HasFlag": ________ (I don't know what to put here lol)

ivory plume
tiny zealot
#

i think you'll be better served by using the ConditionalDoor action instead of CP's When for this, as atra pointed out earlier.
i suggested the conditional patch in the first place because i didn't know about that action

calm nebula
#

Also, 8BitAlien, just gently

sour sleet
#

I've actually had a new plan for the area and this method will suit it better. I will keep the ConditionalDoor action in mind for later use!

calm nebula
#

People come in and out of the channel all the time. I'd really appreciate it if you repeated more context per post

#

when I'm here, I'm rarely paying attention to the channel as a whole, so if the context isn't the message, I won't know what you're trying to do

sour sleet
#

Ah ok not a problem, just didn't wanna info dump lol

calm nebula
#

no worries! It's weird, online spaces like this, especially ones that make backsearching hard.

patent lanceBOT
#

@vernal crest: add quote marks (12h ago)

median forum
#

i finally finished coding my third heart event 😭

#

it took SO LONG

#

i unironically can't wait to start the next event and immediately get overwhelmed again

drowsy pewter
#

hmmm @blissful panther i asked you yesterday if you had worked more on the meep item interaction feature but it seems like spacecore has another feature for "guidebooks" that can also be triggered by item usage. Its possible that this would work for my purpose though it does look complex haha

fathom hound
#

"A kind of gate/toll where a player has to pay a certain amount of gold in order to pass. In order to build the toll, the player would have to pay a certain amount (high) and use certain materials to build it. And in order to destroy it, the player destroying it would have to pay a high amount as well (in order to disincentivize other players from destroying it)."

Can I do this without C#?

#

I can just make it a building right?

brave fable
#

i don't believe there's any precedent for buildings that require payment to be destroyed, nor for conditional collisions in that way

#

dare i ask what's to stop people from walking around it

next quarry
#

when making a custom character, is it enough to add to Characters/ and Portraits/{{ModId}}_{{NPCName}}_Winter for them to have a Winter outfit or am I missing something?

Edit: I found it, sorry (it's in the Appearance field in Data/Characters)

fathom hound
brave fable
#

that part sounds way harder than the actual tollgate part hahah

fathom hound
#

Yeah frSDVpufferwaaah

#

I was wondering if maybe when interacting with it, I could have it open a menu instead to destroy it?

#

Like the menu will ask to demolish or pay

#

Idk if I can do that with CP

golden spire
#

some kind of tollpass and a gsq that checks if you have the tollpass? But that would only be part of it

brave fable
#

new menus is about as doable in CP as adding a minesweeper minigame on clicking your building

frozen apex
#

is it possible to end an event on a different location/map than where it started?

#

to be in a totally different topic

fathom hound
#

Yeah idk how I could go about this then..

fathom hound
golden spire
#

can you explain more what your goal/plan is? Maybe someone can think of an alternative

fathom hound
#

Oops. [[Modding:Event_data]]

fathom hound
#

Weird that this modding title page is different than others? Lol

frozen apex
#

and even on the Event_data modding page, there seems to not be anything for defining the new location. "end warpOut" seemd to be the closes command. But I have a feeling that will warp me out to the same map...

brave fable
next quarry
#

does anyone know why my custom NPC appears in "even" and "odd" year festivals normally but when I play with Expanded they only appear in the "odd" years

this is how I have it set up:

brave fable
#

as it stands though we absolutely have mail_data, location_data, gift_taste_data
、...

golden spire
fathom hound
#

Like why wouldn't it be Modding: Item data or Modding: Events instead

brave fable
#

it was itemdata, previously. but then item handling was completely reworked

#

if anything, Items is the odd one out

fathom hound
golden spire
#

you're putting the patch in the y1 setup

next quarry
#

lol, funny that this works still for Vanilla 💀

golden spire
#

it's because it doesn't exist in vanilla so the game just uses y1, if 1 single NPC adds a y2 then it will read that instead...

#

you can technically continue to y3 but you'd break every other custom NPC

#

if you added beyond y2

#

so highly advised to not do so :p

next quarry
#

okay that is really good to know

#

Thank you!!!

spice inlet
#

@ivory plume Hello, is there a chance for a sort of singleton List<NetRef> mod hook?
Currently the only way to use stardews networking library is to add wrapper objects into existing purposebound NetCollections, like adding custom SObjects to a locations objects (and then removing them again before saving to prevent serializing errors). If you're not conveniently intending to use one of the existing NetCollections or need a static, shared field you're a bit out of luck.
The alternative being SMAPIs ModMessages, which are great for sharing specific messages, but fall short when needing to keep large, complex objects in sync and are subject to race conditions (eg. first mod message received may occur before or after the world is ready).
In my case I am regularly sending whole lists of complex objects between players, because only the host has all maps loaded and can therefore be solely trusted, when I could ideally just have one shared and synced NetObjectList.

lucid iron
#

Wait what stops you from just making that on your own netobject

spice inlet
#

afaik it needs to be part of a NetRoot tree to be synced

lucid mulch
#

I had a poc ages ago about having smapi manage a netroot per modid

#

but never quite finished it

lucid iron
#

Hm by maps u mean GameLocation?

lucid mulch
#

they do, and its true.
farmhands view of the world is only accurate for current location and active locations, a location they aren't in thats not active is in the shadow realm.

Its why mods like NPCMapLocations, LocationCompass etc all need to network npc location data (and badly) because farmhands dont know where the ncps are and so have host use the modmessages system to just broadcast the entire thing every x ticks

#

you can do some optimisations like have caching layers and deterministic algorithms to reduce what needs to go over the wire, but its a very manual process compared to letting the Netcode do it for you

lucid iron
#

Yeah I did know about the whole ghost coop location problem

#

I was thinking if your desired data is mostly in location data or map asset you can send less things

#

Just send name and fetch from content on other side sort of thing, but i don't know the whole usecase here

lucid mulch
#

Also the danger of just adding stuff to existing net collections, is you have made it so if host and farmhand have differing amounts of things, an extremely cryptic error will happen and crash and/or disconnect

versed wyvern
#

It isn't possible to make an item universally rejected, is it? I'd have to add RejectItem keys for every character I wanted to cover?

vernal crest
#

You can set CanBeGivenAsGift to false to make it ungiftable. If you specifically want it to be giftable but rejected, you have to add keys for everyone AFAIK.

versed wyvern
#

Yeah the plan was to use rejection dialogue to trigger actions without consuming the item but I guess that won't work so well O2Thonk

woeful lintel
#

I have a (moral?) dilemma right now: FF generates automatic config option for all Furniture made with it, but someone asked me if it was possible to disable this because they also have a CP mod under the same name (it's a mod using both frameworks), and it looks bad in the GMCM. Now the dilemma is that not having an option to disable the auto config options restricts freedom for Furniture Pack authors, but having it allow Furniture Pack authors to restrict freedom for users who would want to disable parts of a Pack.
User freedom is a big deal for me because of how most big apps/websites have no user freedom and I hate this so much.

vernal crest
#

Why can't they just rename the CP mod?

woeful lintel
#

In this case it makes sense to have both mods named the same

vernal crest
#

Yeah but you said the user doesn't like that. So just instruct them on how to edit either/both manifests to name the mods whatever they want.

#

Oh I have just realised you may mean "user" to mean user of FF who is making a mod rather than user of a mod.

woeful lintel
#

I have to admit that even naming them differently isn't really good for readability, since it just makes 2 sub-menus for the same mod in the GMCM. My "workaround" is to add "(CP)" and "(FF)" to the mod names, but it's still weird

vernal crest
#

(Some) mods that have a C# part and a CP part do that and it's not weird to me.

woeful lintel
#

I'm not a huge mod user (at most 12 or so), so I never encountered that

quaint moss
versed wyvern
#

WoahThink Ooh... there might be a way to combine this with regular reject dialogue to do what I want... at least, I feel like there might if my brain was braining right now

vernal crest
#

As for the dilemma, I am not sure if I'm following properly but I think I have found the source of my confusion. Do your auto configs allow users to disable furniture in FF packs?

versed wyvern
lucid iron
#

Leroy i thought you are work on moving it to custom assets

woeful lintel
woeful lintel
lucid iron
#

Moving from content pack for format into a specific target people just edit with content patcher

vernal crest
lucid iron
#

This is how custom bush, personal indoor farm etc work

vernal crest
#

Person farm lol

#

Really changing the meaning with that shortening there chu xD

woeful lintel
vernal crest
#

Maybe person farm is what you get if you go the joja route

versed wyvern
#

blobthink Hmm, hang on, another hiccup, if I make an action dependent on RejectItem dialogue, it'll be blocked by the daily gift and weekly two-gift limit, won't it? Is it possible to make an item exempt from that limit like Stardrop Tea is, with CP?

lucid iron
vernal crest
lucid iron
#

But if you really want to keep it content pack for style i think what you can do is have a section where people put arbitrary config options and you give a mod provided token to access that

woeful lintel
#

Well, it's not quite possible right now, making an empty Furniture Pack filled through CP will still make its config appear in GMCM

lucid iron
#

Kind of reinventing ConfigSchema at this point but you will be able to just have 1 config

#

As you would have eliminated need for CP mod to setup ConfigSchema

woeful lintel
#

I'm not doing that, the whole point of full CP compatibility is to not have to re-create the token and configSchema system

lucid iron
#

Then tear down more of your own config and ask people to simply use ConfigSchema?

woeful lintel
#

That's still part of the dilemma: it removes freedom from the final user

lucid iron
#

It's just up to what your goal is, there's no way to know that "this content patcher mod's config only deals with furniture framework therefore i can somehow yoink it into my submenu"

#

I personally lean towards prioritizing the content pack mod author's freedom, so even having "the user may turn this furniture off without input from content pack" is kinda eh to me

woeful lintel
#

I'm so annoyed by lack of customization that my mind is the other way around: it would piss me off if a framework has automatic customization options for users, but a mod author decided "no, you're not allowed to do what you want to your game"

lucid iron
#

Yeah that's a valid opinion too, but I guess you can also think about whether the configuration has to happen via GMCM

#

I feel your config situation is complex enough that rolling your own menu wouldn't be that different

woeful lintel
#

Huh, that's a very good idea, thanks! It's definitely going to go to the bottom of the TODO list but I'll keep it in mind

lucid iron
woeful lintel
#

(UI work also scares me a lot)

lucid iron
#

If u want to use the same ui stuff gmcm has u can submodule casey's repo and use spaceshared (that's MIT licensed iirc)

#

And there's stardewui but that would be actual new dependency

woeful lintel
#

Isn't there a Stardew UI mod/thing ready to use out there?

#

yeah that

lucid iron
woeful lintel
#

thanks!

rigid musk
#

Out of curiosity, if a player is dating an NPC is there a way to forceably make them stop dating them?

#

(through a mail flag/trigger action preferrably)

wild viper
#

uhhh I just tried to download npc riley from nexus but chrome blocked it as a virus

tiny zealot
#

that's unusual. it's almost certainly not a virus. i recommend telling chrome to go pound sand about it

wild viper
#

fr

next quarry
#

that can happen to one or two of my mods also

wild viper
#

I dont even know why I believed it, I've downloaded that same file multiple times

tiny zealot
#

✨ AI overview ✨ : "this file you've downloaded before, which was safe then and has not changed, is a virus now. you can definitely trust me"

lucid iron
#

AIchor please show me a hat

crude plank
#

no, u show a hat to AIchor

drowsy pewter
#

its really a testament to smapi's error reporting that I was able to write a really complex trigger action without access to the wiki, just by randomly typing stuff into the data and correcting it based on the error message output

brittle pasture
#

ah yes, error-driven development

rigid musk
vernal crest
#

You're asking at the wrong time of day, Lily. Ask again in a couple of hours when it's busier (speaking of which, I should leave so I am not tempted to stay awake too late when the chat starts picking up haha)

brittle pasture
rigid musk
#

I haven't slept yet and I definitely should TBHDEAD, its almost 11am for me

#

mm i was hoping i could do it with content patcher alone ... c'est la vie if not really

tiny zealot
rigid musk
#

I doubt people would be too happy if I force broke them up with the blue man

#

(even though i kinda wanna do it anyways)

#

(because its funny)

#

thank you for the answers though :3

orchid acorn
#

Might anyone remember the debug command to insert dialogue into the game? Like, you put in a line in the console and it makes the NPC say it 🤔

lucid iron
#

Spacecore has one but it's an event command

ivory plume
tiny zealot
#

debug loaddialogue NPC "Your/Asset:dialogueKey"

orchid acorn
#

Pathos you are a life saver tunafroghug completely forgot where this was located

#

Thank you too ichor UKiguhug

tiny zealot
#

you can also debug speech NPC "The literal text they should say.$h" if you want to test line flow or w/e without having to load it in

ivory plume
# spice inlet <@226803198218731520> Hello, is there a chance for a sort of singleton List<NetR...

Generally the net fields need a predefined value type. For example, it'd be a NetRef<T> where T is the actual type you'll be syncing (and that type needs to implement INetSerializable); the game doesn't really support syncing a bag of arbitrary value types currently. It could potentially be something we look into, but it wouldn't be as simple as just adding an extra net field for mods to use unfortunately (unless we forced mods to serialize/deserialize all synced values as string or something).

sour sleet
#

I've applied a map patch that will only appear when the player has received a certain mail, however it seems to be patching immediately when the game loads:( I have manually increased the friendship with CJB (in order to get the mail triggered) if that makes a difference?

lucid iron
#

Are u doing the send mail at day ending

sour sleet
#

yep

wild viper
#

how do I convert tbin files to tmx

lucid iron
#

And it's with HasFlag right, hmm

sour sleet
#

Yupp

lucid iron
#

I guess I'd try remove mailflag to make sure it isn't already there from testing

#

And have a day when u don't have enough hearts just to see

spice inlet
# ivory plume Generally the net fields need a predefined value type. For example, it'd be a `N...

It could be something along the lines of a NetObjectList<NetTemplateObject>, where NetTemplateObject is just an abstract INetSerializable that mod users inherit from to create wrapper objects that get added to said NetObjectList.
The benefit being that the NetObjectList<NetTemplateObject> field would be completely independent of other game logic and if put eg. in NetWorldState singleton.

#

Within said wrapper mod authors could implement any NetType of their choosing

sour sleet
golden spire
lucid iron
wild viper
golden spire
#

which map are you trying to edit/alter?

vernal crest
golden spire
#

ahh

vernal crest
lucid iron
vernal crest
#

Because without it you are not going to be receiving the mail, just getting the flag.

wild viper
golden spire
#

no..

tiny zealot
#

once again lamenting stardew's conflation of actual letters and world state on the altar of expedience /lh

calm nebula
sour sleet
calm nebula
#

Ish

#

It's weird

#

It's 1/2 weird xml stuff and 1/2 binary serialization

wild viper
#

go to art?

golden spire
#

you're missing the tbin plugin

#

to open them

wild viper
#

ah

lucid iron
wild viper
#

I see

vernal crest
calm nebula
#

But what it does weirdly is....well

wild viper
#

could someone link me to the tbin plugin

lucid iron
#

Btw atra do you recall what kind of sync issue multiplayer stats had?

vernal crest
# wild viper I see

You can just go to the settings and enable tbin to get the plugin. It's already installed, just not enabled.

calm nebula
#

Absolute ordering

calm nebula
lucid iron
#

I was thinking of adding a cp token to read it

calm nebula
#

They are just xml yeeted back to the main farmer every night

lucid iron
#

Ah so it's update rate need to be day update and that's it?

sour sleet
lucid iron
#

Assuming the desire is to not desync edits anyways

uncut viper
tiny zealot
vernal crest
#

You also can't use a when condition inside entries.

uncut viper
lucid iron
tiny zealot
lucid iron
#

Ig it's a frequency thing

uncut viper
vernal crest
lucid iron
#

So yeah i think between the multiplayer sync issue and this

#

It could just be "the token cache every stat on day update and no other time"

uncut viper
#

EMP already has a stat token too

lucid iron
#

No change until new day

uncut viper
#

it just always returns true in updatecontext, doesnt bother checking anything

lucid iron
#

This is PR to cp itself cus ik calcifer has it too

uncut viper
#

i dont think having one single token be a completely unexpected exception to how tokens work is much a good idea

lucid iron
#

So it exists but it always bothered me that there is mail flag but not stat DokkanStare

vernal crest
vernal crest
sour sleet
#

Ah I see it

lucid iron
#

The always update implementation is fine too, just throwing out options here

vernal crest
lucid iron
#

Something that i bumped into in the poc tokenized i18n is that update context doesn't have any finer grain control

#

For case where the token requires 1 argument always

uncut viper
#

i am not pathos ofc so im not sayin i know for sure, but i feel like a player stat token that just always updates is so obvious and easy an implementation, that i feel like if it was an acceptable compromise, it wouldve been added already

#

but it seems not ideal

lucid iron
#

So the whole "find out all args in a i18n" was moot

#

Unless it can obtain this type of fine grained update context

#

And be able to tell i18n:some-key needed change vs all i18n

ivory plume
hard fern
#

;th

#

oops

sour sleet
#

My mail isn't being sent despite me having 6 hearts with both NPCs 😦

hard fern
#

are the internal names correct at least

sour sleet
#

for PLAYER_HEARTS do i need to put my mod ID before the NPC name or is it just Polly?

rigid oriole
#

It uses the npc internal name

hard fern
#

so if your NPC's internal name is {{ModID}}_Polly or something, you need to use that every time

sour sleet
#

Ahh that will be the problem then!

vagrant talon
#

Does anyone know of a multiple spouse redux?

hard fern
#

uh, like polyamory mod?

vagrant talon
#

Yeah

tiny zealot
vagrant talon
#

Do you know which one's the current one?

#

Also, sorry about the wrong channel

wild viper
#

isnt it polyamorysweet

violet grotto
#

Is there a way to give a pet more than 4 walking frames?
I have this goober here, but I feel like the jump from the 1st to 2nd frame may be a bit too sudden.

#

Not too bad if there isn't a way. I think I need to test how it looks in-game anyway.

brittle pasture
#

I have no idea if this will work but you can try defining custom frames for the Walk behavior

violet grotto
#

Hmm, I'd have to look into that. Haven't done this before.

sonic mortar
north palm
brittle pasture
#

We don't recommend sending mail via event preconditions any more
Use trigger actions instead

#

[[Modding:Trigger actions]]

north palm
#

okiee thank you

ivory plume
#

The trigger action equivalent would be:

// add mail
{
    "Action": "EditData",
    "Target": "Data/Mail",
    "Entries": {
        "{{lr_cnt}}_IntroMail": "{{i18n:mail.intro.subject}}^^ @,{{i18n:mail.intro.body}}"
    }
},

// send mail
{
    "Action": "EditData",
    "Target": "Data/TriggerActions",
    "Entries": {
        "{{lr_cnt}}_IntroMail": {
            "Id": "{{lr_cnt}}_IntroMail",
            "Trigger": "DayStarted",
            "Action": "AddMail Current {{lr_cnt}}_IntroMail Now"
        }
    }
}
brittle pasture
#

To add, when the action runs it will add the mail to the mailbox for tomorrow. If you want it immediately add Now to the end of the action string

north palm
#

noted love_flowers

ivory plume
#

(Updated the example accordingly!)

north palm
#

thank youu .. it worked 0b_love

ivory plume
#

(I'm half-tempted to add XML support to Content Patcher. It would make events much cleaner, since you'd be able to use unescaped line breaks and quotes.)

blissful panther
lucid iron
#

Wait but that's what the yaml adaptor does

ivory plume
#

Aren't newlines and quotes meaningful in YAML too though? The nice thing about working with the original XML assets is that within the tags, everything is just content except <> characters.

tawny ore
#

I've been enjoying converting some of my config files from json/yaml to toml.

#

(unrelated to modding) but it's a nice format to work with

oblique copper
#

Ok, so I cobbled together a mod to break stones with a club/hammer. It breaks everything... Except for big brown boulders... Other boulders are fine, just not those. (At least in Sunberry Village mine)

orchid anvil
#

Not really sure if I should post this here, or in #1272025932932055121 however im basically trying to edit a shop ledger to have more items. As a default, I just use Sophias Ledger (cause sophia is wife <3). I've added all the items I want currently, but I'd like to add a condition to one of the items I'm "selling"; the deluxe rarecrow. I don't want it to just be purchasable, I only want to be able to buy it after I've received the mail from the rarecrow society, but I don't think im formatting the code properly.

blissful panther
#

(Here is good for that!)

brittle pasture
#

!json post what you have

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.

pine elbow
#

Good rule of thumb is: Are you editing code? Send it here!

oblique copper
orchid anvil
#

..then it felt unfair so i came here lol

#

very bottom, the deluxe scarecrow

brittle pasture
#

(post it to the site above!)

#

anyway just to confirm you're editing SVE in place?

orchid anvil
#

ideally I'd like to make my own shop that I can interact with, but thats way beyond what im capable of, so I just use sophias ledger

#

so

#

yes

brittle pasture
#

not particularly relevant to your question, but if you are thinking of releasing it or just want for your change to stay every SVE update you would make it a separate mod

#

but anyway

orchid anvil
#

yeah

brittle pasture
#

you would add something like "Condition": "PLAYER_HAS_MAIL Current RarecrowSociety", into the deluxe scarecrow block

orchid anvil
brittle pasture
#

that can also work, but if the field supports Game State Queries (ie. the Condition field) use that instead

#

[[Modding:Game_state_queries]]

brittle pasture
#

we should probably update that page to mention GSQs

#

if you do want to use When you'd have to break your rarecrow change into a separate entry in Changes

orchid anvil
#

I went to go test it and my power just went out. Thats great lmao

lucid iron
#

There's a event mod made using the yaml adaptor mod let me find it

ivory plume
#

Yeah, but that's what I don't really like about YAML. I like a format that's just "here's the structure, and stick whatever content you want inside it" without needing to change syntax depending on your content formatting.

clear oxide
#

this took to long -_- , had to put text above the sprite to make sure it was going in the right direction

ivory plume
#

You can kind of do that with JSON:

"Key": "Value"

"Key": "
   Whatever
     formatting
  you want here
"

But JSON editors hate it, and you still need to escape all the quotes in event commands (especially with the upcoming choose command).

blissful panther
#

(I propose we switch everything to BSON. /j)

#

I definitely wouldn't be against an XML option, though.

lucid iron
#

But hm i think part of problem is like, event is sort of a script isn't it

#

But must be loaded as a string value in dict

#

It's kind of like if we had to load map tmx to a string string dict because that's just how game is

tawny ore
lucid iron
#

What if there's a {{cat: relative/path/to/my/event/txt}}

tawny ore
#

Toml's nested attributes are handled by brackets above the keys:

[relative.path.to.my.event]
Key = ...
ivory plume
# lucid iron It's kind of like if we had to load map tmx to a string string dict because that...

The game's event syntax is really optimized for readability in the original XML.

For example, here's how the original event looks (with the changes in the upcoming 1.6.16):

<Key>SomeExample</Key>
<Value>
  pause 550/
  choose "" "It's sad, but there was no other option." noChoice "Monsters don't deserve our sympathy!" noSympathy "It's a harsh world, kid." condescending "Did you have to kill him?" blame/

  label noChoice/
  speak Abigail "Yeah... I did what I had to do.$s#$b#I guess the world's a pretty tough place. It was either you or him, right?$6"/
  goto resume/

  label noSympathy/
  ...
</Value>
...

But then you when you try to do the same thing in JSON, the code editor will yell at you:

"SomeExample": "
  pause 550/
  choose \"\" \"It's sad, but there was no other option.\" noChoice \"Monsters don't deserve our sympathy!\" noSympathy \"It's a harsh world, kid.\" condescending \"Did you have to kill him?\" blame/

  label noChoice/
  speak Abigail \"Yeah... I did what I had to do.$s#$b#I guess the world's a pretty tough place. It was either you or him, right?$6\"/
  goto resume/

  label noSympathy/
  ...
"

(And good luck if you need \\\"nested quotes\\\".)

tawny ore
#

I realize that toml is unlikely to ever become a thing in SDV modding, but it really seems to solve a lot of json and yaml criticisms, and it's arguably more human-readable

blissful panther
#

Out of curiosity, because I definitely wasn't around at the time, but what drove the decision to go JSON in the first place?

lucid iron
#

Just gotta make ToCP

north palm
#

hello is there an easy way to create events? worry_hide

ivory plume
north palm
#

I tried to read the doc but i couldn't understand half of it...

tawny ore
#

Json is kind of ubiquitous because it has the best tooling, or that could be the other way around

lucid iron
#

So what would xml integration with CP look like

#

Would u just have ability to include a xml instead of a json

#

As long as u format Changes in similar structure

ivory plume
#

Yep, you could just reference .xml files in addition to .json.

tawny ore
#

Would that be event specific, or just universally xml is supported?

lucid iron
ivory plume
#

Content Patcher would just support JSON and XML as interchangeable, for any usage.

#

(This is just an idea currently, I wouldn't have free time to work on something like for a while.)

blissful panther
tawny ore
#

I'm curious if there would be the slightest bit of efficiency gain by converting json patches to xml

#

Like is reading it any faster, slower, or the same

blissful panther
#

A very fast Google suggests JSON is typically faster for parsing, at least.

lucid iron
#

Say does mail trim \n

tawny ore
#

Also, would Content Patcher be setup to do the heavy lifting, or would it be something that SMAPI is updated to support

lucid iron
#

That's another place where cat/textblob could be useful LilyDerp

ivory plume
#

It would probably be a Content Patcher feature; JSON should still be the default for most cases, and I think there's a lot of benefit to having one recommended way to do something.

#

(Which would be my main argument against having an XML option in Content Patcher in the first place.)

lucid iron
#

Do you think event is remaining a big ol string forever

tawny ore
#

Is that your way of asking what's in scope for a hypothetical 1.7 update?

blissful panther
#

It would risk a split in terms of guides/tutorials, that's for sure.

lucid iron
tawny ore
#

Isn't 1 2 modpocalypses enough?

ivory plume
#

I'm working on some fairly big event changes in 1.6.16 (like multilingual events, a new goto/label concept, fork deprecation, dehardcoded skip logic, new event commands, EventValidator, pre-compile multiline formatting, etc). But the changes so far are all generally backwards-compatible; changing the actual event data format definitely sounds modpocalyptic.

blissful panther
#

Time for Data/Events2. /j

tawny ore
#

Just start to version all the internal formats Data/Events/1.6.16/

lucid iron
#

Overall tho i feel like event being big ol string is something fixable in the text editor

ivory plume
#

(Time to move events into one big Data/Cursors asset.)

lucid iron
#

Like just configure vscode to not be angry at multiline strings and such

tawny ore
#

I've had an idea spinning around in my brain of making a Content Patcher superset that just compiles into Content Patcher, but adds some sort of templating language

lucid iron
#

It is not like newtonsoft cares very much about valid json

blissful panther
#

(You mean Data/Cursors_16, right?

I mean we need to respect the versioning. SDVkrobusgiggle)

rigid oriole
ivory plume
#

(Technically "",, "" is just a shortcut for "", null, "".)

rigid oriole
#

Yes that is what I'm upset about /lh

ivory plume
#

(Fun fact: Content Patcher has special logic to handle that by ignoring null patches.)

tawny ore
#

JSON is great except for when the J part lets itself be known

#

C#ON, when?

lucid iron
#

Do we have to do like

#

[MossSoup] = new(){ blah }

tawny ore
#

I think the C# equivalent of JSON would have to be something that C# could basically eval into an object

#

I don't think it'd be too different from the syntax which supports dictionary/list initialization

ivory plume
#

C#ON:

public static class Content
{
    public static string Format = "3.0.0";

    public static class Changes_0
    {
        public static string Action = "Load";
        public static string Target = "Data/Cursors";
        public static string FromFile = "assets/cursors.cs";
    }
}
tawny ore
#

Very syntax, much human-readable

lucid iron
#

What does private imply in c#on

ivory plume
#

(Or less jokingly, I guess it would be something like this.)

new Content
{
    Format = "3.0.0",
    Changes = [
        new Change
        {
            Action = "Load",
            Target = "Data/Cursors",
            FromFile = "assets/cursors.cs"
        }
    ]
}
lucid iron
#

Is that how u write comments

tawny ore
#

That's not too bad tbh

rigid oriole
tawny ore
#

Where the type could be implied, you could probably even replace new Change with just new

ivory plume
#

(Inventing a whole new data format is probably not in scope for Content Patcher.)

tawny ore
#

It's like 99% the same as json anyway except it substitutes : for =

#

And removes the quotation marks around keys

rigid oriole
#

but consider referencing the properties of other C#ON objects

#

this will cause 0 issues and 0 circular references

tawny ore
#

If we're imagining something that is functionally equivalent to JSON that wouldn't be allowed

ivory plume
#

(You don't actually need the quotes around keys in relaxed JSON files either.)

tawny ore
#

Since JSON has no inherit references to other objects

rigid oriole
#

oh i thought we were inventing something totally new

tawny ore
#

I thought of it more like a what if instead of javascript object notation, there was a c# object notation

#

I kind of feel like since C# is strongly typed, it'd have to have the word string int and float in there somewhere too

sour sleet
#

How would I make a separate minecart network for my custom locations?

brittle pasture
#

new entry to Data/Minecarts

sour sleet
#

I know that, but I can't see an example of a custom network

#

My entry currently connects with the vanilla network y'see

brittle pasture
#

instead of TargetField and edit the default network you'd just add an entry for a new network

lucid iron
#

The default is Default

#

Need to add new entry

sour sleet
#

Ahh

lucid iron
#

ES and RSV both got examples

midnight sand
#

Hi, I'm making a companion to the Transistor Sword and want to add "Functions" based on the cave monsters. The functions when equipped as Active will change the secondary attack (The right click). The Upgrade version changes the Active a little and the Passive grants health while holding the sword.
I have a few, but if anyone have ideas of functions to add I'll be grateful

#

And ideas of the icon, since I can't draw to save my life

rigid musk
#

i dont remember who all it was who taught me how to use dynamic tokens (it was multiple people) but you guys are spectacular

#

I have just implemented ✨✨gendered dialogue ✨✨ using them

fathom hound
rigid musk
#

i think those are from the other mod maybe? unless i misread that

#

or maybe from one of them there free packs

midnight sand
#

I extracted the 2 icons from the transistor game, I'm using them as placeholders

lucid iron
#

Surround the sord with differently colored auras

calm nebula
#

Unless you specify

#

I'm going to assume thr transitory game is shenzhen

lucid iron
#

Overall I think if u just do 16x16 it'll look reasonable

calm nebula
#

Chue, what do you mean by "dehardcoding rng"

lucid iron
#

the ask is a joke, but i guess you let content packs seed things as they wish Dokkan

calm nebula
#

No, tbh

next plaza
calm nebula
#

Re:xml

#

I've wondered for a while if SMAPI/CP should support editing .tsx

iron ridge
#

.tsx as in tiled tilesheets or typescript jsx

calm nebula
#

The first

lucid iron
#

i think it'd be nice but i was under impression this is xtile problem

#

or at least, base game should refactor into sharing tsx as an asset before this is considered for content patcher

next plaza
brisk lily
#

i would love to make a portrait mod that goes with the seasonal outfits mod someday but it would be so much work haha

fluid marsh
#

Hello! I just released my first mod and would like to request the mod author role!! Would anyone here be able to help me with that?

lucid iron
#

you can dm @outer glacier directly, but first look at #roles for instructions

haughty charm
#

Hi!

#

Can you please link to the mod you published?

fluid marsh
#

Yes, one moment!

fluid marsh
haughty charm
#

Congrats on the publication! Can you please add yourself to the list of modders on the Modding: Community wiki page - you'll have to create a wiki account if you don't already have one.

calm nebula
#

Omg

haughty charm
#

Welcome cough cheeto dust to our newest Cheeto!

round timber
#

ough, there's not a tentative time frame for 1.6.16 is there? theres some changes in there that would be relevant to what im working on right now

fluid marsh
#

Thank you!!! SDVpufferthumbsup

round timber
haughty charm
#

LOL - bunny suit here I come!

hard fern
#

The dusting

karmic jetty
#

oop

ivory plume
round timber
#

oh theres no workaround needed, just some stuff with the event commands that i would want to update on my end! SDVpufferheart

wild viper
#

where do I post smapi log and json validator

lucid iron
#

hm what are some usecases for GameStateQuery.IsImmutablyTrue

#

today i realized the game doesn't actually call that by default so i should really be making a TryGSQ(ref string) thing

lucid iron
wild viper
#

oh

lucid iron
#

mod you are making at least

static otter
#

My content pack is failing to load because the tilesheet paths arent relative, but it hasnt been a problem before so why now?

wild viper
#

well I finally made it to where my update doesn't get any errors in smapi log however the house and character npc are not in the game.

lucid iron
#

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

lucid iron
#

tiled can mess these up just because you saved

static otter
#

How do I find all the places with <image source=

#

oh wait im silly

lucid iron
#

you have to open your tmx as a text file (it's actually xml)

static otter
#

open with a text editor

#

Aight lets see if this works

sour sleet
#

Wiki says ShippingBinLocation is only valid on the farm. Is there an alternative tile property that can be used for other locations?

#

Trying to add a place you can sell stuff

lucid iron
#

just build a shipping bin

#

its a building

sour sleet
#

But it's for a custom location

lucid iron
#

iirc spacecore had thing to spawn building

sour sleet
#

And i want it to be there all the time

lucid iron
#

besides that, you can also make a shop there

sour sleet
#

True true

lucid iron
#

give it some SalableItemTags

#

up to u which one u want

wild viper
#

so I can send content parser logs right

heady trout
#

Question: How do any of you guys usually make a custom NCP with content patcher?.

pine elbow
rigid oriole
#

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

uncut viper
#

well C# is an alternative

round timber
#

cursed

heady trout
#

Sorry, I rephrased that wrong. I meant, how do any of you guys make custom NCPs, like is there a certain formula you use, or not?

pine elbow
round timber
# ocean sail

this command is a good starting place @heady trout

uncut viper
#

i did my halloween modjam npc in C# SDVpuffersmile
to be fair they were very... bare bones

round timber
#

generally an NPC needs to have a few bare minimum things to function, ie dialogue, schedule, npc data (aka disposition), gift tastes... but everything else like events or seasonal outfits you can do as much or as little as you want

wild viper
round timber
#

is this all the code in the mod so far?

#

because as is i dont actually see anything thats loading in the NPC itself

heady trout
#

Does the code have heart events in it, too?

brittle pasture
#

they're using the old NPC Disposition

round timber
#

oh i see, you should probably move away from the disposition format and into the NPC Data format

wild viper
#

I literally just saw that from the !npc

heady trout
#

oh ok

#

i cant read good today lol i was making sure

#

woops

#

Sorry, I was supposed to send in that later lol

trim sand
#

question for those more familiar, do quests that complete by collecting a specific item, does it matter how? like for example the shears/milk pail tools should those work to complete the quest?

brittle pasture
#

they're checked upon entering the farmer inventory for the first time

#

shouldn't matter how

trim sand
#

ok. means my quest data is botched.

#

okay maybe it isn't actually botched. and its just not set how i expected with other context.

sour sleet
#

What's the best way of adding custom mineable nodes?

crude plank
sour sleet
#

Ty!

trim sand
worldly sundial
#

Does Utility.ForEachLocation not really work on multiplayer clients?

sour sleet
#

How many dependencies is too many for an expansion mod? I currently have 4

trim sand
#

i mean. one of my mods is just a patch on an existing content pack and its got 4 split between optional and required. honestly i don't think the number of dependancies is something you should be worried about.

#

make your cool thing.

sour sleet
#

I mean, I don't get bothered as a player downloading mods but as a mod maker, I am conscious not to have too many lol

vernal crest
#

There will be people who won't download your mod if you have even a single dependency and there will be people like me who would download 15 dependencies without blinking.

sour sleet
#

Right ok, I don't personally mind either but obv don't want to go overboard. I think I will try and keep it at 4 if I can SDVpuffersquee

brittle pasture
#

SVE had 9 once upon a time
granted it was back in 1.5, people are more tolerant of deps since CP hasn't eaten everything yet, and the game hasn't been updated for a couple years so things were relatively static

calm nebula
#

Use as many dependencies as you need to get your point across, and not one more

drowsy pewter
#

I will add as many dependencies as Selph makes frameworks

calm nebula
#

crops extended framework when, selph

#

hats extended

#

buildings extended

lucid mulch
brittle pasture
drowsy pewter
#

hmmmmmmmmmmmm

calm nebula
#

do it

drowsy pewter
#

I could work it into cornucopia somehow

#

I mean it makes the most sense in a mod about food

lucid iron
#

humans are animals

wild viper
tiny zealot
lucid mulch
#

with format 2.x+ your EditData on Data/NPCDispositions isn't doing anything and would need to be an EditData on Data/Characters instead

#

also I don't think

"HasMod": "!FlashShifter.StardewValleyExpanded"

would actually work

round timber
#

it should be "HasMod|contains=FlashShifter.StardewValleyExpanded": false instead i think?

sour sleet
#

Once I've made my node, is FTM the only way I can spawn it to test?

lucid iron
#

you can also spawn with spacecore iirc

rigid oriole
#

i'm so curious about this supposedly unused "angry roger" dude. All his constructors are unused

#

what was his purpose i wonder

round timber
#

boss enemy is my baseless guess, and obviously the game doesnt have any boss enemies now so

lucid mulch
#

looks similarish to something in journey of the prairie king

lucid iron
#

my headcanon is that you talk to the ghost pirate from the back and then boss theme plays > ANGRY ROGER <

rigid oriole
#

maybe it's birdie's husband or somethin

round timber
#

if you fail the quest you must feel his wrath

sour sleet
#

Umm, I can't see a way of spawning a custom node with FTM, only vanilla nodes

#

Are the nodes counted as Large Objects?

brittle pasture
#

nodes are just Data/Objects objects. You use IE to define what they drop and FTM for where they drop (though I think IE has some spawn settings as well)

sour sleet
#

Ahh ok, I was confused as I thought it would be under Ore lol

#

In FTM terms I mean ofc

worldly sundial
#

Currently Im doing OnSaveLoaded -> Utility.ForeachLocation -> search all objects
But if the non-host clients don't have that object list then I might need to have the host send over the info to the clients

royal stump
#

SDVpufferlurkIE clumps can be spawned by name with FTM's "large objects" section, but yeah, regular ore is done under "forage"
(and iirc, IE patches itself into that without a special category, so it's just object/item)

lucid mulch
#

why does a farmhand need it?

lucid iron
#

hm does foreachitem work correctly on farmhands NotteThink

lucid mulch
#

also no

lucid iron
#

terrible times

lucid mulch
#

operations like that, particularly on stuff like SaveLoaded scream host only actions

worldly sundial
#

Okay so I would need to have that happen only on the host and then message the info to the players then

lucid iron
#

sending the item list to client with smapi multiplayer message seems fine to me, i guess it depends on your usecase

calm nebula
#

Tbh I think it might Just Work in saveloaded

#

Depending on where that devent is on for farmhands

#

It might be just after the get their bolus of info from the host lol

sour sleet
lucid iron
#

cus maybe the actually answer is u dont need whole list?

lucid mulch
#

only active locations and current location are networked to farmhands

royal stump
sour sleet
#

Aha that makes sense. I initially put it under Large Objects and it isn't spawning. Will move it to Forage now!

royal stump
#

Yeah, looking at the spawning format again, I assume the ItemId field is the thing to use. And IE's "clumps" go in FTM's "large objects" section, while the 1x1 stuff is "forage".

#

(but if all else fails, export Data/Objects and find your node there)

lucid mulch
#

This is server code after the farmhand selects which farmhand they want to play as, and validation was successful

Game1.log.Verbose("Approved request for farmhand " + id);
approve();
Game1.updateCellarAssignments();
Game1.multiplayer.addPlayer(farmer);
Game1.multiplayer.broadcastPlayerIntroduction(farmer);
foreach (GameLocation location in Game1.locations)
{
    if (Game1.multiplayer.isAlwaysActiveLocation(location))
    {
        this.sendLocation(id, location);
    }
}
if (farmer.Value.disconnectDay.Value == Game1.MasterPlayer.stats.DaysPlayed)
{
    GameLocation disconnectLoc = Game1.getLocationFromName(farmer.Value.disconnectLocation.Value);
    if (disconnectLoc != null && !Game1.multiplayer.isAlwaysActiveLocation(disconnectLoc))
    {
        this.sendLocation(id, disconnectLoc, force_current: true);
    }
}
else if (!string.IsNullOrEmpty(farmer.Value.lastSleepLocation.Value))
{
    GameLocation last_sleep_location = Game1.getLocationFromName(farmer.Value.lastSleepLocation.Value);
    if (last_sleep_location != null && Game1.isLocationAccessible(last_sleep_location.Name) && !Game1.multiplayer.isAlwaysActiveLocation(last_sleep_location))
    {
        this.sendLocation(id, last_sleep_location, force_current: true);
    }
}

note how only activate locations get networked, and if their current location isn't in an active location, send that too.
theres separate code when warps happen to network the new location just in time using locationrequests

#

was a fun time debugging this kind of thing in SinZational Shared Spaces where I was accidently sending farmhands to the void because this code flow doesn't handle the new farmhand case where they don't have a lastSleepLocation yet (as it assumes the value on the farmhand will be in a farmhouse/cabin which is active, which my mod was changing)

trim sand
#

painpika
just had to manually recreate a whole file because i accidentally saved over it with output from the json validator i use instead of the intended file.

brisk wedge
#

weirdly specific question, but for the scrollable component in stardewui, is there a way to reset the scroll to the top? Context is that I have a long list and I think it lagged when I tried to display the entire list at once so I decided to chunk it and add buttons to go to the next page, but now if scroll to the bottom and go to the next page its still at the bottom and I'd like to set to the top

sour sleet
#

It's my first time using IE and SMAPI is stating it can't find the texture path for my node even though I've listed it exactly

#

"Texture": "Mods/{{ModId}}/Assets/Items/Nodes" This is what I have,and this is exactly where the texture is

#

Is there smth specific I need to be doing here?

brittle pasture
#

did you load into Mods/{{ModId}}/Assets/Items/Nodes?

#

post your JSON just in case

sour sleet
brittle pasture
#

is there an "Action": "Load" block that loads a texture into that name

sour sleet
#

OopsieSDVpufferclueless

#

I need to go to bed honestly lol

#

It's still skipping it:(

brittle pasture
#

I still don't see where you're loading Mods/{{ModId}}/Assets/Items/Nodes

#

you did load into Mods\\{{ModId}}\\Objects though, so use that instead

#

ah, it's the asset path

#

but yeah, when you Load a Texture, use the Target field's value in subsequent game data

sour sleet
#

So it's the Target part I have wrong?

brittle pasture
#

no, if you Load into Mods\\{{ModId}}\\Objects then you use Mods\\{{ModId}}\\Objects as the Texture field

sour sleet
#

Ohh I get it now, ty!

#

Seems to have loaded it now:)

lucid mulch
#

need to be the same thing (normalised)

#

using / vs \\ wouldn't matter

trim sand
#

hate to but in, but. i was wondering is it possible to have a tile that grass spreads on but can't be tilled? since in map making ive noticed you can place grass spawn nodes anywhere and they mostly work on untillable tiles

lucid mulch
lucid iron
pine elbow
#

Heheheh

trim sand
#

carp... wine?

pine elbow
#

CARP WINE!!!!

lucid iron
#

it works yay

pine elbow
#

Hooray!

trim sand
#

pff.

#

the real carp surprise

pine elbow
#

Can't wait for my shipment of decadent carp wine

trim sand
#

at least its not truffle juice i guess

brittle pasture
#

this will pair well with snail honey

pine elbow
#

Ah. Yes. The nectar of the gods

lucid iron
#

i should probably do something to stop people from exploding lookup anything

#

with ALL_ITEMS

lucid mulch
#

hmm I think I can actually do a poc on how to make Data/Events not be a modpocalypse and support string delimited format and a more modern format in parallel

lucid iron
#

oh i thought u can just do that with implicit

#
public sealed class ProcSoundData
{
    public string? CueName = null;
    public List<int>? Pitch = null;

    public static implicit operator ProcSoundData(string cueName)
    {
        return new() { CueName = cueName };
    }
}
#

basically this field used to be just a string (the cue name)

#

then i changed it so ppl can optionally add pitch

lucid mulch
#

does newtonsoft respect implicit operators?

lucid iron
#

didnt need to change any of me mods

#

and tbh i still use just the cue name if i dont need pitch

#

what i dont know is whether this would fly for vanilla 3sSmolMiku

#

which doesnt go through newtonsoft

#

but if they decide on this, i assume they will just convert it all

lucid mulch
#

tbh I'm less concerned for the xml side of the fence, ensuring vanilla is migrated is less complex than modpocalypse

lucid iron
#

but yea i feel this should work for events too

#

the modpocalypse aspect is more getting people onboard with this new thing

#

all those old event guides blobcatgooglyblep

lucid mulch
#

I wish it was an explicit operator, but I think newtonsoft wont use it

lucid iron
#

i didnt try explicit operator it might work

#

omni-carp

lucid mulch
#

Just seeing that screenshot made me feel the framerate drop

rigid musk
#

carp... wine...

lucid iron
#

yea i can feel it but it was still usable

#

like 40ish ?

lucid mulch
#

fun fact, the ShowUnownedGifts config in LookupAnything was added by me specifically because I had mods that did the 8k variants of wine or whatever (not as flavors but as distinct items) and it actively lagged ContentPatcher looking up NPCs

lucid iron
#

raffadax...

#

truly the ultimate test of performance on info mods

lucid mulch
#

wouldn't fully stop the lag spike from calculating the gift tastes, but at least saved the fps when showing lookup anything

#

also saved the quantity of scrolling to get to liked gifts

#

pretty sure it wass raffadax yeah

#

turns out rendering and 1608 unowned items is a lot faster than the alternative

rigid musk
#

it is, in fact, raffadax

#

(i know this because every time i use lookup anything when playing my game spends a good few seconds dying)

lucid mulch
#

I could tolerate the lag spike pressing F1, being 3fps trying to scroll to the liked gifts was a different story

lucid iron
#

hmmm i have been screwed by my past self

#

because i added clicking on the fish ponds i need more elaborate thing to add expand link

#

perhaps address this in another PR LilyDerp

ornate locust
#

welcome to the fish dimension

rigid musk
#

Fish Dimension...

calm nebula
#

Fish

lucid iron
#

man i want to make my own fish pond overhaul mod now...

#

item queries my beloved

calm nebula
#

Do it SDVpufferheart

lucid iron
#

im inflicting carp wine upon the culinary world

round timber
#

walks into channel
sees carp wine
slowly backs away

trim sand
#

not without taking your complementary bottle of carp wine, and jar of snail honey

lucid mulch
#

one step away from hardwood jelly

brittle pasture
#

how does this rank on the haute cuisine scale

rigid oriole
#

i personally think it should not be allowed

lucid iron
#

idk u got them beans and the spice with a dash of butter

#

isnt this just mexican food

rigid oriole
#

soybeans butter tho?

rancid musk
#

An explosion of flavor!
... is it a good flavor?
An explosion of flavor!

calm nebula
#

Shhh

rigid oriole
#

are multiflavored items part of EMC or a separate mod?

brittle pasture
#

EMC

#

don't think any mod use it currently just remembered that mead mod, hmm

rigid oriole
#

how many flavors can there be

brittle pasture
#

INT_MAX SDVpufferwoke

rigid oriole
#

smoothie mod 💪

rigid oriole
#

this is my first time in ur docs and this mod suspicioiusly seems to do a lot more than machines /lh

brittle pasture
#

if you saw something relating to junimos or slingshots, no you didn't

rigid oriole
#

selph i hate to say it but the slingshots triggered my comment

lucid iron
#

a slingshot is a machine that converts Item to Damage

rigid oriole
#

ur docs r quite good

brittle pasture
#

thanks! the same can't be said for extra animal config though

#

the neglected sibling

#

EMC: Literally how every single field works, with CP examples for each of them
EAC: Here's a table, figure out the rest yourself

calm nebula
#

Me: the code is the documentation

rigid oriole
#

quick someone repost the "don't write comments" video

calm nebula
#

God I hate brain dead comments

brittle pasture
#

also tbh chu and button's docs clear mine any time

rigid oriole
#

it's hard to beat a whole actual website

lucid iron
#

well its actually a doc generator

brittle pasture
#

look at that font, that tasteful background color. my god, it even has a side bar

rigid oriole
#

at the end of the day what matters is that I can (a) find the docs and (b) do the thing i want after reading the docs

lucid iron
#

i used it once and was like this sure is too many effort never again

#

i really gotta go back and add examples SDVpufferpensive

calm nebula
#

Got it

#

Using pydoc

lucid iron
#

hm so

#

a long time ago i did actually have a wip for adding internal ids to things

#

but it was on the title rather than a LA field

trim sand
#

the carp surprise is carp wine

lucid iron
#

no this is just common pond fish

trim sand
#

i mean its not wrong.

lucid iron
rigid oriole
#

can we not find this in the debug fields? /gen

lucid iron
#

we can its just scroll allll the way down

#

i think its important enough for debugging qol

rigid oriole
#

i like the bolded actual name and the slightly grayer category qualifier

lucid iron
#

average content modder would use this just to verify they spel right

rigid oriole
#

i like this

lucid iron
#

i would add equiv fields for the other subjects too, if applicable

#

idk if bold is needed if i already gray the qualifier

brittle pasture
#

I like grey/normal better

hard fern
#

Hm, it's not possible to have a gift give 0 friendship value, not without some C# magic, right?

lucid iron
#

rejectitem?

brittle pasture
hard fern
#

Hm but i still want them to take the item

lucid iron
#

u wont get exactly tho

#

but uh, if its an active quest item then they just take it too

hard fern
#

For context i wanted it to be like you're giving someone something, and they accept it, but say something like "oh, so and so might like this", so it ends up not actually being a gift for the npc you gave it to

lucid iron
#

i think neutral but with gift dialogue makes sense story wise

brittle pasture
#

tbh it's totally fair for that to give + friendship

hard fern
#

Hm so neutral would probably work i guess

brittle pasture
#

neutral gives like 20 right

lucid iron
#

i wanted to make this but...

hard fern
#

Yeah

#

20

lucid iron
#

sdvwingdings

hard fern
#

Adding on, i can just like. Add context tags to items however i want right

#

I dont want to make like 509 AcceptGift lines 😭

brittle pasture
#

Sure, that's a perfect use case

rigid oriole
lucid mulch
thorn radish
#

Guys how to write code other than using this, I can't write long code here

brittle pasture
#

Wait, are you making a mod?

thorn radish
#

Are there any other alternatives, if any?

brittle pasture
#

You said you want to write code so I assumed you're making mods

thorn radish
#

This means the code is [74]

#

That's what I mean, but there's a longer one than that, but I can't use it.

lucid mulch
#

don't speedruns already do this by copy+pasting long text into the field or something

brittle pasture
#

okay, then not here then, I'm sorry 😅
you can try #stardew-valley but I think that exploit does not work on Android

fossil osprey
#

Oh, you mean "code" like the thing speerunner use in their 1s speedrun

thorn radish
#

Hehehe

#

Sorry guys

fossil osprey
hot yoke
#

Hey guys, I was thinking of making a NPC mod for the game, with their own home and everything. I have never made a single mod for any game, let alone Stardew though, so I was wondering if anyone had any tips/videos to use to help learn some stuff?

half tangle
#

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

devout otter
#

!startmodding This too.

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.

half tangle
#

!mapmaking as well

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

pine elbow
hot yoke
pine elbow
ornate locust
#

mood

rigid musk
#

The consumption never ends :D

wild viper
#

[02:57:32 ERROR game] Warp to RileyHouse failed: location wasn't found or couldn't be loaded.

mighty ginkgo
rose path
#

does anyone know how to create a custom catalogue for a CP furniture pack?

woeful lintel
#

I'm glad to finally announce that the Furniture Framework 3.0 was finally released! It now has advanced CP compatibility to patch both content files and textures of a Furniture Pack, as well as a bunch of reworks, fixes, and new features! https://www.nexusmods.com/stardewvalley/mods/23458

Nexus Mods :: Stardew Valley

This is a Content Pack Framework to allow Content Pack makers to create highly customizable Furniture.

#

Ok, this image looks horrible, it was a bad choice...

pine elbow
#

Hip hip hooray!

whole raptor
#

How exactly does quickquestion work...?
quickQuestion <question>#<answer1>#<answer2>#<answer3>(break)<answer1 script>(break)<answer2 script>(break)<answer3 script>
I'm guessing the answer1 script is basically the result of choosing option 1, but is it just a string? Or a full script that happens before continuing with the event, needing /speak for dialogue for example?

#

Examples of whatever syntax is acceptable with it would be nice too 😅 Cause I'm guessing a lot is allowed...

lucid mulch
#

It's a singular command iirc

whole raptor
#

The annoying part (for parsing it in a converter) is I don't think it needs " for the strings? SDVpufferthinkblob

median forum
#

you can end the event with one answer and then continue it with another, etc

whole raptor
#

Oh, that's good to know, so something like \\speak <NPC> "<dialogue>"

median forum
#

as an example, this is part of an event i just wrote

quickQuestion {{i18n:skipdozerMP603C}}#{{i18n:skipdozerMP604C}}#{{i18n:skipdozerMP607C}}#{{i18n:skipdozerMP6029}}(break)emote Caroline 40\\speak Caroline \"{{i18n:skipdozerMP605C}}\"\\pause 1000\\speak Caroline \"{{i18n:skipdozerMP606C}}\"\\showFrame Caroline 19\\move farmer -6 0 0 true\\pause 500\\globalFade\\viewport -1000 -1000\\end(break)emote Caroline 28\\speak Caroline \"{{i18n:skipdozerMP608C}}\"\\pause 1000\\showFrame Caroline 19\\move farmer -6 0 0 true\\pause 500\\globalFade\\viewport -1000 -1000\\end(break)emote Caroline 28\\speak Caroline \"{{i18n:skipdozerMP610C}}\"\\pause 1000\\move farmer 0 2 0 Caroline 0 1 3\\move Caroline -6 0 3 true\\faceDirection farmer 3\\pause 500\\globalFade\\viewport -1000 -1000\\end

#

three answers to the npc resulting in three different replies from the npc

whole raptor
#

It'll be helpful, thanks

median forum
#

you're welcome! that's a really short example but you can do a lot. you can stop and start music, do animations; you just have to remember the backslashes

whole raptor
#

Okay, thankfully the i18nifier works fine with answer scripts, just gotta fix the initial question and answers

median forum
#

oh yeah that's really important, hahah

celest salmon
#

quick recipe modding question: I've seen recipes done various ways, like INGREDIENTS/NUMBERS?/MODID_NAME/here I see default or null a lot/i18n name. Sometimes the i18n isn't there. If it requires a friendship or other level I'll see that instead of default or null. What is CP actually looking at and reading in order for it to be a successful recipe string?

celest salmon
#

Right, but a lot of times I see extra information like the i18n at the end.

vernal crest
#

That extra information is the display name, which is listed on that page I just sent.

#

And the unlock conditions like friendship are also explained on that page.

calm nebula
#

In recipes, you can omit the display name

#

If you do that it defaults to the display name of the first product

lucid mulch
#

(also content patcher isn't looking at anything, its just writing to the data structure and letting vanilla deal with it)

whole raptor
#

Why did I make a converter based on regex when I hate regex... SDVpufferpain

celest salmon
#

Thank you, is there any penalty or benefit for adding the i18n display name? Is it a case if you have the file anyway you should have it or??

golden spire
#

lovehate relationship

lucid mulch
#

the benefit would be if you want the name to be different

tiny zealot
celest salmon
#

I know these may seem like stupid questions to you but sometimes you can look at a page over and over again but still not understand what's being presented because it isn't your home, it's something you're just learning still.

tiny zealot
#

sadly we are probably never getting an actual data model for events, so we are stuck in giant embedded string land for the sake of not blowing up every mod lol

calm nebula
#

Hmmm

#

Tbh my mental model for an event is very much ticker tape

#

How would you structure a data model?

tiny zealot
#

i mean i think just having string arrays for preconditions and commands would be an improvement

lucid mulch
#

at minimum I want the 3 starter things separate

#

nested data structure for quickAction style thing so backslash schenanigans aren't needed

whole raptor
calm nebula
#

The only thing I can really think of tbh is having a Lua like scripting language

#

Like fundamentally a string array and a string aren't that different tbh

lucid mulch
#

but yeah it being an actual array instead of slash separated already makes it so much more nice

lucid mulch
#

not needing to set fire to the json spec to make it readable

calm nebula
#

Meh, I feel like the extra "" , would be more annoying

tiny zealot
#

if i could only have one thing, i would accept not embedding the preconditions into the key

calm nebula
#

"Move npc y"

calm nebula
north palm
#

Hello.. i just want to ask regarding making events and debugging it... should I really restart my game just to check my code changes? or is there an easy way to do it

lucid mulch
#

patch reload

vernal crest
whole raptor
calm nebula
#

Where they're actually two or more versions with the same event id distinguished by different precondition

golden spire
#

and debug ebi eventid

north palm
#

okiee thank you so much

tiny zealot
#

debug runtestevent (debug rte) my beloved but it's finicky so probably just do patch reload like everyone else

vernal crest
lucid mulch
vernal crest
#

Debug rte always seems like so much work to me when patch reload and debug ebi are so easy

lucid mulch
#

the benefit of rte is it accepts it in the line separated form being outside of json

vernal crest
#

Wait did we have this conversation before and it turned out you can't just hit the up arrow to get previous commands in SMAPI, ichor?

#

Line separated form?

tiny zealot
#

debug rte is also much faster to iterate. not having to reinstall the files, it's only one command, less typing, etc.