#making-mods-general

1 messages · Page 294 of 1

lucid iron
#

I recommend looking at the decompile of the gamedata dll

next plaza
#

Alas, there are legitimate bugs sometimes

calm nebula
#

Tbh I feel like if the general consensus becomes "just hit through the allow button" it's not secure either

#

But also like

rigid oriole
#

SMAPI cannot fix issues between the keyboard and the chair

tender bloom
#

It’s at least helpful for people to occasionally read

#

Like if it’s really out there

rigid oriole
#

i support transparency tho

#

I have a mod that (through user consent only) accesses the internet and while it is obvious that it is going to upload something to a server, it'd make me feel even more responsible to have SMAPI explicitly tell people about it. but i also don't want people to be afraid of downloading my mod

proud wyvern
#

i don't think a security mode is a good idea at all, considering the nature of modding. fearmongering users will only lead to people constantly panicking about mods, because they use Harmony or (oh no!) a dumb extensions nuget library or something

next plaza
fierce vault
#

Since I want to start understanding modding better, (and stop bothering you all with very ignorant formatting errors, etc.) I'm thinking that I should go through every relevant pice of CP documentation, as I keep running into blind spots on the wiki. It is better to read a lot of the documentation before relying on the wiki, right?

Because I'm guessing not doing that earlier is the reason why I just can't figure out how to do certain things.

rigid oriole
#

i almost never look at the wiki for CP besides the data model format (but that's not CP-specific anyway)

#

only the github docs

uncut viper
#

the wiki and the documentation for CP serve very different purposes

lucid iron
#

The content patcher documentation (on github) describes how to use content patcher to load and edit things

#

The "things" is documented on the wiki

golden spire
#

personally I just look up stuff I need when I need it

uncut viper
#

they are used together

golden spire
#

I don't try to memorise EVERYTHNG

pine elbow
rigid oriole
lucid iron
#

You need at least Id Modification Amount i believe

fierce vault
#

Ok, so I should have both pages open when trying to fix an issue then, (like figuring out how to load in music for a custom location)

lucid iron
#

Condition is a game state query if you only want your rule to apply sometimes

next plaza
rigid oriole
#

I wish i could automatically bonk people for putting bug reports in the comments tab if i have a bugs tab

sour sleet
#

How do I make a certain sound effect play when a player walks on a tile? I'm guessing it's TileData, but I can't see anything on the wiki

lucid iron
#

You can move them

lucid iron
rigid oriole
sour sleet
#

something else

lucid iron
#

Need some kind of touch action then

#

Not sure if one exists

brave fable
#

you'd also need to suppress the original footstep sounds somehow

#

or want to, maybe not need to

sour sleet
#

I was looking at TouchAction but there don't seem to be any that would play a sound effect

uncut viper
#

you can use spacecore for it

pine elbow
proud wyvern
pine elbow
#
{
    //
    // Resumo:
    //     Add a number to the current value.
    Add,
    //
    // Resumo:
    //     Subtract a number from the current value.
    Subtract,
    //
    // Resumo:
    //     Multiply the current value by a number.
    Multiply,
    //
    // Resumo:
    //     Divide the current value by a number.
    Divide,
    //
    // Resumo:
    //     Overwrite the current value with a number.
    Set
} ````
brave fable
#

well it's obvious when you say it SDVdemetriums

tender bloom
#

I think that if tons of mods use harmony (I think this is true) and harmony is automatically flagged (sounds like Pathos’ plan), that probably is something that could use some additional thoughts on how to make it better in some way

#

For things like Internet access and networking and such I do think warning about that is a good idea, personally

#

Mods like “we will check the wiki for you” or “this button uploads a log” obviously need that!

#

But “I edit some conversation topics” certainly doesn’t

lucid iron
brittle pasture
#

I have exactly one C# mod that doesnt use harmony SDVpufferrad

tender bloom
#

Like there’s just so much that I feel isn’t possible without harmony — I’m not computer person enough to know whether we could analyze the harmony patches somehow to apply additional scrutiny, but if it’s only patching game code with code that doesn’t use weird libraries that seems fine to me from a security perspective

proud wyvern
#

i think as long as even 1% of popular mods get flagged for something, it will make people panic and keep asking about it in the server

brittle pasture
#

(not counting the ones that exist only because I cant do loops in CP)

proud wyvern
#

they already do for serializer warnings

tender bloom
#

I hesitate to make claims of any strength on what is and isn’t secure, but it sounds like the checks for various .NET packages would probably be a similar level of security?

lucid iron
#

I used to have 3 no harmony mods then I decided to fix a vanilla bug Dokkan

brave fable
#

I wonder if it'll lead to authors adding more content to existing core mods rather than post new mods that need verification/consent again. would users need to verify again if the mod updates or a hash doesn't match?

lucid iron
#

If I made some popular mod then decided to be evil and add a keylogger the user should probably know

tender bloom
#

I’ve read a lot of mod source code and I feel like most of them don’t use any extra stuff and don’t touch random files, so a targeted check probably could be developed. But maybe the devil is in the details here.

#

Like there was one Cat mod that did things with colors and fonts I didn’t understand that I think interfaced with the OS

ivory plume
#

(New permission requirements would lead to a new-permissions-needed UI similar to Android.)

tender bloom
#

I do think if harmony is one permission, then it would incentivize what blueberry said re harmony

#

Like I could just make one mod for all my harmony patches and let the other mods turn them on and off

proud wyvern
ivory plume
#

(Keep in mind this is just an idea at this stage, and it would be off by default for literal years before most players see it, so we'll have time to streamline it and help avoid questions.)

lucid iron
#

harmony is vital enough that we should see if we could do something via the smapi harmony fork first yea

tender bloom
#

I’m not really good enough at C# to understand the harmony problems—is the issue that you could target non Stardew code with harmony?

calm nebula
#

You can already do that

tender bloom
#

Or that the patches themselves could use packages that are security risk?

calm nebula
#

Pytk does

proud wyvern
#

(i even Harmony-patch Harmony itself in my Nickel mod loader for Cobalt Core)

tender bloom
#

Like most Harmony patches I’ve read are like, yet another objectdropinaction you know?

lucid iron
#

Harmony/reflection make it very hard for smapi to enforce any kinda check because i can just patch smapi

tender bloom
#

I mean maybe not anymore

#

Hmm that makes sense as a difficult loophole

#

I’ve had cases where I pretty much had to use reflection tho iirc

#

Weird little bits of the code that are private but I needed

lucid iron
#

But a lot of security stuff is like

brave fable
#

well given the checks are done before your mod is loaded then it wouldn't have a chance to patch smapi, would it?

lucid iron
#

Assume person has root access

tender bloom
#

I do think pathos has a good point about having time to think this though, just doing some thinking in here rn

lucid iron
#

How can we at least make the crimes harder

brave fable
calm nebula
#

Tbh if I wanted to do something nightmarish I probably could and I probably could justify myself

lucid iron
#

Boncher...

calm nebula
#

But also like

tender bloom
#

We could generate a full list of all functions in the game, right? And then check if the harmony patches target one of those?

ivory plume
#

(I wasn't expecting my quick offhand mention of an idea to lead to a whole discussion so I'm out at the moment, but I'll be reading through all the comments when I get back!)

calm nebula
#

Is it worth my time? Would it make a good mod? Neither is true

tender bloom
blissful panther
#

(Maybe it would be worth a thread at this point, even early on in the brainstorming process.)

proud wyvern
#

how many actually malicious mods did we ever have for Stardew?

brittle pasture
#

does "malicious but says so in the description" count

tender bloom
#

I don’t think we’ve had anything serious but that one super sketchy mobile MP mod comes to mind

#

Like are the mods that delete your saves malicious?

#

Presumably they say so in the description

brittle pasture
#

the example oft brought up is sundrop intentionally crashing if SVE was installed?

rigid oriole
#

if i download a "i will delete your save" mod and then the mod deletes my saves, i argue the mod is not malicious

tender bloom
#

The mobile MP mod I’m thinking of a) was distributed on google drive b) multiple separate reports claimed it added advertisements to the game c) a couple reports claimed it was a virus (not clear to me how true)

proud wyvern
tender bloom
#

It was also Android only

ivory plume
#

(All it takes is one malicious mod to permanently reduce player interest in installing mods.)

blissful panther
#

SMAPI mod security brainstorming

ivory plume
brittle pasture
#

SDV doesnt seem to have a "crypto mining mod" incident like some other games

#

the community is, more or less, chiller

rigid oriole
#

that's bc half the ppl running sdv probably don't have a computer that can mine crypto i won't lie

blissful panther
#

And it would be nice to keep it that way. With the community getting larger and larger...

brave fable
brittle pasture
#

(the skyrim mod dramas can fill entire history books)

tender bloom
next plaza
ivory plume
#

(We should probably move to the new thread.)

next plaza
#

And also you'd need to warn for unsafe code, since otherwise people will just use the old method of method overriding like I did before we knew about Harmony

proud wyvern
#

i'm just interested in the API itself that was removed, regardless of the security mode

ivory plume
#

