#making-mods-general

1 messages Ā· Page 443 of 1

karmic gust
#

tbf there is a lot of user error in this case

#

šŸ˜…

uncut viper
#

true, but a lot of user error can be guarded against

karmic gust
#

so is using text operations not really a good way to edit an event?

#

there are only a line or two that need to be changed, and I thought that was the best way to do it

uncut viper
#

@ivory plume is this expected Content Patcher behaviour? doing a text operation on something that doesnt exist (in this case an event) makes it exist but then if the resulting operation leads to a null value, it continues to let it exist even though normally turning something into null would have Content Patcher remove it

#

in this case that lead to errors when the game tried to parse a null'd event script

uncut viper
#

TargetField and Fields support slash-delimited strings

#

so for example if you wanted to edit the 3rd command in a script, thatd be the 2nd field, so you'd target #2 within the script in TargetField

#

you could also do the same kind of Targeting with TextOperations maybe? but not much point to that vs just using TargetField or Fields

#

this does have the downside in that if the event you're editing is changed unexpectedly (like the original mod updating, or someone else editing that mod before you) your edit might break it, but odds are it'd be broken in some way anyway if the original script changes

karmic gust
#

Hmm, I'm trying to edit the text inside speak commands. Is there a way to do that without potentially messing up the original event if it's changed in the future?

#

Oh sorry I just reread your last message, so kind of no matter what the edits are relying on the original event to stay the same

uncut viper
#

yeah pretty much

urban patrol
#

if you give it early priority it'll happen before other mods make edits to it, but that's still not a guarantee

karmic gust
#

Okay good to know. Thanks again!

ivory plume
uncut viper
#

yeah that sounds about what id expected

patent lanceBOT
#

@next plaza: do this (7d ago)

autumn tide
#

hey, the switch event thingy still has the wizard specificTemporarySprite-ing, is there anything I might do?

royal stump
autumn tide
vernal crest
urban patrol
#

i definitely did--i had no idea they were different! thank you for clearing it up

#

edited my message

drowsy pewter
gaunt orbit
#

hmmmm it's now occurring to me that just selecting a random key from the fish data dictionary is likely to yield rare fish far too often
but the alternative is iterating location data, combining all the fish entries, and then selecting one, which sounds complicated and annoying

#

maybe what I can do instead is just select a random location with fish defined and then just roll that table?

calm nebula
#

Random location that the player has been to?

#

So end game locked locations dont get hit

gaunt orbit
#

well this is planned to be endgame anyways

#

I just don't want it to be too ridiculous and follow general rarity rules

#

although now that you mention it, that's not a terrible idea

drowsy pewter
#

you can go on fish value maybe?

gaunt orbit
#

so far my plan is this plus postfixing HasMagicBait

lucid iron
#

gang there's a netfield called ignoreDamageLOS on monster

#

what does LOS mean

tiny zealot
#

line of sight, i imagine

gaunt orbit
#

Line of Sight

lucid iron
#

oh that makes sense

lucid mulch
#

looks like its only used for LavaLurk's to avoid some damage logic so they are always hittable when they aren't invisible/invincible

#

guess its so being in the lava doesn't count as an obstruction and skip some loops and logic

sterile solar
#

Hey, am trying to get the flamethrower attack of the dinos to do more damage, but increasing the damage of the dinos just changes its touch damage.

#

Hey SinZ still owe you that log, didn't forget it.

brittle pasture
#

looks like the flame projectile is set to always deal 25 damage in code

sterile solar
rare rock
#

hello

#

is there a way to reference the farmer's name in map strings?

#

The @ ends up appearing as a āž”ļø in text

urban patrol
#

yeah, use Message instead of Dialogue i believe

next plaza
# drowsy pewter caseyyyyyyyyyyy

I have to go to bed soon šŸ˜…

(I happened to open this channel accidentally, and this was the first message it showed šŸ˜› )

#

Remind me in 20 hours to ACTUALLY merge PRs and what not

patent lanceBOT
#