The Monitor API is so-named because it originally did more than logging. One method it provided was an emergency exit feature, for cases where a mod knew the save was about to get corrupted or something. It was stripped out after a mod abused it.

crisp marlin
#

Anyone know where I can find a guide on adding new craftables? I'm going through this page and don't see one, maybe I'm blind:
https://stardewmodding.wiki.gg/wiki/Category:Tutorials

Stardew Modding Wiki

Interested in making a mod for Stardew Valley? Then you've come to the right place! Check out the list for step-by-step tutorials to make your very own SDV mod.
Have you made a mod before and want to share what you learned? Awesome! Just create a new page on this wiki, call it "Tutorial: How to do a thing," and put in your advice, screenshots ...

next plaza
proud wyvern
#

...couldn't you just do Environment.Exit(0); anyway

brittle pasture
next plaza
ivory plume
crisp marlin
brittle pasture
#

are they going to be placeable objects?

tender bloom
#

It’s basically the same as:

  1. add an object (there’s probably tutorials that cover that)
  2. Add a recipe
old edge
#

if I use OnTimeChange for a map patch does it cause lags

brittle pasture
crisp marlin
#

Goes on a tree, like a tapper

brittle pasture
#

items that big has to be a furniture item

#

and those don't go on trees

crisp marlin
#

Ok, in theory how would you make a tapper-like item

brittle pasture
#

for tree placeable craftables like the tapper you have 16x32 to work with

crisp marlin
#

Ahhh thanks for that!!

brittle pasture
#

those are covered by big craftables

tender bloom
brittle pasture
crisp marlin
#

Yep! I know about that framework

#

I just finished up drawing the asset and looking into the code now, although just resized it based on your advice (thanks for that)

fierce vault
#

Hi, I was looking though the wiki and CP docs, and put this together, wondering if this is how to load in location music. It is inside the editmap action along with other data that I have already tested. Does this look right? "Music": [ { "Track": "Upper_Ambient" } ],
Sorry if this is very wrong, I'm still struggling to figure out what to do.

lucid iron
#

Music is set on Data/Locations

fierce vault
#

Oh, so would this work if moved in that place?

lucid iron
fierce vault
#

Ok, I'll go and try that out. Thanks

lucid iron
#

My example sets the farm cave music to volcano ambiant by default

#

Then 20% chance to play that dungeon song

rough lintel
#

you cant flip sprites in the animation descriptions, can you

#

i know you cant but maybe you can and im insane

potent vigil
#

Hi, I'm not new to this whole mod thing. I wanted to add a new NPC and either have him live with the player on the farm or use the Sunberry Village mod to place him in one of the "empty" houses, but I have no idea where to start.

ornate locust
#

well for Sunberry, I believe all those empty houses are claimed

calm nebula
#

Are you in the Sunberry discord

ornate locust
#

or at least a lot of them are

calm nebula
#

My strong, strong recommend is to join it and discuss your plans there

potent vigil
#

thank you

lucid iron
golden spire
#

If it's an NPC you want other people to use you're better off with the suggestion above, if it's private use, put them in any house you want.

lucid iron
#

Also having npc live on the farm is possible but sucks a lot

#

Bella has a schedule that takes place in farmhouse, as such she's -2 compat with any custom farmhouse

potent vigil
#

I was going to put it in Athanaeri Corner but the TMXL Map Toolkit mod doesn't work.

lucid iron
#

tmxl is deprecated

ornate locust
#

There's also a mod that adds apartments to the second floor of the saloon

lucid iron
#

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

ornate locust
lucid iron
#

Before even thinking about where npc live i recommend taking look at making npc in general

golden spire
#

mine doesn't actually "live" anywhere

latent mauve
#

If you decide to use the Pelican Valley Loft NPC Apartments, there's also a linked Google Sheet to try to mitigate NPC overlap in the rooms.

#

There's 70 rooms though, and I don't think even a full floor (10 rooms) is claimed yet, so, still plenty of space available.

golden spire
#

the old Boarding House never became full, but again if it's just personal use then it doesn't really matter about overlap

fierce vault
#

The music now plays in my custom location! Thanks, chu

odd ginkgo
#

I feel like this should be obvious, but is there any way to have the viewport follow the farmer during an event?

latent mauve
#

Yeah, I don't think the apartments will ever get fully filled up with that many rooms, but I wanted plenty of space just in case so it could outlast some of the more limited spaces to handle overflow.

calm nebula
#

It's in the viewport command somewhere

golden spire
#

I do wonder if there should be a date added to the claim. Not that it will be a problem for a while, but I can imagine some claims become claimed but never actually released/used.

latent mauve
#

It looks like viewport <x> <y> [true [unfreeze]|clamp [true|unfreeze]] isn't fully explained on the wiki yet

uncut viper
#

i tried to look at the code for it recently and i was unable to parse it entirely, so, good luck. sounds like a job for atra

calm nebula
#

The clamp is the right one

#

Feel free to ask me again in a few hours when I get home

odd ginkgo
#

hmm okay, I'll try a pan and then freeze the viewport where I want it

uncut viper
#

are you sure? i thought clamp prevented it from going outside map bounds

calm nebula
#

Or tomorrow

vernal crest
#

I thought clamp was to stop the viewport going wonky around map edges too

calm nebula
#

Unfreeze may be the right one

#

Ping me in a few hours lol, or hope ichor shows up

odd ginkgo
#

thank you!!

fierce vault
#

I changed the music id after realizing I had picked the wrong song, but now the new one won't load in because it doesn't exist? It was the junimoKart_mushroomMusic

I even tried it's Display(?) name GlowShroomGrotto which popped up for the above id when I was using that music checker mod. I'm not really sure what to do

rough lintel
#

anybody here proficient with custom companions :o

lucid iron
#

what r u hoping to do

odd ginkgo
#

I've used the mushroom music once before, how did I plug it in...

rough lintel
#

my CC wont spawn, and im not sure why. thats all lol

urban patrol
rough lintel
#

like i can force spawn it in the console, but the map patches im doing are just not working

odd ginkgo
#

Is it for an event or a map?

rough lintel
#

just on a map

vernal crest
rough lintel
#

like, it loads my CC pack, its just the map patches that seem to be...????? not? applying.

fierce vault
vernal crest
#

Congrats on Lani release btw!

#

Whoops that was meant to be to you @rough lintel

rough lintel
#

HAHAHA thank u!!

fierce vault
#

So, I did have a new session, though I actually didn't close all the other smapi windows during it. I still got this error: [game] Can't get audio ID 'JunimoKart_mushroomMusic' because it doesn't exist.

urban patrol
#

lowercase j

fierce vault
#

Lowercase?

#

Was that to me?

brittle pasture
#

sorry4ping, was there an answer to this? I saw this message right when I eeped, and I'm very very interested in the answer (evil code warning)

urban patrol
#

the id on the wiki is junimoKart_mushroomMusic

lucid iron
#

no selph no one answered and it did not work

fierce vault
#

Oh, maybe that is the issue! I'll try that out

lucid iron
#

but i realised that custom bush patched isteabush and used that

odd ginkgo
#

Yep gotta start with a lowercase!

lucid iron
#

@gaunt orbit wren can u explain how to do the dynamic load from content pipeline

fierce vault
#

Yes! It worked! Finally have another important thing done!

lucid iron
#

my naive attempt was this which didnt fly kyuuchan_run
Game1.content.Load<Dictionary<string, dynamic>>

gaunt orbit
#

What error did you get?

lucid iron
#

can't cast to type

#

i don't have the exception on hand but i can reproduce it real quick

gaunt orbit
#

Ah, okay

lucid iron
#

the specific thing i attempted to do is load custom bush's custom asset

gaunt orbit
#

Do you need to edit it?

lucid iron
#

i did not care about the model, only wanted keys

#

for selph's usecase the model is needed

#

mtf wants to insert entry into perfection exclusions

#
[Custom Bush] Mod crashed when loading asset 'furyx639.CustomBush/Data'. SMAPI will use the default asset instead. Error details:
InvalidCastException: Unable to cast object of type 'System.Collections.Generic.Dictionary`2[System.String,LeFauxMods.CustomBush.Models.CustomBushData]' to type 'System.Collections.Generic.Dictionary`2[System.String,System.Object]'.
   at StardewModdingAPI.Framework.ContentManagers.GameContentManager.ApplyLoader[T](IAssetInfo info, List`1 loadOperations) in SMAPI\Framework\ContentManagers\GameContentManager.cs:line 163
#

since its this error i wonder if i just did load too early

#

hm no it does the same thing even if i spawn and plant a custom bush first

gaunt orbit
#

If you only want keys, you can load it as dynamic instead of a dictionary, and then use the keys property

If you need pairs, then IEnumerable<dynamic>

calm nebula
#

(I didn't know you could do that.)

#

Nonsense with mgm was always my plan haha

gaunt orbit
#

If you want to insert, then you'll have to use the asset events and use the type metadata from the event args to create a typed version of a generic method as a delegate.

lucid iron
#

new attempt and new error

dynamic customBush = Game1.content.Load<dynamic>("furyx639.CustomBush/Data");

Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: 'object' does not contain a definition for 'Keys'
at CallSite.Target(Closure , CallSite , Object )
at System.Dynamic.UpdateDelegates.UpdateAndExecute1[T0,TRet](CallSite site, T0 arg0)

#

this doesnt matter too much to me cus i found better way than loading data, but it is something that always troubled me blobcatgooglyblep

sour sleet
#

Right ok, I'm trying to use the beach tilesheet and the waves are frustrating me. Most of my waves are fine and the collision is there but there are some spaces that you can just walk through. Is some of this hardcoded? I've tried looking at the vanilla beach map and I'm using the same layering SDVpufferclueless

lucid iron
#

ideally i would like other C# mods to have power to read my custom asset without too much hassle, but perhaps opening API is the way

calm nebula
brittle pasture
#

yeah I think I tried all these methods in the past, but I couldn't get away from reflecting into a reflected field inside a reflected type
if dynamic works then I probably still need to do some reflection, but less

sour sleet
rough lintel
#

is goldenrevolver still around 👁️ tappers dream is breaking

#

and i Need That Mod

gaunt orbit
brittle pasture
#

(side note, I was personally responsible for the breakage, so, uh, sorry?)

gaunt orbit
lucid iron
#

Terror

calm nebula
#

That....shouldn't work tbh

#

This is usually when I resort to emitting delegates but I think Pathos may want to take that away

lucid iron
#

@half tangle #dynamic-content-load interest Dokkan

gaunt orbit
#

Dynamic delegates is definitely the better way

lucid iron
#

I'm gonna stop fiddling for now since i don't need it

gaunt orbit
#

I will be very sad if they get taken away

calm nebula
#

Oh well.

half tangle
#

I ended up not using dynamic for my data collection

calm nebula
#

I can kinda get why but also like, I do think it will mean people will hesitate about releasing certain mods

#

Even if it is fine, do I really want to deal with users for a tiny performance improvement only I care about?

half tangle
#

I just recreated the model and then loaded it with Helper

#

worked great (still working on that, though)

brittle pasture
#

huh...

lucid iron
#

im surprised that didnt explode everything

brittle pasture
#

like with the model being a class?

#

with the exact same fields?

lucid iron
#

are u sure u can still use CS to go to places after that?

calm nebula
#

I'm surprised that works tbh

gaunt orbit
#

As long as nothing in the pipeline explodes, you're safe

lucid iron
#

hmmm

calm nebula
#

Yeah, but the original load is a concrete type

gaunt orbit
#

(and cp does things in a dynamic way that doesn't care about backing your)

lucid iron
#

this would be good news for the chuTAScore thing

calm nebula
#

In Event Tester I make a new temporary content manager

calm nebula
gaunt orbit
#

That is somewhat puzzling

lucid iron
#

i wanted to be able to share this extended temp anim sprite definition between my mods

#

without actually making a chucore cus i hate that

gaunt orbit
#

It should be a concrete type if it's load-backed by c#

lucid iron
#

before i was just gonna build that into both mods as shared project and make ppl use separate assets

half tangle
#

If you're asking me, what I did:
var CentralStationDataAsset = StaticHelper.GameContent.Load<Dictionary<string, CentralStationStopModel>>($"Mods/Pathoschild.CentralStation/Stops");

where CentralStationStopModel is my version of Pathos's StopModel

(I'm only slightly around here rn so I'm not exactly following this conversation, though... busy elsewhere)

lucid iron
#

but if i could somehow load over same asset with both mods that'd be nice yggy

calm nebula
#

I have no idea how that works.

gaunt orbit
#

Well, central station is pathos' mod

half tangle
#

Pathos told me to do that... so I did

gaunt orbit
#

It's probably using the same shared code as cp to be type agnostic

calm nebula
#

It...hmm

half tangle
#

yeah, might matter that it's Pathos's mod specifically? idk

calm nebula
#

Hang on

#

!log

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.

calm nebula
#

Crap mobile github shcks

gaunt orbit
#

I mean anyone can do it, it's not super complicated, it's just that most people don't bother because it's a bit of a niche usecase

half tangle
#

I gotta go do some stuff for a couple hours, if you need me ping me and I'll be back later

rigid oriole
# lucid iron without actually making a chucore cus i hate that

Only tangentially related but sometimes wonder if the dp algorithm restructure on nexus actually promotes keeping a single "core" mod for an author rather than splitting it up because I remember nexus saying people splitting one mod into 20 parts was a dp-farming problem

lucid iron
#

yea but they also said --dp for dependencies

rigid oriole
#

Dependencies on my own stuff or anyone's

lucid iron
#

dunno how exactly thats expressed in the algo

#

but it was said that pathos casey etc got dms about how their dp will go down (and they did)

rigid oriole
#

I don't make enough dp for it to actually matter to me, but it was a musing I had

lucid iron
#

i hate it for personal code style reasons

rigid oriole
#

I like splitting stuff up within reason (don't want to install more than a couple deps for a mod if I can help it)

calm nebula
#

I see I see

lucid iron
#

if it comes down to it and i can justify i'd like

calm nebula
#

This is why it works with central station

lucid iron
#

make a TASEverywhere kind of framework mod with api for myself

calm nebula
#

Because the load is here in a CP mod

lucid iron
#

wait hold on

#

why this work...

rigid oriole
#

You'd think because so many other ppl use mods like spacecore, it shouldn't bonk down the payout for them because it's clearly a useful framework not a dp farm

lucid iron
#

this was me trying to load some non empty data tho, maybe that makes diff

lucid iron
rigid oriole
#

Oh the bonus rewards or whatnot?

lucid iron
#

yea

#

its prob more like, whatever math they did to cutdown my-dp-farming-mod-of-configs also impacted spacecore

brittle pasture
rigid oriole
lucid iron
#

yea its a real problem with collections

rigid oriole
#

Huhhhh

calm nebula
lucid iron
#

what does mgm stand for

calm nebula
#

MGM/delegate emit

rigid oriole
#

Dang u cant split out shared functionality for good software practice but u can do that

calm nebula
#

Make generic method

brittle pasture
#

yes
the author of, as of this time, the 3 most popular SDV collections, has a DP-enabled "mod" that are just config.json files for their collections

rigid oriole
#

:/

#

Do collections themselves earn dp

brittle pasture
#

airyn or someone raised the issue some time ago to Nexus, but it was allowed so

lucid iron
#

i thought the intended way is to bundle artifacts with collection

#

not this kind of config mod

calm nebula
#

This is what Event Tester does to check for gsq but it's fully uncached here because no one cares about performance in a console command

#

(Also, see flagrant use of the System.Reflection API)

uncut viper
# lucid iron Terror

(its actually not that bad, its what i did for Searchable Collections Page WRT Secret Note Framework too)

brittle pasture
#

the MGM thing I mean

calm nebula
#

Basically yeah!

calm nebula
#

Except I tend to want to cache reflection into delegates when I can

iron ridge
half tangle
uncut viper
#

im not saying im pro-dp farming config mods/collections, but i wouldnt say that counts under plagiarism, so it makes sense to me that nexus would allow it

rigid oriole
#

Yeah a config file isn't plagiarism

urban patrol
#

how do i create a mail flag without the actual letter appearing in the player's inventory?

brittle pasture
#

add to received directly

urban patrol
#

the player wouldn't be able to go into the menu to view it in their past mail if i bypass the mailbox?

brittle pasture
#

it wont show up if it doesnt have a data/mail entry

urban patrol
#

oh, i do have it in data/mail. in that case how do i add a mail flag without it being in data/mail?

uncut viper
#

just send the mail without it being in data/mail

latent mauve
#

Just to clarify: it's called a mail flag, but not all mail flags have associated Mail/letters

brittle pasture
#

delete the data/mail entry basically
the asset's only for user viewable mail, a mail flag doesn't need a data/mail entry to be sent

urban patrol
#

interesting, okay. that seems counterintuitive to me (how does it know what to set if i don't define it?) but i trust you guys lol

latent mauve
#

The trigger action should create the mail flag itself if it doesn't exist when it's called, IIRC? Data/Mail can be completely ignored if you don't want to send a letter.

#

I might be wrong, but I've never made a letter for my mail flags

brittle pasture
#

"received mails" or "mail in inbox" are just a set of strings

#

"send mail" is "add this string to the list"

lucid mulch
#

diagramming logic flows is annoying, Every time I do a sequence diagram I feel a flow chart will be better, and now im doing it as a flow chart a sequence diagram might have been better 😦

urban patrol
#

are there pros/cons to a trigger action to send a letter vs sending mail via event command?

lucid iron
#

well, why are you doing it by event command?

#

if you have a real event then sure do it

urban patrol
#

yeah it's a real event

lucid mulch
#

if that event command is the X precondition, then don't and use a trigger action.
if its a real event then sure

urban patrol
#

makes sense, thanks

lucid iron
#

before 1.6, people used to do dummy events as bootleg trigger actions

#

it'd cause random pauses

urban patrol
#

yikes

lucid iron
#

but u have real event so it's fine

#

watch out for ppl doing the skip button tho, iirc theres a thing for that

lucid mulch
#

(vanilla was included in 'people' there, though vanillas was mainly the X precondition that didn't actually run an event, but did send mail anyway)

urban patrol
#

yeah i haven't set these ones to skippable. watch my events, boy

#

the heart events are but these are "plot" so

tiny zealot
#

there's currently setSkipActions to handle skipping, and in the next update there's some goto feature to handle it

#

(generally, you should let players skip your events if possible, and it's almost always possible)

lucid mulch
#

note theres mods to make them skippable anyway, anything very important to happen should be in ^

urban patrol
#

oh okay

#

yeah this is the chain of events to unlock an NPC so that's why i didn't want them to be skippable in case they locked themselves out of ever having her

#

but i can put things in set skip actions

#

follow up question: if i want to add a mail flag but it's not real mail, i can't use the event command and have to use a trigger action, right?

calm nebula
#

You can use the event command fine

lucid mulch
#

event command still can happen

#

the only difference between a mail flag and mail is whether there is a Letter defined for it

urban patrol
#

oh okay so the event command can still raise a flag without a letter

tiny zealot
#

sending mail/setting mail flags works the same no matter how you do it (except some ways may predefine which bucket the mail goes into)

urban patrol
#

yeah i see that there's mail for tomorrow, mail for received, and mail for now

tiny zealot
#

yes. each one is just a set (no duplicates) of strings (IDs)

urban patrol
#

man i'm so sorry for spamming you guys with mail questions lol but if this is a broadcast event, who gets the mail? everyone?

#

this is for the event command mail

lucid mulch
#

broadcast event makes all* online players play the event locally, so they should set their own mail iirc

devout oracle
#

has one worked on mod for auto harvesting in the greenhouse? I'm using Greenhouse Gatherers, but it's got issue with fruit trees.

gaunt orbit
#

Better Junimos has an option for that I think

proven spindle
#

I use automate's paths option for fruit trees, works pretty well if you've got it installed

devout oracle
#

i use automate, didn't know it could work for fruit trees

lucid mulch
#

First draft of my asset pipeline diagram, only done the load half of the chain, will do the invalidate flow later.

I probably need a simplified form of the diagram that just shows the various event / mod code execution temporally, and add extra ContentPatcher specific details, as this is the pure SMAPI view of the land.

lavish cedar
#

hi hi! i'm trying to make a mod to change NPC names with content patcher. SMAPI isn't throwing errors, and it seems like it should be working, but there's just no change. is there anyway to see the resulting patched data files after content patcher does stuff, so i can verify i actually changed the values i meant to?

lucid mulch
calm nebula
#

I'm seeing a tiny image on my phone SDVpufferheart

#

No promises in taking a look in reasonable time but I'll try

#

Feel free to yell at me if ihavenr by Saturday

lucid mulch
#

hopefully by then the invalidate half is added, which is where some of the spicier logic is anyway

urban patrol
lavish cedar
#

thank you!

urban patrol
#

and if you want to see specific files, patch export filename

lucid mulch
#

patch export <asset name> will dump the asset to disk that the game got after content patcher (and others) did its thing

urban patrol
#

what is the correct syntax for a GSQ where 1 AND 2 AND 3 are true?

#

in this case i want to check that 3 mail flags have all been raised

acoustic summit
#

"(GSQ 1), (GSQ 2)" I believe

urban patrol
#

thanks!

fierce vault
#

Hi, I’m wondering about how getting fourteen hearts with an npc is possible without marrying them or having them live with you.

I remember seeing a new npc that came out which apparently had that as the case. I’m pretty interested in how this might work, and whether it is achievable through a framework or just CP.

calm nebula
#

Not through either at the moment

#

Trivial in c# though

fierce vault
#

Interesting. I guess that mod had some c# coding then

#

When you say trivial, how much c# experience would potentially be relevant?

calm nebula
#

Single harmony patch

fierce vault
#

Something a non coder could potentially figure out with the existing documentation?

calm nebula
#

Depends on how much they want to fuck around and find out

fierce vault
#

Probably something I shouldn’t waste my time wondering about then. I probably couldn’t organically figure it out

lucid iron
#

i think it's not so bad to do it for 1 npc but ig u gotta ask yourself the gameplay questions

#

do u want ppl to do more gifts?

fierce vault
#

The reason why I find it interesting is because I had some unique alternative game play ideas for a non romanceable character

lucid iron
#

i think u just postfix this then Utility.GetMaximumHeartsForCharacter

calm nebula
#

(For extra fun make it a framework)

#

(Chue)

lucid iron
#

smd

#

no i dont make npc frameworks kyuuchan_run

calm nebula
#

Damn

fierce vault
#

Postfix?

calm nebula
#

That one is gonna get me trouble haha

lucid iron
#

!harmony

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:

calm nebula
#

All y'all have to say is "smd" at me

#

||this might even be in scope||

#

I was also thinking of doing flavor specific buffs

#

Shhhhh

lucid iron
#

parcy you should understand that when atra says it's easy, atra really means something lile "it's easy if you already know how to make a C# mod and can at least get the button press mod from the wiki up and running"

#

for people with programming background, this is a low req, but we all start at different places

fierce vault
#

Anyway, I guess my ideas keep getting ahead of me

tiny zealot
#

in this context, atra is working ("working") on a mod called Slightly More Dehardcoding

fierce vault
#

Ok

lucid iron
#

it also means surface mounted device

fierce vault
#

Yeah, I was trying to find the context that might make sense

#

I did start that yellow c# coding book

#

I have not currently gotten very far though

#

Is Slightly More Dehardcoding something Atra is interested in finishing anytime soon?

lucid mulch
#

finish is a strong word

fierce vault
#

Making…

#

Functional then?

lucid iron
#

well more than 1 person is waiting for it Dokkan

lucid mulch
#

who knows, if I add the memory dehardcoding to it it might need to be renamed to substantially more dehardcoding prior to release

calm nebula
#

What memory dehardcoding

lucid mulch
#

leo memory

calm nebula
#

Oh that dehardcoding

#

Sorry

#

You got me after work brain, if you say memory I literally think "RAM"

lucid iron
#

its ok me too

#

particularly bc it's sinz saying it

lucid mulch
#

I mainly optimise for speed, not memory utilization anyway

#

I have 128gb ram and I want stardew to use as much of it as possible if things run faster

calm nebula
#

"How do I dehardcode memory allocate" <- my dumb ass

lucid mulch
#

exposing pointers to content packs would be fun

calm nebula
#

Lol

lucid iron
#

new triggeraction memset SDVpufferthumbsup

calm nebula
#

Might turn out badly

lucid mulch
#

cheat engine being reimplemented as a content pack would be an odd turn of events

fierce vault
#

I guess I’d better ask, so I can get my dreams crushed early, is it possible for me to make a special ‘roommate' item that doesn’t force the npc to live in your house, with something like spacecore?

While also specifying 'housemate' with a different name. I think I have seen different mods do these things or least something similar, but I’m wondering if I could apply all that to do exactly what I want here.

calm nebula
#

Possibly!

fierce vault
#

I hope so! I’d love to implement a unique freindship mechanic with a special reward to go with it

lucid iron
#

i don't recall any mods that do this off hand

fierce vault
#

For one npc, of course

lucid mulch
#

so no spouse patio or spouse room, and they keep their original schedules?

fierce vault
#

No farmhouse at all!

lucid iron
#

when an npc become spouse/roommate their original schedules get bonked for spouse duties

#

it sounds like what you actually care about is the title on the social page

calm nebula
#

Spacecore has a way to have spouses do normal schedule iirc

lucid iron
#

so what i'd do is have their internal status be "dating"

fierce vault
lucid iron
#

they should reject mermaid

#

and you do edit on the actual string

fierce vault
#

If the internal status is dating, a spouse npc could get jealous

lucid iron
#

jealous of you two being good friends SDVpufferthumbsup

fierce vault
#

That wouldn’t make sense for what I’m thinking

#

The spouse shouldn’t even know that we know this npc, so…

calm nebula
lucid iron
#

tbh i think jealous is less important than like

#

if player dates multiple they'd all be (SPECIAL FRIENDSHIP) on the npc screen

fierce vault
#

Uh oh, would that apply for everyone?

lucid iron
#

i would absolutely just patch SocialPage.drawNPCSlot to draw the unique status Dokkan

#

but that is once again a C# solution

calm nebula
#

Patching the get max hearts ks easy enough tbh

fierce vault
#

I think when looking inside different mods I found one that had a special title for a spouse or dating

lucid iron
#

it is perhaps better for you to focus on just expressing the relationship between farmer and npc in the narrative first

calm nebula
#

Remind me in 6 days to ...

patent lanceBOT
#

Oh okay, atravita (#6645286) (6d | <t:1745812546>)

calm nebula
#

SinZ I see your

lucid iron
#

then you can do the flavor

lucid mulch
#

tbh I would bootstrap off dating and then harmony patch the parts of dating (like jelousy) that you want turned off

calm nebula
#

Yeah, I personally dislike the stuff that like

lucid iron
#

at that point you'd feel more motivated to make this happen, or maybe atra would have done it 3sSmolMiku

calm nebula
#

Older mods that have like, one item per flavor

#

Like this is just my opinion but I hate that

#

I don't want to make 45435 individual cider and 358392 individual soda for perfection

fierce vault
calm nebula
#

I want one of each

#

But also I think it's cool when they have unique buffs

lucid iron
#

its your C# code, you do the check to target only your npc (or only npc with customfield=whatever)

hard fern
#

The way ive started doing perfection things is even with 20 varieties of the same item it's tied to a config so you don't have to ship all 20, only 1

calm nebula
#

writes down "jealousy immunity"

fierce vault
#

So, let’s assume I am not the kind of person who is predisposed to easily understand the concepts of coding when starting. How much of the yellow coding book and any other material would I need to get through, before I would be able to implement these basic c# concepts to stardew valley?

lucid iron
#

i don't know, everyone learns at different paces

fierce vault
#

Yeah… that’s true

lucid iron
#

that is why u should do what you can first

#

this feature is not a blocker for the overall mod you wanna make, lots of npc busywork to get through first

tiny zealot
fierce vault
#

I can still make the npc I want to create. I’ll just have to hold off on the extra bells and whistles for now I suppose.

lucid mulch
#

In related news, I'm upset by this 'line' of code (reformatted by me)

fierce vault
#

Ooo, what are you trying to achieve here?

rigid oriole
#

decompiler funkiness?

lucid iron
#

i wonder if it just is a horrible tertiary in source

calm nebula
#

Sexy

lucid iron
#

or if decompile decided it was a horrible tertiary

calm nebula
#

Try to transpile that one

lucid iron
#

transpiling it is easy tho

#

isnt it just a series of brfalse/brtrue yggy

calm nebula
#

Yeah

lucid iron
#

and its got very direct ldstr

lucid mulch
#

also the fact that none of these have consistent string keys forcing this 5 layer deep journey

calm nebula
#

Ugh there are things I want that are too aggressive for SMD 😦

#

Pouty face

lucid mulch
#

if it was Relationship_{title}_{gender} most of this would be deleted

trim sand
lucid mulch
#

but I feel it, I mainly mod in the shadows and do performance tweaks directly to smapi / content patcher, but forced to have a standalone mod to do some of it due to the scope issue

calm nebula
#

Btw SinZ I've been bouncing around the idea of ModContentLoader.LoadAsync

lucid mulch
#

to do offthread loading?

calm nebula
#

Also ModContentLoader.Load("path", useCache: true)

#

Yeah

lucid mulch
#

tbh I've 'accidently' made any image load on ModContentLoader.Load be cached anyway

calm nebula
#

Yeah, I like the caching thing you did I just also don't want to make an in memory copy

#

So the difference is "make an in memory copy" or "use the cached value directly"

fierce vault
#

I know I should probably stop now… but, what if I used spasecore to make it an internal 'marriage' but to also cancel out the 'spouse' actually acquiring a schedule that involves living at the house, so the non marriage dialogue and schedule can still come through?

I know that would cut off players from actually getting married (We could say, sorry, my bussiness partnership is too important right now for distractions or something) and it would absolutely break it for anyone trying to collect multiple spouses, but maybe this could be a solution?

lucid mulch
#

the main roadblocks to async loading, is the rest of the codebase not being thread safe, and for existing uses of the asset pipeline, what to show/return/use while its not currently loaded

calm nebula
#

Yeah,

#

The idea would be to return a wrapper object that gets populated....eventually

#

(Hence doing it for modcontent first)

lucid mulch
#

I can see it for audio easily, but can you async load the map when it gets invalidated while you are currently in it (i.e. 7pm time to change the map property for lights)

calm nebula
#

You're right that it doesn't play well with the asset pipeline

lucid iron
fierce vault
#

I was just wondering if spasecore could bypass that…

calm nebula
#

See, in theory a lot can be pushed to a background thread if we are willing to let a few frames slip

#

In practice I'm not sure I want to touch that yet

lucid mulch
#

for split screen moving the loads off thread while fade to black is active would help performance for the other screens

lucid iron
#

there's a different mod for it, but spacecore doesn't solve the relationship title on social page problem either

#

the feature is "give spouse back their schedule" iirc

#

not "mask spouse relation as something else"

fierce vault
#

Ah, ok. What would be the other mod?

calm nebula
#

I've always planned to split up appearance loads for the appearances optimization mod across frames so you don't take the hit of a bunch of npcs changing at once but also I would love it if I could push the actual image loading, up to the point of texture generation, off the main thread somehow

lucid iron
#

*other mod for making spouse dialogue less hardcoded

calm nebula
#

Anyways

#

It's been A While tbh

lucid mulch
#

but I'm already seeing corner cases even in the synchronous asset pipeline, where the AssetReady event for Data/Objects cant safely use the ItemRegistry because you are interacting with vanilla code before the asset propagation finished.

calm nebula
#

My first goal is to have SMD stable and out

lucid iron
fierce vault
#

Huh, yeah, it doesn’t look like it

lucid mulch
#

Ironically textures should be the easiest to off-thread load/edit and hotswap in, as SMAPI already does reference preservation for textures

calm nebula
#

I'm not going to lie, I've rarely found AssetReady useful EXCEPT for evicting members of a failed-to-load cache

#

Textures yeah

#

I also want to take a look at maps

#

Like, AssetReady either doesn't get called when I want, or it is easier for me to just do a cache evict on AssetInvalidatw

#

Etc, etc.

lucid mulch
#

I feel like AssetReady should be moved to after propagation

calm nebula
#

Is it not?

#

I thought it was

lucid mulch
#

nope

lucid iron
lucid mulch
#

its mid-propagation

calm nebula
#

(I've never used it except as a "remove flag about asset failed to load")

#

Weird. That's annoying tbh

lucid iron
#

this log is me trying to use an item query in assetready without checking for save loaded

lucid mulch
#

for any 1 liner propagation its a distinction without a difference, but anything that does anything after the load call would run after assetready

lucid iron
#

and its only ok after saveloaded cus i would have an old objectdata to use

trim sand
#

hate to bug but, really silly item query/GSQ question. double checking some core logic, when this query is checked, it will check the conditions on each block to determine weather that value can be returned, then picks randomly from the ones rolled for selection + the default. (please ignore the extra animal config added GSQ. not really core to the logic question.)
or would it always produce the default for some reason im not aware of.

                        "PerItemCondition":"ANY \"ITEM_ID Target {{ModId}}_gummitreasurebox\" \"selph.ExtraAnimalConfig_ANIMAL_FRIENDSHIP 300, RANDOM 0.5, ITEM_ID Target {{ModId}}_bowtreasurebox\" \"selph.ExtraAnimalConfig_ANIMAL_FRIENDSHIP 500, RANDOM 0.5, ITEM_ID Target {{ModId}}_candytreasurebox\" \"selph.ExtraAnimalConfig_ANIMAL_FRIENDSHIP 700, RANDOM 0.25, ITEM_ID Target {{ModId}}_deluxetreasurebox\" "
lucid iron
#

er why not use RandomItemId

#

did you need it to be weighted?

fierce vault
#

Masking the dating might not be worth doing, because it wouldn’t be an actual romance, and it would muck up dating other characters for the player.

I guess if I specified 'if you team up with this character, dating others will look and be a little weird' I could get away with it still being a feature, but Idk if anyone would even appreciate using it because of that.

lucid iron
#

doubling up on the 0.5 ones should work

calm nebula
#

Is Random_Items seeded, chue?

lucid iron
#

not unless the passed in random is seeded Random random = context.Random ?? Game1.random;

trim sand
# lucid iron er why not use RandomItemId

short answer is uh. not aware of that being an option. and its supposed to produce the lower three less often. the query itself only even gets called 25% of the time since the animal produce slot this is for has a random condition to it so it doesn't come up consistiently. of the 25% chance of the 'default' is being accounted for elsewhere

lucid iron
#

now i think your thing will actually work kinda, it'll just be awful to debug

#

is this for farm animal produce?

calm nebula
#

(Also instantiating one of each item in the game every time this is called is gonna be funnnn)

trim sand
# lucid iron is this for farm animal produce?

Specifically dug up produce. Query is to randomize output when called upon.
Trying to fix up Pokemon Ranch's mostly not functional treasure digging mechanic, this was previous just in the main produce slot deluxe produce. I've moved it to an extra animal config extra slot so it doesn't interfere with standard produce.

lucid mulch
#

it would be ParsedItemData / ItemQueryResult until one actually wins afaik

lucid iron
#

animal produce is a list so, can you just have more stuff?

calm nebula
#

Item Query Result holds an item instance iirc?

#

I swear I implementation an item query at some point

brittle pasture
#

(I feel like I should release that "item queries override" feature soon huh)

lucid mulch
#

ah yeah it does 😦

trim sand
#

Oh hi Selph.

brittle pasture
lucid mulch
#

it only resolves items so it can do price checks, even if it didn't need the sale price check 😦

fierce vault
#

Thanks for humoring me guys! I’ll need to determine what to do later in the development process, but I appreciate the discussion!

lucid iron
#

btw if u r updating pokemon ranch, there's unused custom locations in there

#

and also one of lechonk's produce item is error

brittle pasture
#

(I can release it right now, but I want to bundle a C# API with the release, including the ability for mods to add listeners to modify the animal produce, hence why it's taking some time)

#

(and also occupied with playing games but shh)

calm nebula
#

Playing games? What's that

lucid iron
#

will there be api to get the item queries

calm nebula
#

(Please ignore the record amount of xp I have in duolingo)

brittle pasture
#

I'll expose an API to get all the extension fields, including the queries

trim sand
# lucid iron and also one of lechonk's produce item is error

Lechonk is a weird one, that felt very well suited to queried dig up mechanics instead of drop overnight.
Much of my tweaks to pokemon ranch are about separating egg drops so happy pokemon don't entirely stop producing eggs. Separating treasure digging so it doesn't disrupt standard produce.
And trying to give more distinct mechanics to each pokemon family, as opposed to being extremely cookie cutter down to slightly bugged sell/buy prices.
Locations are on the list to figure out.
Eventually this whole project of mine is gonna get converted to a separate patch pack rather than building directly inside pokemon ranch.

#

Project has also mostly fixed the animals getting stuck in the structure doors issue the original dev claimed to fix in the last patch

lucid iron
#

oh i meant it was literal erroritem (wrong item id)

trim sand
#

Yeah that was an easy one to catch. Already dealt with

lucid iron
#

i hope new project moves to {{ModId}}_ convention Dokkan

sour sleet
#

Is it possible to have it so that an npc won't let you through an area until you've paid a fee? So basically I want it so that stepping on certain tiles prompts an npc to say "You haven't paid" or something like that.

lucid iron
#

boncher DokkanStare

lucid mulch
#

so what bouncer and henchman do?

lucid iron
#

is it a onetime thing or a reoccuring toll

sour sleet
#

Not really, more like there will be open space, they aren't blocking just one tile. And it will be a reoccuring toll

lucid iron
#

maybe do an event then

#

spacecore has tile action trigger + start event trigger action

sour sleet
#

I've never used spacecore but I know it can do some cool stuff so I'm tempted to look into it

lucid iron
#

should be able to do a reoccuring event whenever u step on the tiles, and then have the event put player back

trim sand
#

Assuming I can get the tools supplied by extra animal config to do the thing I need it to the hope is to be able to share this data patch that started as being written for myself. Due to a number of annoyances using the mod. still really need to figure out the cause of animals getting stuck in the door of the structures

sour sleet
#

I'm thinking that making it work like bouncer might work better for my use case. How would I go about that?

calm nebula
#

Bouncer is hardcoded

#

I'm not convinced there is a framework

sour sleet
#

Ah ok, that's a shame

ashen thunder
#

is it possible to make an event where the npc present changes depending on who the player invites, kind of like the movie theater?

urban patrol
#

ummm i could potentially see you doing it with when conditions or tokens? can you use tokens inside of events?

lucid iron
#

yes, but it won't update in time

#

you'd have to do it as "invite so and so to do thing tomorrow"

ashen thunder
#

how would I use the tokens? like set it to an npcs name?

calm nebula
#

I feel like to do this you need c#

lucid iron
#

alternatively u just have N versions of the event

calm nebula
#

Like how do you select npc

#

Well

lucid iron
#

perhaps preferred if u actually want to write different dialogue

calm nebula
#

Giving them a special item is the classic

ashen thunder
#

yeah i was thinking a special item

calm nebula
#

Do you just...put in a gift taste to set a CT for every npc?

urban patrol
lucid iron
#

yes, but token won't update immediately

calm nebula
#

Yes but how do you set the token in the first place

lucid iron
#

the jank i had in mind is that u mailflag day 1, dynamic token day 2

calm nebula
#

Gift taste CT is my only idea and that sounds like a faff and a half

urban patrol
#

isn't there a way to trigger an event upon gift given, or am i mixing up spacecore/BETAS documentation with vanilla?

calm nebula
#

That's spacecore iirc

#

But now you need the name of the npc

#

All of them

urban patrol
#

hmm quite the conundrum

lucid iron
#

Gotta remember that vanilla movie is elaborate event metaprogramming

calm nebula
#

Lol yeahhhh in multiplayer too

#

Tbh part of the problem with the c# folx. Or perhaps me only. Is that because I can see exactly how I would do x, y or z in c#

urban patrol
#

how about one event, 30 forks, one fork per NPC /j

calm nebula
#

I don't consider the archane art of stringing together weird behavior with content pack framework

urban patrol
calm nebula
#

Well you could set a token that checks for a CT and use AcceptGift_YourSpecialItem tbh

#

memo to self - generic item responses

lucid iron
#

But isn't that limited to X characters again

calm nebula
#

Exactly!

#

There isn't a for loop

lucid iron
#

The content modders yearning...

calm nebula
#

The bright part of a CT is it is automatically time limited

#

And AcceptGift would let you set it fine

ashen thunder
#

ok ty

calm nebula
#

Hmmm

#

Chue, I have a stupid idea

lucid iron
#

Oh no

calm nebula
#

A generic file for dialogue for stuff like this

#

That would get override

lucid iron
#

Like uh

calm nebula
#

MarriageDialogue yesh

lucid iron
#

Characters/Dialogue/defaults

#

I wanted to make something like that for the kids mod actually

calm nebula
#

Home for the rejectItem you need

lucid iron
#

Tho ofc it'd be for kids

calm nebula
#

The only issue would be that I think I would also want a way for npcs to not have the generic dialogue

#

If only b/c wellllll

lucid iron
#

Today i gave Kyle (ornithologist's guild) a birthday gift and he spoke perfect english back at me

calm nebula
#

(Also while I hope people would use a generic dialogue responsible...)

#

You know exactly what would happen

lucid iron
#

I guess for this theoretical mod that I'm not making it'd just be a field on the character

#

Wait no i don't what do u mean

calm nebula
#

Yeah. And make it clear that the generic is meant for things like "every npc but one should reject this item"

#

Hmmm will workshop more

lucid iron
#

It would be pretty bad to get another situation like the mod that made any npc flirt at u when u wear a bikini

#

Tho when u r framework there's not much u can do to stop nefarious usage (whatever you deem nefarious to even be)

calm nebula
#

Precisely

#

Heck, or having someone like torts speaking coherent English

brittle pasture
#

welp, I expected it, but migrating data models from fields to properties explodes my DLL reference mods

lucid mulch
#

welcome to the difference between api and abi compatibility

brittle pasture
#

back to individual API functions for every field, weh

#

actually, hmm, I can just make a copy

sour sleet
#

Why does my game hate it when I'm using the mine tilesheet SDVpufferflat

#

Won't load my custom map

#

I'm guessing it's because it's within a folder within Maps in the game files?

lucid mulch
#

within the tmx file tilesheets need to be in the same 'folder'

sour sleet
#

I've looked at the tmx and it just says mine

devout oracle
sour sleet
#

What should I change it to?

worldly sundial
#

fellow modders, does length matter?

brittle pasture
#

cast the menu to CarpenterMenu and just access it normally

devout oracle
#

do what now?

brittle pasture
#
if (e.OldMenu != null || e.NewMenu is not CarpenterMenu carpenterMenu || !carpenterMenu.MagicalConstruction) return;
sour sleet
#

I tried just loading a vanilla mine map with a new name and it still errors

lucid mulch
#

oh its reflectioning into it, that would explain why it got past smapi's rewriters saying the mods broken

sour sleet
#

Apparently there's an invalid tilesheet path but I didn't even change the vanilla map yet

calm nebula
#

Yup

#

Your map always looks to smapi if it's in the root maps dir

#

You have to actually use like, mines/<whatever> as the tilesheet

#

It's weird

shrewd phoenix
#

I'm trying to figure out how trinket rerolling is seeded, specifically the magic quiver. I can see all the numbers here that match up with the wiki, and I can see it's making an object of the Random class seeded with the generationSeed of the trinket itself. But Trinket.cs isn't helpful, I'm not sure when in gameplay that generationSeed is actually set.

sour sleet
#

I'm a bit confused as to how to fix it though. Do I include the tilesheet in my mod? Surely there's a better way

devout oracle
vernal crest
vernal crest
worldly sundial
sour sleet
#

Thanks Aba SDVpuffersquee

vernal crest
# devout oracle which i do not.

!mh I recommend heading to the tech support forum then, since this channel is not the right place for getting help using mods :) Although at a guess from looking at the comments on the mod page, if you have a mod that affects Robin's carpenter menu they may be incompatible.

ocean sailBOT
#

For help with modding issues, please ask in #1272025932932055121! When asking for assistance there, sharing an error log will help others identify your issue (see https://smapi.io/log for instructions).

brittle pasture
#

(sorry, you asked in making-mods so I assumed you were doing C# stuff)

#

(especially because you posted a stack trace)

shrewd phoenix
median forum
#

feeling really dumb wrt the formatting for content.json

median forum
ashen thunder
#

i think it was the two opening brackets and two ending at the end, only need one set

median forum
#

yeah, i think that's what i deleted

#

between that and writing my saloon event to the seed shop, it's not been my best outing

vernal crest
#

The CP schema might help with that sort of thing if you wanted to try it

median forum
#

oh!

#

didn't remember that being a thing, thank you

#

i finally got my heart event to run and, while it's full of errors, at least they're things i can fix. probably.

vernal crest
#

Of course you can ^_^

inner harbor
#

If I could set it to only be given to the right person (like the PIrate Wife quest) then I would set it up as a quest. Is that possible?

#

If I make it a quest item?

median forum
calm nebula
#

Item delivered quest like Robin hammer

inner harbor
#

but what stops anyone else taking it? Is that C#?

vernal crest
calm nebula
#

I believe both Robin's axe and Linus's basket

inner harbor
#

its labelled as "Quest" in the data. I do have unique dialogue responses for some folks when it's offered to them to give hints as to whom it actually belongs to etc. The Pirate's Wife quest, does something similar.

calm nebula
#

Pirates wife is hardcoded i think

#

While Robin's axe/Linus basket are fully in data/quests

inner harbor
#

Hmm, I can try it. I got really disappointed when I set up all sorts of stuff for if you give Victoria a prismatic jelly, only to find that you cannot gift it to anyone while the Special Order is active. (You can gift it outside of that - it was the first thing I tested)

calm nebula
#

Yeah, that item is hardcoded

past knot
#

I need a bit of help here:

1: how can I get rid of the shadow?

2: How can I made it so that the area in the video is walkable and doesn't act like a barrier?

fossil osprey
#

Are you making a CP pack? Because I think changing the farmhouse hitbox is C# territory

whole raptor
#

You can disable the shadow in Data/Buildings

past knot
whole raptor
#
    "Action": "EditData",
    "Target": "Data/Buildings",
    "Fields": {
        "Farmhouse": {
            "DrawShadow": false
        }
    }
},```
cedar turtle
#

I kinda want to make an animal companion FS pack. How would I go on about those? Sprite size, how many frames for the animation etc

shadow pagoda
#

I'm unsure if this is the right place to ask. I want to create a mod that changes the name of specific items and NPCs to swear words. Is that something that would be considered nsfw for nexus and other mod hubs?

cedar turtle
#

You'd have to ask nexus how their rules work.

#

Or wherever you plan on uploading them.

hard fern
#

I don't remember it exactly but it would count as something that users could probably filter out in the tags

cedar turtle
#

Oh yeah, there would be tags

lucid mulch
#

Based on Skyrim and how many NPCs swear like a sailor and I don't think have the NSFW tag, I doubt they put profanity behind it.
An optional tag makes sense

cedar turtle
#

I think nsfw in terms of nexus is pretty much sexual/skimpy stuff.
Having a disclaimer about profanity wouldn't harm though

spring marlin
#

is there a way to detect if you have max pet friendship?(pet adoption unlocked)

brittle pasture
#

where she announces she has pets for adoption

#

or if you want something a little earlier check the "petLoveMessage" mail flag (which causes said mail to be sent the next day)

potent vigil
#

I need help

#

this is my mod

tender bloom
#

!json upload to the json parser here and you can show us the actual mod text with some helpful suggestions

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.

tender bloom
#

Most likely you just need to update the format on the CP packs, but it depends on how old your mod is

sour horizon
#

Hey, Long time no see SDV friends, I'm debating getting back into making some mods, any changes or advice I should keep in mind with the recent updates?

tender bloom
#

There's a lot of really cool stuff we can do with content now!

#

Content Patcher has added a whole lot of functionality due to the game de-hardcoding a bunch of stuff

#

also some turnover in frameworks — things breaking, new things coming out, the usual. 1.6 was a really big update so there's a lot to get excited about!

sour horizon
#

any advice on where to get started

#

as far as what I've done in the past I made a small mod which added vinyl record inspired decor to the game

stone crypt
brittle ledge
#

!NPC the tutorial here covers some of the changes from 1.5 to 1.6 in the Changes from 1.5 section, including some tips for converting!

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:

brittle ledge
tiny zealot
#

NPCs are complicated and almost everything about them was updated (read: improved) in 1.6, so to update one, your best bet is to more or less remake it. the tutorial and the wiki should have you covered, but there is a lot. just take it one step at a time

flat sluice
#

Hi,
I'd like to ask, is it possible and correct to use "When" inside of a TriggerActions entry? Like done here: https://smapi.io/json/content-patcher/f5490bb093094b7c909eaec5eb813126
Or is it necessary to use "Condition" and GSQ? And if so, how would it look if I wanted all the conditions to be true to apply the action? Like "DAY_OF_WEEK Monday DAYS_PLAYED 10", would that be correct?

tiny zealot
flat sluice
tiny zealot
#

broadly, if a game feature (like Trigger Actions) supports GSQ in its data model, i recommend using that instead of content patcher's When, since it's part of the game itself and CP won't need to do any work about it

#

although it is sometimes a tradeoff, as described in the GSQ docs

#

this will return true only if all queries are true

flat sluice
#

Oh, good. I thought so, because there is that ANY thing I'm kinda scared of right now. Thanks! SDVpufferheart

tiny zealot
#

yes, ANY is designed to change the "all true" behavior by creating an OR. but you have to escape quotes and not separate with commas, so it can get messy

#

(many queries support OR behavior inherently, like SEASON which can take multiple season arguments and returns true if any of them match)

sour sleet
#

How do I make a body of water contain fish? It's in a custom location and i want it to contain fish I've made and some vanilla ones also

brittle pasture
#

Fish in Data/Locations

#

[[Modding:Location_data]]

ornate trellis
#

you can check Sunberry Village for an actual example btw

sour sleet
#

Thank you both!

brittle pasture
ornate trellis
potent vigil
#

Hello, I'm very lost and I don't know what to do anymore. I'm trying to put my custom NPC in the Pelican Valley Loft (NPC Apartments) mod and I get an error when loading maps, since I want my NPC to live in one of the houses in that mod, but I don't know what else to do to make it work. When I get my NPC to go there, it doesn't even appear. If anyone knows how Pelican Valley Loft (NPC Apartments) works and can help me, please contact me privately.

urban patrol
rough lintel
#

it looks like you just didn’t lo- yeah

potent vigil
urban patrol
#

can we see where you set your npc’s spawn?

#

!json please use this site

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.

potent vigil
#

yes, This is what I have

golden spire
#

a lot of that is wrong,

#

also please us the json link

#

rather than images

urban patrol
#

you should remove all the loads related to the loft. you should also remove your edit of data/npc dispositions

golden spire
#

you don't need to load in any map, as you're using another mod as a dependency

#

a user will need to download the apartments mod

#

to use your mod, and then you just spawn your NPC in that map

urban patrol
#

also npc gift tastes takes a different format now. let me try to find a wiki link for you

potent vigil
#

I'm going to try

urban patrol
#

have you already been linked to the npc tutorials?

#

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

urban patrol
potent vigil
#

I already removed the Pelican Valley Loft related thing.

potent vigil
sour sleet
#

Ok so I've added a fish to my game and added it to the location I want it in but I want to know; does the game automatically know that the water will contain my fish or do I need to mark a fishing area?

calm nebula
#

If you so not mark a fishing area is all waters on map

golden spire
#

If you have no fish data you will only fish out trash,so whatever fish you have added to your location will be those fish, if you have different areas of fishing on the map you have to be more specific with the data

urban patrol
sour sleet
#

I do have fish data, so does that mean I won't fish up trash?

#

And how do I mark a fishing area?

golden spire
#

I meant if there was 0 data you'd only get trash.

Does your map require different areas? Like the forest has a lake area and the river area.

sour sleet
#

No, it won't need different areas for this map

golden spire
#

ultimately the best test is to just fish and see if you're getting what you're supposed to

sour sleet
#

True lol

golden spire
#

if you're fishing out lewis's lucky shorts.. something went wrong,..

tender bloom
#

I think there are some mods that will also just sample the fish pool and tell you the distribution. It's been a while since I used them (pre-1.6) so idk for sure if they've been updated

sour sleet
#

I caught my fish in the water but I also caught some trash. Is it possible to remove the trash spawn or is it hardcoded?

lucid iron
#

Trash is from fishing skill level iirc

sour sleet
#

Ahh that makes sense, on this save I'm Fishing 3

lucid iron
#

i wonder if you just need to put the fish's rate to 100%

sour sleet
potent vigil
golden spire
#

We need to see your mod's json.

#

otherwise we are guessing blindly at what you have done

potent vigil
#

Should I send the files? Because I can't fit everything in one photo.

urban patrol
# potent vigil What should a content have? How would my NPC be in the Pelican Valley Loft map b...

your content.json should have all of the patches you want to make, unless you’re using the include command, in which case you can put patches in other jsons for organizational purposes and the include command in your content. all of the NPC features you mentioned will be done through patching various vanilla files or a blank json (for example, loading a blank json to your NPC’s schedule and then editing it with a patch). there are wiki pages and/or tutorials for each feature you want your NPC to have

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

urban patrol
#

then share the link here as mentioned

lucid iron
urban patrol
potent vigil
#

Inside my mod is the manifest.json and the content.json then the assets and data folder, inside assets I have dialog with a .json suchedules with another j.son and inside data an events folder and two other .json

potent vigil
golden spire
#

have you used AI on this????

urban patrol
# potent vigil Yes, because it gave me an update error or something like that.

okay, i just wanted to make sure i knew why you were formatting it the way you were. most of this has changed—events don’t take conditions and a script like that anymore. visit the events page to learn how to format them. here’s the general migration page that will walk you through changes you need to make https://stardewvalleywiki.com/Modding:Migrate_to_Stardew_Valley_1.6

Stardew Valley Wiki

←Index

urban patrol
golden spire
#

it looks like made up AI stuff

uncut viper
#

none of this looks like pre-1.6 weirdness to me

urban patrol
#

yeah i hope it isn’t, because @potent vigil AI generated content isn’t allowed in this server

urban patrol
golden spire
#

(also a waste of your and everyone elses time)

rigid oriole
rough lintel
#

lol what tf are those event scripts

#

😂😂😂

urban patrol
#

yeah i know it’s weird and wrong lol i wanted to give benefit of the doubt and that it was just pre-1.6 😭

rough lintel
#

yeah no event formatting is the same as 1.5

golden spire
#

pre 1.6 wasn't that different

rough lintel
#

this is not done by human hands most likely

#

and thus, we can move on safely

whole raptor
#

Does Nexus have some kind of support for tables in mod descriptions? SDVpufferthink

brittle pasture
#

dont think so

golden spire
#

code block and ascii art? 😛

lucid iron
#

Image

#

But dont pls that's not screen reader friendly

golden spire
#
+----------------------------------+---------+------------------------+----------------+
|               Col1               |  Col2   |          Col3          | Numeric Column |
+----------------------------------+---------+------------------------+----------------+
| Value 1                          | Value 2 | 123                    |           10.0 |
| Separate                         | cols    | with a tab or 4 spaces |       -2,027.1 |
| This is a row with only one cell |         |                        |                |
+----------------------------------+---------+------------------------+----------------+
rough lintel
#

i wish nexus didnt use bbcode but at the same time…

uncut viper
#

good luck getting nexus to keep that formatting

whole raptor
#

I wonder if the day when Nexus adds an option to use markdown ever come... probably not...

rigid oriole
#

it's "planned"

rough lintel
#

beg picky and he might

rigid oriole
#

whether it is "prioritized" is another quesiton

potent vigil
#

First, I didn't know that AI couldn't be used, I apologize, but I also want you to understand that this is my first time making a mod (I clarify that it is for personal use) and being new to this I relied on AI because I didn't know how to start and what the structures for modeling were like.

#

sorry

rigid oriole
#

that's why we have a bunch of correct, human-made docs and tutorials

#

!startmodding

uncut viper
#

AI will (and has) lessened your understanding of how to mod stardew

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.

golden spire
#

and it's also wasted your time.. rather than helped you

potent vigil
#

I know, I am aware

whole raptor
#

Another question.. can I put gifs in mod description? SDVpufferthink

sour sleet
#

The modding wiki will really help you out. No need to use AI, it doesn’t understand the format for the game anyways and will generate crap like that stuff you posted. I recommend scrapping that and starting fresh

golden spire
#

I think so

brittle pasture
#

yep

lucid iron
#

Nexus says you can't use gif but that's a lie

ornate trellis
#

considering that Avi made a romancable npc template it shouldnt be that hard to restart tbh and tias tutorialin my opinion is documenting things well and is easy to understand

lucid iron
#

I used so many on this mod page and directly hosted through the images too

whole raptor
#

Nice, thanks

golden spire
#

I just tried an animated-png, It all animated fine.

whole raptor
#

Gotta make some promo for Seasonal Razzy on the mod page then SDVkrobusgiggle

#

I wonder where I'm hosting the existing images on my page... it's been so long SDVpuffereyes

latent mauve
#

I wasn't here earlier because I was working, so thanks to everyone who fielded the questions about the Pelican Valley Loft NPC Apartments! I can confirm that it loads all the required maps and blank event JSONs for the mod's related locations on its own.

The only thing a NPC author should need to do to spawn a coded NPC there is get their bed coordinates for their chosen room (also found in the Google Sheet for convenience) to set as their NPC's Home.

golden spire
#

and patch the room to become an illegal den of sin, which has to get raided in a 6 heart event

latent mauve
#

The location name and coordinates are included together for easy reference

#

Haha, patching rooms goes behind the bare minimum, and is explained in the sheet as well 🙂

#

(as is updating the door tile for conditional locking)

golden spire
#

"You'll never take me alive Lewis!"

potent vigil
#

Anyway, thanks for guiding me and sending me the links. I'll try to do it right this time.

latent mauve
golden spire
#

you should add the bouncer to stand outside the door as "security"

latent mauve
#

I don't have a landlord NPC yet, Limey, so there's room for lore expansion there. LOL

brittle ledge
#

Bouncer's employed, add the Boncher

lucid iron
#

The landlord is a corgi

#

Not a talking one but she comes look at you sad if you don't pay rent

latent mauve
#

There's an office for the landlord but it's always locked

golden spire
#

the landlord is secretly Linus

lucid iron
#

He would never... Betrayal

latent mauve
#

Betrayal would be making Morris secretly the landlord, but seeing as Morris Redeemed has him live there, Pelican Town is safe from that universe

whole raptor
potent vigil
lucid iron
#

bonched dusty

whole raptor
#

For a few seconds instead of Dusty I saw something that could qualify as NSFL SDVpuffereyes

golden spire
#

I don't know what you saw but I can't see it

whole raptor
#

You're lucky, my mind is just messed up SDVpuffersquee

hallow prism
#

not safe for... l???

#

life?

whole raptor
#

Yep...

crude plank
rough lintel
#

nyall, how do i make whatever music is playing outside continue when i enter a house?

#

currently it's dead quiet in my npc's house and i do not want it to be lol

latent mauve
#

Have you set a Music, MusicDefault, or MusicContext in your location data?

#

(alternatively, "MusicIsTownTheme": true should let the outside music continue playing when you walk inside, though I am uncertain if that is for any track.)

rough lintel
#

hm, ill check

#

i have not added one

#

ill put music context default i guess

#

but it doesnt seem like any other location does this. bweh

latent mauve
#

Well it should be defaulting to MusicContext: Default

rough lintel
#

(in sunberry anyways)

#

yeah i realized that after typing LOL

#

ill just. leave it be! i suppose. but good to know this exists

latent mauve
#

Does Sunberry use the SubLocation MusicContext for its outside map? I know that can kill the music when you leave the space if your destination doesn't match it.

rough lintel
#

i dont think it does. i dont see it mentioned anywhere

latent mauve
#

alright.

#

Well in the interim, you could just manually set a "Music" track ID to prevent the dead silence in your map

rough lintel
#

onto a different issue: my mail is not adding a quest like i want it to, and im not sure why

#

wait i may have just fixed it

#

yatta

rough lintel
#
"Action": "EditData",
"Target": "Data/ChairTiles",
"Entries": {
//chairs
"z_lanihousetiles/8/34": "1/1/up/couch/-1/-1/false"
}
}