But of course, dear kittycatcasey (#6898028) (20h | <t:1759961302>)

next plaza
#

…is uber bugged

#

Why was it nice

lucid mulch
#

.8ball are you bugged

patent lanceBOT
#

Computer says no.

rare rock
gaunt orbit
#

does CodeMatcher have any way to like, apply a block to an entire InsertAndAdvance or do I really have to manually add the blocks to every single instruction

next plaza
#

/me has always written transpilers by hand without codematcher

lucid mulch
#

^

next plaza
#

(And really needs to stop doing that because it sucks)

gaunt orbit
#

I used to but man. it is so much less tedious to use tools

lucid mulch
#

I enjoy the friction as it gives an incentive to find non-transpiler ways to get the same outcome

next plaza
#

Yeah.

I think I was one of the first people to use transpilers, so had to figure them out on my own.

And I didn’t discover code matcher, so now my habit is to not use it šŸ˜›

gaunt orbit
next plaza
#

/me scurries away to crime thread to see if doing any-direction collision handling is as bad as I remember

gaunt orbit
#

you have to dig through the il, and figure out where and how to write the damn thing, and god help you if you wrote an instruction wrong and need to debug the output

brittle pasture
next plaza
gaunt orbit
next plaza
#

(Back in my day, we had to patch functions using unsafe pointers, so no, we’re happy for the change)

lucid mulch
#

stop yelling at the cloud

next plaza
next plaza
#

Or not feasible with code matches

next plaza
#

I don’t know if anyone besides me even did it

gaunt orbit
tiny zealot
#

having used raw transpilers, and later codematcher, i am team codematcher

lucid mulch
#

I do not miss the old days in minecraft modding where you just replace the .class files in the jar and delete META-INF

gaunt orbit
#

yeaaah

gentle rose
#

are try catch blocks in transpilers cursed in the same way as the ones in prefixes and postfixes

next plaza
gaunt orbit
lucid mulch
gentle rose
#

iirc they just don't always trigger, that's why finalizers are a thing

lucid iron
#

what is the block to apply NotteThink

next plaza
gaunt orbit
next plaza
#

Oh

gaunt orbit
#

they are their own metadata on CIL instructions

next plaza
#

RIP x2

tiny zealot
#

i continue my usual strategy of "pretend try/catch does not exist" /j

uncut viper
#

ive never had my try/catchs fail in any kind of patch fwiw

gentle rose
#

I remember attempting to wrap something in a try catch while doing harmony and being utterly ignored at least once

gaunt orbit
#

in the specific context of Harmony, each CodeInstruction has a list of try/catch blocks it belongs to, which unfortunately also includes any foreach loop

next plaza
#

I could’ve sworn there was at one point a function for recalculating stack frames or whatever to fix that, but I’m likely thinking of MC core mod bytecode stuff (from the olde days pre-mixin)

gentle rose
#

but do I remember what I did to deserve that? no I do not

gaunt orbit
lucid iron
#

Well the thing u r inserting is like a list of instructions right

gaunt orbit
#

maybe I just ignore it for now and see if things explode

lucid iron
#

Can u do some linq things bolb

next plaza
#

What's the worst that could happen if you ignore exceptions?

Heck, there's even a bonus (for you) - the exception won't look like it came from your mod (or not as likely), and so Pathos gets your bug reports on SMAPI instead!

#

(not so much a bonus for Pathos I suppose)

gentle rose
#

look up what the reasoning behind finalizers is, find a wild pathoschild in the github issue

next plaza
#

(yes, pathos would know, but the users don't know how to read stack traces, so...)

gaunt orbit
next plaza
#

Cursed is better than crimes (if you're a coward)

lucid mulch
#

finalizers are a great place to hide crimes in stardew mods, as the pathos build of harmony which renames the staccktrace to say what mods touched it, doesn't happen for finalizer patches

lucid iron
#

Well if it makes u feel better u can make some helper method with param

next plaza
#

New crime avenue, how exciting

lucid mulch
#

finalizers just get like _Patched or something

lucid iron
#

This seems like srs bug

#

I used like at least 2.5 finalizers for completely arbitrary reasons

next plaza
lucid mulch
#

also if you throw an exception in a finalizer it will say it came from the original method, not the finalizer method

next plaza
#

Oooo

#

I can't wait to finalize a SMAPI method with a NRE exception thrown

gentle rose
#

smapi lore found in the harmony repo issues

lucid mulch
#

when I added profiler support for adding arbitrary support for finalizers to log and optionally supress the exception, I messed up and had a null reference exception, causing the original method to now blow up instead of not blowing up

urban patrol
#

how are bookseller dates determined? the wiki says randomly. is there code to prevent him from showing up on a festival day, for example?

brittle pasture
#

it's those (hardcoded) numbers

urban patrol
#

got it! and randomly picks from those i assume

brittle pasture
#

yeah no code to stop him from showing up at festivals, other than the fact the vanilla festival dates aren't one of those numbers

gaunt orbit
#

I do not understand why this transpiler is considered invalid

next plaza
#

..popping back in here for a second

#

Can you not make reverse patches with manual patching

gaunt orbit
#

oh I think I had the parameter order fucked up

gaunt orbit
next plaza
#

Found it

#

It's not on the same overload

#

It's a separate method

gaunt orbit
#

yeah it's CreateReversePatcher

#

and then you call patch on it

#

(presumably so you can re-create it if other patches are applied to it and you're using snapshot mode)

next plaza
#

(Which I am)

#

(I'm doing some Shenanigans ā„¢ )

gentle rose
#

when are you not tbf

next plaza
#

I mean

#

Fair

#

I'm abusing generics to make what I want to do possible

gaunt orbit
#

generic abuse is wonderful

#

thank you pathos for (indirectly) teaching me how to do horrible MakeGenericMethod crimes

next plaza
#

I just used MakeGenericType

gentle rose
next plaza
#

Basically I wanted to use TargetMethods to patch all subclasses, but also be able to call their original methods with reverse patches

gaunt orbit
gentle rose
#

makes sense, I was recently breaking into content patcher

next plaza
#

Basically I'm abusing the fact that generics have their own static variables for each instantiation

gentle rose
#

I have since thought of a way to do what I wanted without ever prefix skipping content patcher methods but I have also been advised to please not do what I wanted in general SDVpuffersquee

next plaza
normal panther
#

Hey yall, just joined and will probably be jumping into my first mods soon. Excited!

#

Hoping the scripting is pretty powerful

next plaza
#

Boy is it

normal panther
#

ooo

next plaza
#

glances at my most recent project

gentle rose
#

depends what you mean by scripting haha

normal panther
#

can most things be reloaded without restarting game?

next plaza
gentle rose
#

no don’t look at her recent project it’s Crime /lh

next plaza
#

CP not as much (but still super powerful considering there's no code, just json), but C# mods, definitely

gentle rose
next plaza
normal panther
#

I'm just now looking into all this, CP is? I assumed it was all C#

next plaza
#

CP = Content Patcher

normal panther
#

ah

next plaza
#

It's a framework for making mods without having to code, essentially

#

(still gotta use json though)

normal panther
#

was about to ask

gentle rose
#

so content patcher is a mod that’s basically its own declarative programming language at this point

normal panther
#

but I'm assuming I can do everything CP can via C#?

next plaza
#

šŸ˜›

#

okay I bet you might could do something with includes and local tokens and conditions, but let's not manifest that into the world

gentle rose
tiny zealot
next plaza
brittle pasture
normal panther
#

I'm coming from Skyrim/RDR2 modding (for content), and you can do pretty much anything with pure scripting. Hoping stardew is similar

gentle rose
next plaza
next plaza
#

Please don't give the framework modders access to SQL JOIN

#

Please

gentle rose
normal panther
#

okay so kitty is the one to bother when I inevitably have questions

#

good to know thanks yall

next plaza
gentle rose
#

casey, author of famed mods Spenny and Spenny Deluxe and also some less important ones like spacecore

next plaza
next plaza
normal panther
#

I'm not looking to make mods of any real substance. Unfortunately just real brainrot type stuff

next plaza
#

Those are the best ones

gentle rose
#

you’ll be glad to know I have four spenny emotes, casey

normal panther
#

well I guess I'm in the right place

next plaza
#

Most of my most recent published mods are joke mods

gentle rose
normal panther
#

Literally the only thing I know about stardew mods is stardew extended. which I've never played

next plaza
normal panther
tiny zealot
urban patrol
#

the only thing you need to know about SVE is that you WILL get comments asking if your mod is compatible with it

gentle rose
#

edom rorriM

next plaza
brittle pasture
#

I made animals poop

next plaza
#

(And this is ignoring the random error generator mod I made for pathoscat.mp4, since that wasn't published)

normal panther
#

kitty these are incredible. Do you make these for content anywhere other than nexus?

gentle rose
#

didn’t button once make a mod that just did ascii art smapi log spam

next plaza
#

The source code is on github, but I don't have most things elsewhere because uploading updates is such a pain

next plaza
#

Eventually I might automate it if Nexus gets an upload API

brittle pasture
#

and 99.9% of people is on nexus anyway

next plaza
normal panther
#

because these are the exact type of mods I'm looking to make

tender bloom
#

Other than Spenny, of course

next plaza
#

You can see the random error generator in action here. (For those who haven't seen the glory of pathoscat.mp4)
https://www.youtube.com/watch?v=m8tTdU-BJ6g

Based on a true story (and totally not from a joke on the stardew valley discord modding community)

Brought to you by a custom mod, and Firefox's "Inspect Element" tool. (Totally didn't skip a step in the repository deletion process out of laziness.)

Definitely didn't take a whole five hours to make (between the mod and the video itself).

Cod...

ā–¶ Play video
tender bloom
#

Who is both perfect and youtubeable

normal panther
#

ok I'm excited, thanks for the warm welcome! Hopefully I can cook something stupid up

next plaza
tiny zealot
next plaza
#

And to be fair moon misadventures original version did have a trailer

brittle pasture
normal panther
#

I can't believe there are so many shitposters in here

#

I'm with family

tender bloom
#

Artifact Spot Duggy is probably my most shitpost-y

tender bloom
#

I just wanted to smack his little face

#

Over and over again every time I find an artifact spot

next plaza
#

(I do have a few mayo mods)

tender bloom
#

Both of those were, uh, phenomena

#

You have an omelet mod

#

I gave you the art for it šŸ˜›

next plaza
#

True, but I don't consider that a joke mod šŸ˜›

tender bloom
#

Whattt

next plaza
normal panther
#

two quick questions:

  • How easy is it to play custom audio from within a mod?
  • Should it be easy enough to get a websocket running from within Stardew?
next plaza
#

even if half the reason I wanted to make the mod was for what happens when you try to get a second one in a day

#
  1. easy
  2. However easy it is in normal C# I guess. I assume there's libraries for that already
normal panther
#

cool

next plaza
#

I'm using external libraries for my code crimes I linked earlier

#

No way was I gonna parse a .gltf myself

brittle pasture
normal panther
#

nice. I use websockets in almost all my mods so good to konw

next plaza
#

Oh, right, I forgot nexus has restrictions on network stuff nowadays

#

Last time I did that was the year stardew came out for the MP mod šŸ˜›

gentle rose
#

is this a deceptive banner ad or a new ā€œfeatureā€? Squint it leads you out of nexus

normal panther
#

I haven't made a stardew "mod" but I recreated the entire intro in HTML/JS so I could replace grandpa's desk letter with whatever horrible messages I wanted

next plaza
#

Gosh dang it this is why I don't hang out here anymore

#

I forgot what I was doing

gentle rose
tiny zealot
#

i really should hang out on here less. discord is the distraction machine

next plaza
#

Crime thread is fine. Programming off topic isn't active enough to be an issue usually

oblique meadow
next plaza
#

Fun mod projects are better

oblique meadow
#

Why not both?

next plaza
#

...because I don't have two brains?

oblique meadow
#

Enough caffeine and anyone can have multiple brains

next plaza
#

Pretty sure that's not how it works

#

And caffeine would actually make me calm down thanks to the magic of gaysparkles ADHD gaysparkles

dusky sail
#

no you just have to drink even more

gentle rose
dusky sail
#

dont listen to how fast your heart is beating thats not important

oblique meadow
gentle rose
#

it claims all keys are given to them by the publishers but I have my questions about how true that is ngl

next plaza
#

Do they have stardew

#

If so I could ask šŸ˜›

urban patrol
#

yeah that popup was offering me like 30c off stardew earlier today

gentle rose
#

even on switch and xbox, according to them

#

they also have a listing for haunted chocolatier claiming it’s coming out in 2025

tiny zealot
#

renowned mod-friendly stardew platforms switch and xbox /j

next plaza
#

Welp, time to poke CA LLC šŸ˜›

#

What's the domain again

gentle rose
next plaza
#

And where do they claim they get keys from publishers

tiny zealot
gentle rose
next plaza
#

Still will point it out (especailly since it says HC 2025)

brittle pasture
#

there are tons of key sellers out there
some of them are allegedly reputable and work directly with publishers/Steam itself for keys
some are, well, black markets that accept keys from anywhere, including from stolen accounts

next plaza
#

(Though I assume the HC thing is definitely not something that anything can be done about)

#

Yeah, it's mainly that people might thing it's authorized based on the terms of use that I wanted to point out

#

Might not be able to do anything, but worth bringing up

next plaza
#

Why would you be seeing ads

next plaza
uncut viper
gentle rose
next plaza
#

Ah

#

Well that's slightly better

#

slightly

gaunt orbit
#

Sadly I have discovered that you cannot in fact use static lambdas for harmony because they do not actually compile to static methods

#

They compile to instance methods on a static singleton with no fields for god-knows-what-reason

#

Hmmm or maybe it's only because they're unnamed

gentle rose
#

singletons make me kind of miss scala. in a stockholm kind of way

next plaza
#

disappears but for real this time

gentle rose
#

I use manual patching because the wiki says to and I always follow the rules (don’t look at my code)

gentle rose
#

casey how are you typing if you disappeared

next plaza
#

(He wrote that back when annotation patching didn’t work cross platform because of monogame/XNA and Stardew assembly name being different)

#

Wellllll

#

My computer is locked

#

And I’m just going to the bathroom before I go to bed

#

And also I’m a ghost I guess

gaunt orbit
# gaunt orbit They compile to instance methods on a static singleton with no fields for god-kn...

Aaaaah interesting. Apparently this is for performance reasons, because delegate... stuff... is built for handling instance methods, and since static methods have no this, the clr has to fuck around with the stack a bit which has a performance penalty that isn't there for instance delegates. So it's computationally cheaper to just load a blank dummy singleton from a static field and ignore it than to use an actual static method

tender bloom
#

huhh i just never learned annotations bc they seem 2 spooky 5 me

next plaza
gaunt orbit
next plaza
#

It’s double static, you see

gaunt orbit
tiny zealot
#

i, too, listened to the wiki when it told me not to use annotations because something something breaking rewriters, but also i just don't like organizing my classes the way that is required for annotations to work

uncut viper
#

i use annotations bc im lazy

gaunt orbit
#

I never read the wiki beyond copy-pasting the manifest template

next plaza
next plaza
gaunt orbit
#

Of course I'm not sure how much wiki there even was when I started

gaunt orbit
tiny zealot
#

i'm a scrub 😌

next plaza
#

Ah, I read ā€œreadā€ as present tense not past tense

#

Curse you English language

#

And now I’m in bed, so actually disappearing for real 100% this time.

(Tragically and heartbreakingly, the cat is not sleeping next to my pillow like normal)

gaunt orbit
#

Yeah I need 2 sleep

woeful lintel
#

Just to be sure, it's not possible to define custom tabs when adding a shop to Data/Shops, right?

#

and does anyone know what would happen if one was to add tabs to a shop that shows a portrait a dialogue? would they overlap?

serene nebula
#

so this might be a bit of a long shot - there is a game called Absolum which uses .xnb files, which i would like to be able to look around in the code of. in researching what a .xnb file is, i found loads of stardew valley resources. all of the guides and programs i tried to use result in the same error: Invalid file magic.

does anyone know what i could be doing wrong, if anything?

i totally understand if this is a bad place to ask!

gentle rose
#

tabs?

woeful lintel
#

btw @gaunt orbit, do you have a link to the code of HHD? I want to look into how stuff is classified in the tabs, for FF compat.

gentle rose
serene nebula
#

there is a demo

woeful lintel
gentle rose
#

I can't remember where you see these other than the catalogue SDVpuffersquee

woeful lintel
#

also dresser

gentle rose
#

ah, I see

gentle rose
woeful lintel
#

I made a data model to add tabs to Storage Furniture made with FF, but I'm thinking about making a separate framework to add tabs to any custom shop (compatible with FF of course)

gentle rose
#

can shops have a mix of furniture and non furniture?

woeful lintel
#

well yeah, you can put anything in a shop

gentle rose
#

so the non furniture would go in the "all" tab only, I'm guessing?

woeful lintel
#

and you can setup a Furniture to open any shop with FF

serene nebula
gentle rose
woeful lintel
#

so the specific tabs of the Furniture Catalogue don't really matter

gentle rose
woeful lintel
#

I'll have to test to see what it looks like when the shop has dialogue, I think they might overlap

gentle rose
#

it would be through content patcher rather than contentpackfor, right?

woeful lintel
#

yup

#

I think I can either make it fit in the ShopData's CustomFields or make a new asset to target.

gentle rose
woeful lintel
#

I'd rather not mess with UI. I started messing with the tabs because I only have to add data in a list for them to show up.

#

anyway, I'll see when it comes to it

gentle rose
#

the portrait placement stuff really isn't that bad tbh

#

especially in the shop menu

woeful lintel
#

omfg ShopMenu.setUpShopOwner and ShopMenu.SetUpShopOwner are different methods...

gentle rose
#

that they are, yes SDVpuffersquee

#

iirc only one of them is really relevant UI wise though

uncut viper
serene nebula
#

sorry i got timed out lol, this is what i see when i try to unpack any .xnb file

#

this says to me that it isn't an xnb file.... but it.... is

uncut viper
#

its expecting the first bytes of the file to be XNB but is getting some different stuff instead

gentle rose
#

that looks to me like it may be encrypted

uncut viper
#

encoded differently maybe or smth since its getting ASCII, or encrypted

gentle rose
#

which makes me wonder if the devs really want you unpacking these files šŸ˜…

serene nebula
#

i mean probably not

gentle rose
serene nebula
#

well thanks for the help!

gentle rose
#

(genuinely asking I never thought to check)

uncut viper
#

iunno

brave fable
#

pretty sure that's what xnb stands for, xna binary

uncut viper
#

who's to say its actually xnb as in Xna Bank file or w/e it is and not just xnb for something else

#

ah i see, the B in XNB stands for A Binary

brave fable
#

if they weren't binary I would've figured you could just unpack them with 7zip or somesuch similar to some other packed formats

dusky sail
#

where i come from we call them 01011000 01001110 01000010 files

gentle rose
#

would different encodings even apply to binary files (again genuinely asking, it's 8am and I haven't slept)

serene nebula
#

tried that, tried changing the file format to .zip too

gentle rose
serene nebula
#

it's worked before

gentle rose
#

on xnb files?

serene nebula
#

no, this is my first time encountering them

woeful lintel
#

best trick in the books to unzip a powerpoint presentation to get the original images/videos

brave fable
#

some microsoft and valve file formats can be unpacked in that manner, but not xnb

gentle rose
#

adobe too iirc

#

I would check the mime type if you haven't yet, and if it doesn't say anything useful then yeah I'm guessing encrypted

serene nebula
#

well the developer is french, so i assume the mime type is authentic?

#

octet-stream šŸ”„

gentle rose
#

oh yeah, then nothing

#

octet stream is just what it says for no info

serene nebula
#

developers protecting their ip 😔

gentle rose
#

I guess you have to wait a day to find out what's in the full game SDVpuffersquee

#

unpacking the xnbs would have only shown you assets anyway, no code

hard fern
#

wouldnt the code be in the dlls

#

(or something)

#

i dunno how games work

woeful lintel
#

yup

woeful lintel
woeful lintel
#

I'm guessing something with reflection

vernal crest
#

This may be a very naive suggestion, but isn't it the same way that you edit a vanilla asset?

woeful lintel
#

well, editing a vanilla asset, I can do var editor = asset.AsDictionary<string, ShopData>().Data;, in this case, I don't have access to the type that would go in the place of ShopData since it's part of the spacecore code

#

Also, I'd want it to make an optional dependency, so it shouldn't be required

vernal crest
#

I thought that since spacecore is loading it into the content pipeline you would be able to edit it like a vanilla dictionary but I guess I did misunderstand, sorry SDVpufferpensive

woeful lintel
#

it would be possible if I had access to the class of what is inside the dictionary I'm trying to edit.

gentle rose
#

I don't think it needs to be the same actual class, just an equivalent model

#

which fields do you need?

#

sorry if my phrasing is off btw my brain is going haywire today

woeful lintel
# gentle rose I don't think it needs to be the same actual class, just an equivalent model

Oh, I didn't know that, I guess I can just copy-paste this then?

    public class ShopExtensionData
    {
        public enum TabType
        {
            None,
            FurnitureCatalogue,
            Catalogue,
            Custom,
        }

        public TabType Tabs { get; set; } = TabType.None;

        public class CustomTab
        {
            public string Id { get; set; }
            public string IconTexture { get; set; }
            public Rectangle IconRect { get; set; }
            public string FilterCondition { get; set; } = "TRUE";
        }
        public List<CustomTab> CustomTabs { get; set; } = new List<CustomTab>();
    }
gentle rose
drowsy pewter
#

events peoples, does running a trigger action during an event actually make it happen in the event, or afterwards? specifically i want to run a meep interaction image

#

hold on meep needs custom fields in a trigger action so it cant be run as a string alone

#

in this case how would I pop up a large image in the middle of the screen? just temporarysprites is the way to go?

gentle rose
#

-# depends, is it a portrait--

drowsy pewter
#

no...

lucid mulch
#

the content pipeline doesn't serialize/deserialize, it just is the type that is loaded

gentle rose
#

ah, I kind of see

#

sort of

lucid mulch
#

when CP EditData makes changes, it (de)serializes the Entries/Fields to the specified type when making edits

gentle rose
#

my bad, Leroy SDVpuffersquee

gentle rose
lucid mulch
#

can just use reflection

gentle rose
#

can't need a hard reference because content patcher can't reference everything

#

sometimes I say sensible things, today just isn't looking like one of those days

lucid mulch
drowsy pewter
#

well im using temporaryanimatedsprite until someone says im wrong

lucid mulch
#

in CP's case its not directly reflection, as it mostly just passes the type down to newtonsoft to do the reflection

#

though the model editor for TargetFields and some other stuff would have some reflection in it iirc

vernal crest
drowsy pewter
#

hahaha

woeful lintel
#

@lucid mulch do you have an example of how I would do this reflextion then? Not sure how to get a handle on the spacecore namespace/class

drowsy pewter
woeful lintel
#

and how do I shove the reflected type into a dictionary to actually edit the asset?

patent lanceBOT
calm nebula
#

(Can you use dynamic)

lucid mulch
#

the least effort way would be to just have the data model you want as a json string, and JsonSerializer.Deserialize(jsonString, Type.GetType("SpaceCore.MySpaceCoreType,SpaceCore"))
and then insert it into the dict like anything else as you can have the variable just be IDictionary

vernal crest
drowsy pewter
#

oh what an interesting approach

#

i may try

#

every time i debug ebi my farmer is shirtless

#

is this normal

vernal crest
#

No lol

drowsy pewter
#

/temporaryAnimatedSprite Cornucopia.CookingRecipes\\RecipeBook\\Delta_Intro 0 0 120 109 9999 0 0 30 9 false false 1 1 1 1 0 0

Hm, my sprite isnt working and theres so many fields I could have messed up (its a 120x109 texture thats already been loaded)

#

I didnt know how to make it not animated so i set 0 for everything

gaunt orbit
vernal crest
#

It looks like you might also have it set to fade instantly

gentle rose
lucid mulch
#

you get given the type in the AssetRequested edit handler

gentle rose
#

can't Leroy do that?

lucid mulch
#

yup

gentle rose
#

oh cool, so don't even need reflection really

lucid mulch
#

the reflection would be used to create a new instance of the type, or letting newtonsoft do it for you

woeful lintel
#

wait, how would you access the type of what is inside the dictionary with that?

gentle rose
woeful lintel
#

I have this for now, haven't tested yet. Really interested about how to get the required type from the asset parameter

string json_string = "{\"Tabs\": \"FurnitureCatalogue\"}";
Type? type = Type.GetType("SpaceCore.VanillaAssetExpansion.ShopExtensionData");
if (type == null) return;
var obj = JsonConvert.DeserializeObject(json_string, type);

var editor = asset.AsDictionary<string, object?>().Data;
foreach (string shop_id in Data.FPack.FPack.AddedCatalogues)
    editor[shop_id] = obj;
gentle rose
woeful lintel
#

yup

else if (e.NameWithoutLocale.IsEquivalentTo("spacechase0.SpaceCore/ShopExtensionData"))
    e.Edit(asset => {
        string json_string = "{\"Tabs\": \"FurnitureCatalogue\"}";
        Type? type = Type.GetType("SpaceCore.VanillaAssetExpansion.ShopExtensionData");
        if (type == null) return;
        var obj = JsonConvert.DeserializeObject(json_string, type);

        var editor = asset.AsDictionary<string, object?>().Data;
        foreach (string shop_id in Data.FPack.FPack.AddedCatalogues)
            editor[shop_id] = obj;
    });
lucid mulch
#

I would just do asset.GetData<IDictionary>() to get a non-generic interface reference to the collection that you can then Add(object key, object? value) into, with the value being a newtonsoft deserialized shopextensiondata

#

though IDictionary also would let you do that foreach loop too

woeful lintel
#

oh, yeah, that make sense

lucid mulch
#

though Type.GetType you probably want to make that assembly qualified (append ,SpaceCore or whatever the assemblyname actually is for it to reliably work cross assembly)

#

I've had poor success for Type.GetType cross-assembly without explicitly specifying the assembly

gentle rose
#

didn't you say the type was also available through the event args?

woeful lintel
#

i'll try both ways

lucid mulch
#

the e.AssetType or whatever it is would be the Dictionary`2<string,[SpaceCore.VanillaAssetExpansion.ShopExtensionData,SpaceCore]>

#

which you can use type methods to extract the generic arguments but #effort

#

I've spent too much time with reflection and the syntax that Type.GetType supports to by hand type that out with the correct syntax to specify assembly qualified generic arguments

woeful lintel
#

ok, AsDictionary<string, object?> causes an error, testing with asset.GetData<IDictionary>() now

#

well, I can't pass IDictionary without the type args...

lucid mulch
#

you can

#

IDictionary and IDictionary<T,U> are different types, you might just need to add a different using

woeful lintel
#

yeah it works! Thanks a lot!!!

drowsy pewter
#

do you have an example on hand for me to check against?

#

is it disappearing instantly?

vernal crest
# drowsy pewter ```/temporaryAnimatedSprite Cornucopia.CookingRecipes\\RecipeBook\\Delta_Intro 0...

Did you try with 0 for the alpha fade? (Just so it does no fading while you're trying to get it to appear) Also I am having a great deal of trouble with the field order but I think you have set the scale to 0 this time. I have an example but it's animated. Hopefully it's still helpful.

temporaryAnimatedSprite TileSheets\\critters 0 192 32 32 1500 2 9999 18 14 false false 1 0.0 1 0 0 0/ -- add squirrel/

drowsy pewter
#

I thought what i have has it as 0 ahahsdhash

#

Maybe i misaligned the fields

vernal crest
#

You have alpha fade set to 2 and scale at 0

drowsy pewter
#

aaaaaaa

vernal crest
#

They are hard to figure out when you have to read them as one long string like this lol

#

I took so long to reply because I had to check it about five times

drowsy pewter
#

ok trying again

#

LMAO it did appear and immediately scalechanged into the sunset

finite ginkgo
#

I'd also (personally) prefer using the flag hold_last_frame (appended at the end of the TAS command) instead of looping it a big number if times

vernal crest
#

Putting all the fields in a spreadsheet with one field per row with a name and then concatenated afterwards would make it easier to figure out, I suspect

#

Ah yeah that's a good idea for a static one Tedi

drowsy pewter
#

yesss got it

#

thank youuu

vernal crest
#

I have never done a static one so I have clearly glossed over that flag many times

drowsy pewter
#

I had her roof tiles on AlwaysFront2 to get in front of this bush that's there in vanilla, but if a player plants a tree near the cart, the layering is ruined. Any ideas for this bush?

#

AlwaysFront2 also makes it so walking under the awning on the side makes it cover you fully, but i can always put something there to block the player if i want to

vernal crest
#

What layer is the bush on?

#

Her cart is so cute!

drowsy pewter
#

It's a terrain feature so I dont know

#

not alwaysfront because planting a tree below it theres no clipping

vernal crest
#

You mean it's from the paths layer?

drowsy pewter
#

yea

tiny zealot
#

what happens if you put your roof on alwaysfront? (is that where it is in the screenshot?)

vernal crest
#

But putting the roof tiles on Front doesn't cover it?

vernal crest
#

My thought is just yeet the paths layer tile

tiny zealot
#

i believe front and alwaysfront use the y coordinate on screen to control order but i'm not sure

drowsy pewter
#

if its on always front its fine with the bush but then it does this if a player puts a tree there

vernal crest
#

Was AlwaysFront the lowest layer you could put it on to cover the bush?

#

As in, Front9 didn't work and neither did AlwaysFront-9?

tiny zealot
#

what about AlwaysFront-1 lol aba same braincell

drowsy pewter
#

I tried Front2, i'll try front9

#

oh

#

no, those options have their respective issues still

vernal crest
#

I return to yeet the bush

drowsy pewter
#

i believe that the bush persists regardless of path layer but i will try

tiny zealot
#

yeah once it's been parsed from the paths layer (on map creation) it's permanent without rtf or other C# fun

finite ginkgo
#

It'd persist on existing saves, gotta use RTF to remove it, but should be fine on new saves

drowsy pewter
#

im trying not to resort to that

vernal crest
#

BETAS lets you yeet mid-save

drowsy pewter
#

Oh good!

vernal crest
#

Nic is using it for something

drowsy pewter
#

that's what i needed

#

if anyone complains about this i'll just tell them to uninstall the mod to fix it

tiny zealot
#

-# invisible tiles on Buildings layer

drowsy pewter
#

i wonder if i should remove and put back the bush every day?

#

like so it's there when she's not visiting

tiny zealot
#

probably courteous to do if you can swing it

drowsy pewter
#

yeah i'll just run the trigger action every morning and put the bush yeeting tile on her cart patch directly

vernal crest
#

And make sure you give her some dialogue about how she's magically able to move the bush away from there so she can park her cart there :P

drowsy pewter
#

hahaha

#

in my mind her cart is narrow enough that its just blocking the bush from view

#

sadly the bush does not agree

finite ginkgo
#

I'm almost certain resetting the terrain features daily would cause the cindersap trees to regrow instantly overnight rather than the course of a few days, which you can either consider a bug, or spin it into a nice QOL feature

drowsy pewter
#

ahhh ok so the betas feature clears bushes from a specific spot, not resets it based on map data

finite ginkgo
#

Oh is it spot specific?

drowsy pewter
#

bush is getting yeeted into nonexistence

#

yeah its nice

finite ginkgo
#

Nice

drowsy pewter
#

no need to touch the whole map

#

can i do a map patch during an event? If I want to remove a specific tile (not a terrain feature)

vernal crest
#

You can use changeMapTile to remove a tile I think

drowsy pewter
#

Nice

vernal crest
#

Ah no you want removeTile to remove it

drowsy pewter
#

I'm being yanked around..

vernal crest
#

I apologise for not having every event command memorised SDVpufferpensive

drowsy pewter
#

Hahahaha

#

I call upon the event master and the event master responds "...idk"

vernal crest
#

I see no event masters here

calm nebula
#

You're the event master

lucid mulch
#

I just look at ilspy for the given event commands

#

How to actually chain them together to get a desired outcome, no clue. But can tell you what each command individually does well

finite ginkgo
#

(just in case this is unwanted behaviour, note on removeTile: the tiles you remove with it will remain gone even after the event until the next time the map is invalidated)

lucid mulch
#

Unless it was a temporary map

#

Or is town and you leave and come back

finite ginkgo
#

Wonder why the town has special behavior here, not curious enough to look into it

drowsy pewter
#

when is the next time map is invalidated

#

will it come back the next day

lucid mulch
#

Town has old code that predated some of the more modern map modification systems to power cc/joja and pam house.
And maybe just being a large map idk but it runs in its own content manager that disposes whenever you leave the map

#

Farmhouse also has its own, but doesn't explicitly dispose when leaving, but I think part of that is so cabins/farmhouse don't mutate each other's layers

gentle rose
lucid mulch
#

SpeedySolutions prevents town from being special with seemingly no consequences except splitscreen users lose the bottom half of Pam's house as it somehow applies the edit twice

lucid mulch
vernal crest
#

I wonder if you can use changeMapTile to add it back at the end of the event

drowsy pewter
#

does content patcher not invalidate it every day

#

im fine if it just comes back the next day

lucid mulch
#

Content patcher only invalidates if its state has changed so it wants different behaviour to happen from what it previously wanted

finite ginkgo
#

You can cheese it with a conditional patch on the location that does a non player visible edit

drowsy pewter
#

there already is, since her cart, which is a map patch, appears and disappears every friday and sunday

#

so i think that would handle it

lucid mulch
#

Though you would be adding lag every day when you could cleanup after yourself in the event itself

finite ginkgo
#

Could you cleanup? Not sure there's an event command to reverse removeTile or to add new ones

lucid mulch
#

I would only advocate for non-visible changes forcing invalidation in places where you were changing a different asset anyway and it just doesn't propagate as intended, like spouseRooms.
(And would do it with a dummy map property)

vernal crest
#

If you can't add it back in with changeMapTiles, I'd try using changeMapTiles to set it to an invisible tile and then back again.

drowsy pewter
#

I'm going to be real I dont understand what is being talked about given the terminology about game asset handling, so I'm going to assume that leaving it alone is fine since nobody is yelling at me about it directly

#

I don't mind if the tile returns or not right after the event, as long as it's not permanently gone for the rest of the game

finite ginkgo
#

ChangeMapTiles can only change tiles that exist so it can't add in new tiles,

But in any case, the Cart patch should be enough to cover this scenario anyways

drowsy pewter
#

thanks tedi SDVpufferowo

hard fern
#

a

#

i was gonna answer that question SDVpufferwaaah

#

but it just got deleted

wind berry
#

haha let me put it back in case someone else has one in the future

Where do I find the file that controls a single seed type that outputs multiple colors? Like Blue Jazz or Fairy Rose

hard fern
#

under TintColors

gaunt orbit
wind berry
brittle pasture
#

specifically TintColors

#

oh wait you said that

drowsy pewter
#

just chiming in to mention that its handled by TintColors

soft lance
#

Ahoy everyone!!

Got a quick question, I'm brand new to adding mail to the game, and got two small issues with my letter system

1: Why does the mail send all at once, even on day 1 on a new save file? (Im new, so please dont be too harsh haha)
2: Any other issues I have with it?

oblique meadow
brittle pasture
#

yea you seem to be mixing CP's token names and arithmetic operators into the Condition field

#

if you want to use those it's a different format, but also you don't need them since you can just use GSQs directly

#

follow the formats exactly as specified in the wiki page above

#

and use Condition, not When

oblique meadow
#

So here is an example from my most recent mod where I wanted mail sent when the player got a specific flag:

    "Action": "EditData",
    "Target": "Data/TriggerActions",
                "When":{"FarmType":"Huskyn1nja.SMeadows/SylvanlightMeadows"},
    "Entries": {
        "{{ModId}}_BlackShrineMail": {
            "Id": "{{ModId}}_BlackShrineMail",
            "Trigger": "DayEnding",
            "Condition": "PLAYER_HAS_MAIL Current DLX.Bundles.Huskyn1nja.BlackShrine_Bundle",
            "Action": "AddMail Current {{ModId}}_BlackShrineReward"
        }
    }
},```
#

you really wont use arithmetic operators with CP or GSQ

brittle pasture
#

(tangent but there's also a GSQ for farm type in case you're not aware)

oblique meadow
brittle pasture
#

100% fair reason SDVpufferrad

soft lance
#

Thanks! I'll try this out!!!

soft lance
#

its working now! tyyy

soft lance
oblique meadow
nimble marlin
#

Hi! @rancid musk I hope you're doing well. I'm creating a lot of events with your More Nightly Events mod framework, and I was wondering if it would be possible to allow script events to also have the Output field, just like placement events. This would be extremely useful because it would allow for more interesting script event outcomes. Anyway, thanks for your amazing work!

soft lance
brittle pasture
#

PLAYER_HAS_CAUGHT_FISH gsq

soft lance
soft lance
#

I think the issue as to why its not triggering is DayStarted? I dont know how else youd be able to make it so:

When fish is caught - > Next day you get mail

#

im testing it on basic tuna (vanilla fish) for testing purposes only

calm nebula
#

Use te fish id

#

Not thr internal name

soft lance
#

ohhh

#

okayy

#

odd, after doing it, still nothing

calm nebula
#

Fyi you can use debug gq to check the current stats of gsqs

soft lance
round dock
#

You type that in the smapi console

brittle pasture
#

PLAYER_HAS_CAUGHT_FISH Current (O)130

soft lance
#

now lastly, adding a gift

#

i tried adding with AddItem but that got wanky and didnt attach itself to the mail

autumn tide
#

hellooo! can the {{i18n: _____}} things still work inside a i18n file?

soft lance
soft lance
brittle pasture
soft lance
brittle pasture
#

look at the mail format

soft lance
#

ima try:

"{{ModID}}_TunaCatchLetter": "Ahoy @!^^Congrats on catchin' a Tuna!^^Here's a little something for your efforts!^^%item id 797 1%%[#]Letter from Willy"

brittle pasture
autumn tide
#

uhhh could you maybe send a link explaining that? not entirely sure what an argument is lol

autumn tide
#

ty SDVpufferheart

brittle pasture
#

was finding the link on my phone lol

autumn tide
#

specifically i was thinking i might set up queries in my i18ns and then have the alternative lead to another i18n key, would that work?

#

yayyy okay!

#

tysm SDVpufferheart

verbal narwhal
#

I tried myself at Harmony Sweating

verbal narwhal
#

does this look correct and safe?

#

I'd be very happy about feedback!

brittle pasture
#

I would wrap the riskier external mod patches in try catch blocks just in case they change the signature

urban patrol
#

(if i have that wrong, someone please correct me)

finite ginkgo
#

Looking at the game code for the TAS event command, animation interval, layer depth, alpha fade, scale change, rotation and rotation change are all floats

gentle rose
urban patrol
#

yeah afaik mine never work if i just put 0

#

but layer depth i know works with an int so??

calm nebula
#

That should work fine SDVpufferthinkblob

finite ginkgo
#

0 is definitely acceptable, I have done multiple TASes before with 0 for alpha fade

urban patrol
#

i should test it and see if i can reproduce

#

i might be crazy but i could have sworn it required 0.0

#

temporaryAnimatedSprite Textures\\{{ModId}}_PutridGhost 0 0 16 24 500 4 9999 54 87 false false 3 0.0 1 0 0 0/temporaryAnimatedSprite Textures\\{{ModId}}_PutridGhost 0 0 16 24 500 4 9999 54 93 false false 3 0.0 1 0 0 0/temporaryAnimatedSprite Textures\\{{ModId}}_PutridGhost 0 0 16 24 500 4 9999 55 90 false false 3 0.0 1 0 0 0 -> saving original version here for posterity

#

hmm yeah changing those 0.0s to 0 seems to have had no effect? i guess i am crazy then

#

maybe we've just been using 0.0 for convention

gentle rose
#

I'm guessing the 0.0 thing is because the range for that argument is 0.0 to 1.0? so it's like a reminder of that

#

relevant number of sig figs and all that

urban patrol
#

yeah could be

urban patrol
#

is there a way in CP to easily* evaluate what item a player interacts with a tile with? like how the luau checks what you put into the soup
*easily as in not item by item, but doesn’t leave any possibilities out

#

i may end up writing C# for it anyway but

brittle pasture
#

BETAS has a holding item GSQ

#

though I don't think there's a way to consume that item specifically

lucid iron
urban patrol
#

i’m thinking about an action at a custom festival where you choose an offering of sorts to throw into the fire. i was assuming it would be possible with a trigger action on interaction to play sound, remove item, then evaluate what you threw in to set a CT

#

doesn’t have to be super specific, but people should comment if you threw in trash for example

uncut viper
#

that would need custom C#/a framework

urban patrol
#

alrighty SDVpufferthumbsup

#

i may end up releasing this as a separate mod then since i’m hesitant to potentially break things for my one (1) android player

#

a question in general—how different is it to make a framework vs writing custom C# for personal use? like potentially would it be completely different code to make it a framework?

uncut viper
urban patrol
#

yeah that was poor wording on my part—the extensibility for other modders is what i meant!

#

so that’s good to know it would be accessible to others too

uncut viper
#

the game has registries for tile actions and trigger actions and event commands and whatnot, you just register your handler to them

#

but if all it is is depositing an item and setting a CT, there isnt much extensibility there, its just One Thing and one result

#

so i wouldnt personally define it as a framework

slow basin
#

can you use the config mod to select different spritesheets?

the skin tones of some of the characters im making is ambiguous in canon at best but the fandom has a range of headcanons so id like to make different spritesheets for different skin tones for each of the characters so that people can play the way they want but i was wondering if anyone knew if that was a thing

uncut viper
#

you would use the config option as a config token to determine which Loads/EditImages apply

#

using either When conditions or using the tokens in the file names

urban patrol
#

no i was thinking more broadly of returning an evaluation—maybe categories of excellent/good/neutral/bad/awful? and then i could personally use that rating to set my CT (maybe adding a context tag and checking that?)

verbal narwhal
uncut viper
slow basin
uncut viper
#

event commands, tile actions, trigger actions, etc dont return results

#

(besides "true/false" which is just to tell thegame whether they succeeded)

#

(GSQs obviously return true/false as results, but those just tell whatever they were put on (a shop entry, a trigger action entry, etc) to apply)

urban patrol
#

hmm okay. i mean it doesn’t have to be useful for others, but i did want to explore the possibility in case it would be helpful

uncut viper
#

i am talking about in any case, not just the case of a framework

#

if you want the CT set, you should set it as part of the tile action

#

or event command, or whatever it is

urban patrol
#

tile action yeah

uncut viper
#

if you have a generic DepositItem tile action, then that tile action is what looks at the currently held item and sets the CT accordingly. it does not return "this is an awful item"

verbal narwhal
# slow basin All CP so far

Ah ok! It took me probably too long but I figured out how to do this for my weird mess where the c# mod provides the config menu and cp swaps out/patches the spritesheet

slow basin
#

:0

urban patrol
#

okay so there can’t be a middle step? i was hoping to avoid having to check every single item

uncut viper
#

you dont. your tile action handler looks at the players current item and figurs out what it is at runtime

#

the only thing that happens when you click on a tile action tile is that you are telling the game to do something. your CP code does not wait for a result and it cannot know anything about what the tile action does besides whether it succeeded or failed

#

the tile action cannot directly talk back after it is activated

worldly wadi
#

Heyyy guys so as some ppl may know, I’m making an expansion mod that adds many things.
So, yeah, there’s many things I need to do, and I’m starting to get exhausted and the mod might take a bit longer to release (I have psychological issues that influence that, but that’s a private matter.)

Many ppl are helping me in many matters, but there’s still many things to do, I just wanted to say that, if you’re also interested in helping, I would be reeeeeaaaaally happy :D Can be with art, tips, coding or anything you want.

gaunt orbit
#

I mean, as long as it's not anything super crazy

soft lance
#

ofc rn im busy but whenever i got the spare time i can 100% help

worldly wadi
#

Tyyyyy everyone!!!

verbal narwhal
autumn tide
#

helloo! so for i18ns, should there be a space or no space? example:
1: {{i18n: exampletext}}
2: {{i18n:exampletext}}

#

or does it not matter?

uncut viper
#

it doesnt matter

autumn tide
#

YAY

#

okay ty SDVpufferheart

verbal narwhal
autumn tide
#

tryna make a question with like 3 layers(?? idk how else to put it) of i18n and I AM LOSING MY MINDDD /j

verbal narwhal
autumn tide
#

uhhh idek how I'd describe it, but i'll send a screenshot of my wip code-

#

SDVpufferwaaah
(deleted an attached photo that had a mistake lol)

#

whoop i just noticed a mistake

#

okayy there we are

#

yeah im losing my mind just a little

#

a tad

#

a smidgen of insanity

verbal narwhal
#

so you are asking how to display a reaction after a response was chosen for 3 different possible responses?

autumn tide
#

oh nah, just venting lol

verbal narwhal
#

i dont think I understand your question q.q

#

but I am also bad in communication thumbs

autumn tide
#

it wasn't a question haha, i was just complaining about my code lmao

verbal narwhal
#

ah! :D

autumn tide
patent lanceBOT
karmic gust
#

I'm trying to use a GSQ as a precondition for an event, specifically IS_COMMUNITY_CENTER_COMPLETE. In my testing I noticed that it requires ! in front if I want it to check for the community center to be complete, rather than that checking if it hadn't been completed like I thought it would. I just want to double check that that's the correct format for checking if the CC has been completed

hallow prism
#

it sounds strange

#

someone with code can confirm possibly, but it sounds counter intuitive

brittle pasture
#

can you post your code

uncut viper
#

do you also have the JojaMember mail flag at the same time?

karmic gust
#

oh and no, I didn't set the Joja mail flag

uncut viper
#

the GSQ checks for all the CC flags (ccBoilerRoom, ccCraftsRoom, etc) and not having the JojaMember flag

#

if you have all of the CC flags and it still requires the !, that means you have the JojaMember flag. if you're 100% sure you dont have the JojaMember flag, then you dont have all the CC flags

karmic gust
#

I was testing in a new save and had used the debug completecc command

#

does the debug command not add all of the flags?

royal stump
#

the flags in that should cover them all, assuming you weren't a joja member already, but I'm not sure when events actually run GSQs offhand, you could try sleeping before testing the events

karmic gust
#

okay, I'll go ahead and try that

uncut viper
#

the events are checked when you enter a location

sullen rain
#

Hey guys, so this is my NPC's schedule. Very simple

#

"spring": "610 Town 12 57 0/1030 SeedShop 17 28 2/1400 Town 74 75 1/1700 Mountain 58 25 1/2000 ArcheologyHouse 6 17 1",

karmic gust
#

okay I just started a new save, used the debug completecc command, slept, saw the cc completion event, slept, and the event still began

sullen rain
#

But he's wandering into the clinic from the side when he should be going to Pierre's, and then he's just stuck in the clinic's entrance the rest of the day

#

How do I fix his pathing?

autumn tide
sullen rain
#

Aw ty ā˜ŗļø

karmic gust
ocean sailBOT
#

Log Info: SMAPI 4.3.2 with SDV 1.6.15 build 24356 on Unix 6.16.4.114, with 7 C# mods and 3 content packs.

hard fern
#

and im not sure why either

karmic gust
#

actually I'm sorry, I just realize I had left the GSQ without the !, sleeping has fixed it

hard fern
sullen rain
#

Mm lemme see

faint ingot
#

Question - I have a need to increase the size of a custom map. However, doing so will then put trees and such in the wrong place for existing saves. Is there a way around this?

#

other than using new map names I guess?

brittle pasture
#

BETAS have an action for resetting trees and bushes

royal stump
hard fern
#

that one does still work

brittle pasture
#

yeah RTF still works, doing it in BETAS just mean you don't have to tell users to run the terrain reset

faint ingot
#

OK I'll think about those options thank you

#

Also vague question for Esca since you're here, I have had a few users report I have no monsters in one of my FTM locations, is there a common reason for this to happen? They have not supplied logs.

sullen rain
royal stump
urban patrol
royal stump
#

technically users can limit FTM monsters per area in their config.json, but I doubt they'd set it to 0

sullen rain
urban patrol
#

did you sleep after changing it

sullen rain
#

Oh

#

No I didn't

hallow prism
#

Do you test on a limited mod set up or on a normal full modded save?

sullen rain
#

Full modded

hallow prism
#

If sleeping doesnt solve the issue try with just your mod and what is needed to make it work

#

Just in case a mod adds a warp somewhere that cause weird issue

urban patrol
#

unless you're specifically testing compatibility in general i recommend testing with a limited number of mods (your mod + dependencies + modding tools like debug mode)

faint ingot
royal stump
#

SDVpufferthumbsup if someone provides a log, I can always check it out if you @ me with it
the trace messages should say why each spawn area is disabled, condition-wise, though it's less clear if FTM sees no valid tiles or some such

hallow prism
#

I do usually test things with all mods but when facing weird issues trying with limited set up is great

faint ingot
sullen rain
#

Rrgh sleeping didn't fix it

karmic gust
#

Does the NPC have enough time between going to their first schedule point and the second?

sullen rain
#

I would think so, the first point is 610 the second is 1030

karmic gust
#

If they're spawning in a map far from town maybe they aren't reaching the spot before the 1030 scheduled location

sullen rain
#

He's right at the town entrance

#

Going to Pierre's

faint ingot
#

That's his base schedule or you're doing an edit to an existing schedule based on conditions?

sullen rain
#

That's his base schedule

#

No conditions

urban patrol
#

what is his spawn set to in his data/characters entry

#

if it's still Town 12 57 it'll be the same issue as before

sullen rain
#

Uh

#

He doesn't have one

#

He spawns in the circle in the plaza

urban patrol
#

does he successfully path to Town 13 53 starting at 0610?

sullen rain
#

Yes

urban patrol
#

without walking through buildings etc?

sullen rain
#

Yes

urban patrol
#

and it's the exact same behavior on a minimal modpack?

sullen rain
#

I'm about to test that

#

Yep he's still doing it

urban patrol
#

did you test on a new save after removing mods

sullen rain
#

Yes

urban patrol
#

hmmm

#

can he successfully path to a different tile in SeedShop?

sullen rain
#

Nope

#

He's going straight from his first point into the clinic instead of the SeedShop

urban patrol
#

you tried another tile? what about trying changing the time from 1030 to later

sullen rain
#

I'll try both of those

patent lanceBOT
urban patrol
#

also as always make sure to patch reload + sleep or new save between every thing you change

sullen rain
#

Okay so I changed it to 1200 instead of 1030 and he's still doing it

#

Also he's not actually moving til the time hits, is he supposed to start moving before then so he's AT the SeedShop BY 1200?

karmic gust
#

You have to put an a before a time to indicate arrival time

#

Like a1030 to arrive by 10:30

#

If you set up a home location for him in data/characters does it still happen?

sullen rain
#

I'm gonna try that next

latent mauve
#

make sure you're sleeping every time you change the schedule

#

and the Home in this case

sullen rain
#

Got it

urban patrol
#

can you send your current schedule to me so i can test something myself?

verbal narwhal
#

@hallow prism just a quick heads-up: your mod Toddlers like parents always flew under my radar because it doesnt have the "works with 1.6" tag on nexus
||and it looks amazing SDVpufferheart ||

sullen rain
prisma elbow
#

Does anyone know the easiest way to get the numbers for each spot to create NPC schedule

urban patrol
#

open the relevant maps in Tiled

prisma elbow
#

ok

urban patrol
#

hover the mouse over the tile you want and look for the coordinates displayed in the bottom left

prisma elbow
#

thank you for helping

verbal narwhal
#

would you say a mod that either
a) leaves the havebabyquestion unchanged
b) allows changing it to "Should we try for a baby?" or "Do you want to try for a baby?"
c) allows for entering a custom question

should be flagged as nsfw?

and if you think that yes, would you say removing the option for a custom question make it sfw?
I do not want to make an "officially nsfw" mod

urban patrol
#

not in my opinion. babies are a fact of life, it's not like you're adding a cutscene of "trying for a baby" or anything

#

if someone wants to input their own text that's on them

verbal narwhal
#

thanks!

sullen rain
#

Okay yeah so I ended up kinda rebuilding him with Miss Coriel's NPC creator and his pathing is working now, I added a home tile and adjusted the schedule a bit

#

Now his sprites are being weird but that's a lot easier to figure out

#

Thanks for the help guys!

near island
#

Does anyone know if Love of Cooking intentionally disables "poisonous" foods? Like Pufferfish and Sap and whatnow. I'm working on debuffs/detrimental stuff for my Joja shenanigans, and I couldn't figure out why they weren't damaging me. Turns out it was LoC and I'm trying to figure out if it's just a conflict on my end somehow.

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

sullen rain
#

Ah okay

drifting flame
#

i spent about an hour figuring out scale up to add this unnecessarily high res painting of my dog to the game

uncut viper
#

this is what modding is made for

faint ingot
#

I may or may not have added my dog to my mod...

#

You be the judge

crude niche
#

im trying to get iron pyth Mono.Cecil.AssemblyResolutionException: Failed to resolve assembly: 'IronPython, Version=3.4.2.0, Culture=neutral, PublicKeyToken=7f709c5b713576e1'
on to work in my mod i get this error

#

python

#

heres my code

#
using Microsoft.Scripting.Hosting;
using StardewModdingAPI;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
using IronPython.Hosting;
using StardewValley;

namespace pythonmod
{
    internal sealed class ModEntry : Mod
    {
        /*********
        ** Public methods
        *********/
        /// <summary>The mod entry point, called after the mod is first loaded.</summary>
        /// <param name="helper">Provides simplified APIs for writing mods.</param>
        public override void Entry(IModHelper helper)
        {
            ScriptEngine engine = IronPython.Hosting.Python.CreateEngine();
            ScriptScope scope = engine.CreateScope();
            string currentUser = Environment.UserName;
            string[] files = Directory.GetFiles($"C:/Users/{currentUser}/StardewValleyPyMods/*.py");
            foreach (string file in files)
            {
                try
                {
                    engine.ExecuteFile(file, scope);
                    // FIX: Use scope to get the variable, not engine
                    dynamic entryFunc = scope.GetVariable("Entry");
                    entryFunc(helper);
                    this.Monitor.Log($"Successfully loaded {Path.GetFileName(file)}", LogLevel.Info);
                }
                catch (Exception ex)
                {
                    this.Monitor.Log($"Failed to load {Path.GetFileName(file)}: {ex.Message}", LogLevel.Error);
                }
            }
        }
    }
}```
#

i dont know csharp so i was trying to make mods in python

tiny zealot
#

i recommend learning C# instead

brittle pasture
#

are you trying to write a python API to interface with the engine

lucid mulch
#

your life is going to be miserable inside python.
there is a reason I delibrately never released my mod that allowed python modding

#

but to answer your actual problem, you need to add a flag in the csproj to have the IronPython dll correctly copied to the mod folder/zip

#

inside a PropertyGroup block

<BundleExtraAssemblies>ThirdParty, System</BundleExtraAssemblies>         <IgnoreModFilePaths>System.Configuration.ConfigurationManager.dll,System.Security.Permissions.dll</IgnoreModFilePaths>
lucid mulch
tender bloom
#

i feel like there are 2 options for why you'd be trying to make mods in python:

  • you don't know any C# and you don't think you can learn any, in which case trying to fumble through making python work will probably not be fun
  • chaos monster (you do you)
lucid mulch
#

even writing like a minimal "hello world" python mod, I had to effectively write it in C# first to know what to 1:1 port to have it run as python

tender bloom
#

if you can program in python it should not be too difficult to learn C#

#

and there are guides on the wiki

#

that take you step by step on how to compile C# mods, which is the main "annoying" difference w python imo

opal hull
#

So I'm making a little personal content pack for Farmer Portraits for mine and my wife's split-screen co-op farm using our player names (and also trying to do season, weather, and location-specific stuff with various tokens). I saw that the Farmer Portraits 1.6 mod allows for reaction images based on the emotions of the NPC being spoken to, and was wondering if there were tokens I could use to achieve the same effect with my Farmer Portraits content pack? I tried poking around some mod files as well as the modding wiki, but idk if I'm not finding anything because it just doesn't exist or because I'm too dense lol

tender bloom
#

the problem with the tokens you want is that they are there and gone in an instant, right, since the dialogue screen comes and goes super fast. while it's definitely possible they exist in a mod somewhere it would have to be done in C# because CP does not have the update rates needed

#

I'm a bit confused because you mention Farmer Portraits having them but also not?

#

but I'm not super familiar w Farmer Portraits

crude niche
#

doing it for fun really

opal hull
# tender bloom the problem with the tokens you want is that they are there and gone in an insta...

Gotcha! Thanks for the clarification. And I'm talking about the two different versions that are up on Nexus. There's "Farmer Portraits" as well as "Farmer Portraits for 1.6". The former has been updated more recently, and is the one that allows the portraits to be based on player name and thus be split-screen co-op compatible. Whereas the other one allows for "reactions," but doesn't work with split-screen co-op as far as I can tell. So I was wishing I could combine the two lol.

tender bloom
#

with enough C#, you certainly could

#

looks like one is misty and the other is aedenthorn

#

aedenthorn open source licenses all their code, so this is actually possible

#

i think they came back recently? which is i assume why farmer portraits got the more recent update

#

you could either ask them nicely if it would be feasible to combine them, or you could try messing around with the code yourself and send a PR

urban patrol
#

@uncut viper i have a question about BETAS! i've written a trigger action to regenerate terrain when my map edit is not being applied. i think i've misunderstood how it works, though; it seems to have doubled the bush. do i want to couple this with another trigger action to clear terrain features just before my trigger action to regenerate them?

#

or am i misusing it entirely, and need to do something else?

uncut viper
urban patrol
#

sounds good! do i need to do anything special to make sure it runs before the regeneration, or is simply putting that patch first in my json enough?

uncut viper
#

Data/TriggerActions is an ordered list, so the order in which you add the entries matters

#

first one added is first one run

#

same with the actions in the Actions list of the trigger action entry

urban patrol
#

oh wait yeah i can just do multiple actions with one traction

verbal narwhal
#

I will go to bed now but maybe my latest try at including compat patches will bring someone joy

urban patrol
#

so many froge...

urban patrol
hard fern
#

i hope sam likes frogs.

uncut viper
#

because the game has a built in method called loadPathsLayerObjectsInArea(x, y, width, height)

#

and was added much later in BETAS

urban patrol
#

interesting!

dapper dock
#

I am making a content pack for Advanced Melee Framework. One of the weapons I have is a Hammer [Classified as Club by SDV]. Whenever I try to add a right-click skill for the Hammer, its smash attack animation gets overwritten and does not play at all. Is there a way to prevent this from happening? I want the normal smask attack animationto play, then have the projectile get launched.

urban patrol
#

https://smapi.io/json/content-patcher/fbe0b37cf9bf408a88cc4f031b3ff646 hmm i'm seeing that the bush is fine on day 1, but then day 2 appears to be duplicated. this is part of an include which is gated behind this query, if that matters: "When": { // default "Query: ({{TNT_Location |contains=AutoDetect}} AND NOT {{HasMod |contains=FoodTruck.8BitAlien}}) OR {{TNT_Location |contains=TownSquare}}": true, } },

#

i made sure to test it on a fresh save

crude niche
#

@lucid mulch im guessing <IgnoreModFilePaths>System.Configuration.ConfigurationManager.dll,System.Security.Permissions.dll</IgnoreModFilePaths> ingores that dll but its not happening im getting a error envolving System.Configuration.ConfigurationManager.dll

#

Mono.Cecil.AssemblyResolutionException: Failed to resolve assembly: 'System.Configuration.ConfigurationManager, Version=6.0.0.0,

vernal crest
#

@inland rain I'm converting a mod to Custom Mounts and it's very cool, thank you! Unfortunately, I have run into a slight issue with translation: because the Stable field for the mount takes the building name rather than its ID, I can't allow the name to be translated into other languages without losing the connection between the mount and its stable (building the stable spawns a vanilla mount instead). Is there any way to let the Stable field use the building's ID instead/as well?

inland rain
#

buildings have IDs?

vernal crest
#

Well, they don't have an ID field but in Data/Buildings they're listed like this so I was taking that to be an ID

#

(The Stable bit, not the Name)

#

Dictionary key, I guess?

inland rain
#

okay, the problem is getting the key from just the building... lemme see

vernal crest
#

Thanks for having a look at it. If it's not going to work I'll just make a note on the mod page that the building name has to be English.

inland rain
#

oh yeah it's buildingtype I should be using

#

not name

urban patrol
#

i have two questions about the wiki:

  1. can/should i remove Content/ from this? i don't recall any other parts of the wiki having that, and it confused me into thinking my target might need to be Content/Data/Festivals/myfestivaldate
  2. can/should i add a note somewhere that a mod wishing to add a custom festival needs to also edit Data/Festivals/FestivalDates in order for it to work?
tender bloom
#

i would go for it

#

Just add a sentence at the end "also there's FestivalDates"

#

phrased better tho

vernal crest
#

(If you feel like adding the current festival data for fall27 while you're at it, I see that's currently 1.5.4 so it's a bit old. No pressure though)

urban patrol
#

sure! do i just copy paste directly from the unpacked file?

vernal crest
vernal crest
inland rain
vernal crest
brittle pasture
#

whoops beaten

#

yeah I downloaded the code, it definitely breaks them

inland rain
brittle pasture
#

speed x2

vernal crest
#

Wizardry

inland rain
#

just don't test your code, is my motto

vernal crest
# urban patrol :'(

Ah, of course. Babby wiki editor. That's okay, don't stress about updating the raw file. Just do the little edits you initially intended.

urban patrol
#

okay

crude niche
#

where do i put <IgnoreModFilePaths> again?

brittle pasture
#

yeah it kinda sucks, you can't make edits above a certain size or include any external links

vernal crest
#

I can do the raw file edit if you already have it ready to go

#

I think I'm allowed now

urban patrol
#

yeah, how do you want me to get it to you?

brittle pasture
vernal crest
#

Up to you, if you want to bung it in a file and send it over might be easiest

brittle pasture
vernal crest
#

Okay I'll add the relevant bit in when you are done with your edit, so let me know :)

crude niche
#
[23:15:14 TRACE SMAPI]         (Error: System.Exception: Rewriting Microsoft.Scripting.dll failed.
 ---> Mono.Cecil.AssemblyResolutionException: Failed to resolve assembly: 'System.Configuration.ConfigurationManager, Version=6.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'
``` im lost
urban patrol
#

if someone can better explain what Data/FestivalDates actually DOES be my guest; i only mentioned it existed and mod authors should add an entry for a custom festival

brittle pasture
#

(though you may want to ping sinz for help once you do, I'm not very familiar with this stuff lol)

vernal crest
#

Hooray, German Enchanted Grove!

crude niche
#

  <PropertyGroup>
    <TargetFramework>net6.0</TargetFramework>
    <ImplicitUsings>enable</ImplicitUsings>
    <Nullable>enable</Nullable>
    <BundleExtraAssemblies>ThirdParty, System</BundleExtraAssemblies>
    <IgnoreModFilePaths>System.Configuration.ConfigurationManager.dll, System.Security.Permissions.dll</IgnoreModFilePaths>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="IronPython" Version="3.4.2" />
    <PackageReference Include="IronPython.StdLib" Version="3.4.2" />
    <PackageReference Include="Pathoschild.Stardew.ModBuildConfig" Version="4.4.0" />
    
  </ItemGroup>

</Project>
``` i already pinged lol i cant do it again
uncut viper
brittle pasture
lucid mulch
#

you might get away without the IgnoreModFilePaths at all then, my smapi install has had a bunch of extra schenanigns in it so I might have just inherited weird stuff

urban patrol
lucid mulch
#

as my smapi-internal folder has both of those dll's in it

crude niche
#

ill try it

urban patrol
uncut viper
urban patrol
#

it's my mod, dependencies, and some QOL C# mods. i can try removing everything but the absolute bare necessities

uncut viper
#

does it happen if you just do Spiderbuttons.BETAS_ClearTerrainFeatures Town with no further arguments?

urban patrol
#

let me try that

uncut viper
#

actually, scratch that, it checks if there's a terrain feature in the GameLocation's terrainFeatures dictionary, and if not, it adds the bush to its largeTerrainFeatures list...

urban patrol
uncut viper
#

thats with you just clearing the entire town?

#

on a fresh save?

urban patrol
#

yep:

        // untested
        "Action": "EditData",
        "Target": "Data/TriggerActions",
        "Entries": {
            "{{ModId}}_TerrainReset_TNT": {
                "Id": "{{ModId}}_TerrainReset_TNT",
                "Trigger": "DayStarted",
                "Condition": true,
                "MarkActionApplied": false,
                "Actions": [
                    "Spiderbuttons.BETAS_ClearTerrainFeatures Town",
                    "Spiderbuttons.BETAS_RegeneratePathsLayer Town 9 42 11 11",
                ]
            },
        }
    },```
#

oh not a fresh save, let me do that

#

fresh save, day 1, bush flipping. haven't tested sleeping yet

#

same thing day 2

crude niche
ocean sailBOT
uncut viper
#
if (!this.terrainFeatures.ContainsKey(tile))
{
  this.largeTerrainFeatures.Add(new Bush(tile, 2, this));
}

i dont know this area of the code well enough to know what the reason is that it checks terrainFeatures before adding to largeTerrainFeatures. even though it shouldnt matter here anyway since I clear both with ClearTerrainFeatures..

#

can you try splitting them into two different Data/TriggerActions entries?

urban patrol
#

sure

urban patrol
uncut viper
#

(this is why i will always say people should send their entire jsons and not snippets)

#

(regardless of whether or not they think anything else is relevant)

urban patrol
#

sorry šŸ™ˆ

#

it does appear to work fine with both actions inside one trigger action

uncut viper
#

as in theyre split up now, one trigger action per, or as in theyre both inside a single Data/TriggerActions

urban patrol
#

i have two trigger actions total. one for area #1 and one for area #2. each has two actions: one action to clear and one action to regenerate

vernal crest
uncut viper
#

and it works fine now with no duplicate bushes?

urban patrol
#

yep, no duplicates, no dark shadow, no flipping

uncut viper
#

remind me in 18 hours to add a note to the BETAS docs about clearing before regenerating

patent lanceBOT
#

really spiderbuttons? that's what you need a reminder for? okaaaay (#6899695) (18h | <t:1760052696>)

urban patrol
#

do you want my patch?