any way to make it.. so that the couch draws in FRONT of the farmer? i thought i had it right but hrhhhhgh

#

do i have to specify something on a non-sittable furniture piece

#

or like

#

in vanilla, i see no use of up/couch so im not sure what to do i guess

#

just down/right/left

gaunt orbit
#

Have to use the front tile layer

rough lintel
#

it is front

#

thats the thing

gaunt orbit
#

Oh, hm

#

With the position it's in you could probably make it alwaysfront

rough lintel
#

ok, ill try that

ornate locust
#

Oh the back of a couch works different

#

You have to do it as a highback chair from the back

rough lintel
#

oh okay

#

and then,..,., ?

ornate locust
#

"MidnightsMisc/0/32": "1/1/up/highback_chair/0/34/false/Maps\MidnightsMisc", Here's oine of my couches from the back

rough lintel
#

i actually have it set rn as a highback chair
"z_lanihousetiles/8/34": "1/1/up/highback_chair/8/33/false"
but i am not sure if the 8 33 is correct (its the tile i want to draw over her i guess)

#

so what is the thing after the highback_chair then

#

i guess idk what to put there

ornate locust
#

That's my tilesheet

#

where the thing to draw over it is

rough lintel
#

do i have to link it to my tilesheet for it to do th- AHHHH

cyan marsh
#

@analog flower padon the ping, i'm just trying to dm you x3

rough lintel
#

"z_lanihousetiles/8/34": "1/1/up/highback_chair/8/33/Maps\\z_lanihousetiles" hmmmm

#

i try now

#

no dice

cyan marsh
#

soo you all wanna hear something funny? My cat peed on my PC last week and killed my Video Card xD

ornate locust
#

That's the tilesheet's asset name, right? It's tied to that

rough lintel
#

yeah

ornate locust
#

okay just checking, I made that mistake starting on couches

rough lintel
#

the sit, and the tile i want to draw over her... i guess

#

its (grid) 8,33 in the tilesheet

#

but do i not. summon it that way

ornate locust
#

Oh I do see one problem