#making-mods-general

1 messages · Page 256 of 1

ornate locust
#

ask me how I found out that one on accident

rigid musk
#

if you want to do randomized dialogue for years y1 and y2 alternate with eachother, and you can add the random token thing for it with i18n so what is said can be varied

floral canyon
#

if you put tulip, sunflower and honey into 3 wax stations and then pick up tulip soap, also the rest of the stuff you pick up turns into tulip soaps. but not always

sour sleet
#

Oh? Is this true?

ornate locust
#

Do a Y1 and Y2 placement and they will alternate and if you want a bigger dialog pool, do the random token in the i18n thing, yeha

latent mauve
#

I think festival positions is what breaks if you set _y3, not dialogue? I could be mistaken though

uncut viper
#

well i was asking, as im not 100% sure, but to me it seems like the same problem as like, translating your mail flags

dusk mulch
#

is the totalMoneyGifted Player stat for shops?

uncut viper
#

i dont think any modded NPC without a y[x] variant will be loaded at all if they dont have one with the same key

latent mauve
sour sleet
#

Ah ok. Am I best not including any internal names at all in i18n?

rigid musk
#

To clarify what I meant by random dialogue token thing bc im bad at words:
"QiNutRoom_Mon": "{{i18n:Aos.QiWalnutRoomMonDialogue_{{random:1,2}}|QiPlayerTitle= {{QiPlayerTitle}}}}",
(specifically the _{{random:1,2}}) where, in the i18n, the token would be "Aos.QiWalnutRoomMonDialogue_1" and then "Aos.QiWalnutRoomDialogueMon_2" (and you can have like... as many of those as you want really)

latent mauve
#

Gifting =/= spending

uncut viper
brittle pasture
dusk mulch
uncut viper
#

you can make a custom stat easily

#

just increment the name of your stat

latent mauve
#

You can make a custom one with CP

ornate locust
#

I spent an unfortunate amount of time wondering why everyone vanished on y3 on my SVE patch (which does not use Y3, it does something else and I didn't remember to double check how it worked before testing)

latent mauve
#

^

uncut viper
#

if the stat doesnt exist then it creates one

latent mauve
#

If you use a stat that doesn't exist when incrementing, it makes it

dusk mulch
#

oh

#

This is my conditions entry and it isnt working
"Conditions": "PLAYER_STAT Current {{ModId}}_Unlock 500"

uncut viper
#

its Condition not Conditions

dusk mulch
#

Oh...

#

Still nothin

floral canyon
dusk mulch
#
        {
            "Action": "EditMap",
            "Condition": "PLAYER_STAT Current {{ModId}}_Unlock 500",
            "Target": "Maps/Woods",
            "FromFile": "assets/entry.tmx",
            "ToArea": {
                "X": 7,
                "Y": 0,
                "Width": 4,
                "Height": 4
            },
            "PatchMode": "ReplaceByLayer"
        }

(Partial)

hallow prism
#

what mod are you using to have Condition in a CP edit?

dusk mulch
#

I was told I could. then call the GSQ for PLAYER_STAT as a Condition?

#

I will change it to a when

latent mauve
#

Yeah, it was gonna depend on what you were using it for if it's a Condition or a When

hallow prism
#

GSQ don't work in when unless using a specific mod

latent mauve
#

You'll need to run a Query to use it in a When, IIRC

hallow prism
#

i was answering to Person, it's not as simple as changing it to when

uncut viper
#

there is no player stat token however

latent mauve
#

noted, removed my comment

hallow prism
#

my approach would be to have a trigger setting a flag once the GSQ condition is met

dusk mulch
hallow prism
#

but it's quite advanced CP

latent mauve
#

What kind of patch are you trying to do?

hallow prism
#

maybe you should learn the basics first

latent mauve
#

You mentioned you wanted to set a mailflag or GSQ, but not what kind of patch it was for

tribal ore
#

What happens if you specify both _y1 and _y2 though, when it rolls around to year three? Will the game bounce back and forth?

dusk mulch
tribal ore
#

Or will it be stuck on _y2 forever?

latent mauve
#

Is this a map edit, or an EditData that you're attempting to happen conditionally?

dusk mulch
tribal ore
#

y2 repeats forever?

ornate locust
tribal ore
#

Oh good!

#

That makes things simpler

#

Though flower dance is apparently special in some way

ornate locust
#

It has Y1 and Y2 maps/schedules/etc as well, but there's something about spouse dialog that's odd about it I think?

tribal ore
#

Yeah :(. I got a bug report today for it

latent mauve
dusk mulch
#

So a trigger action in a condition for my GSQ?

latent mauve
#

It's possible we added an extra step doing it this way, but I at least know this will work. >_>

#

If you scroll down under Triggers, you'll see a Leo example

#

Your "Condition" field would be your GSQ instead of the PLAYER_HAS_MAIL

dusk mulch
#

So I would need to make a new trigger action?

latent mauve
#

Yeah.

dusk mulch
#

Fun.

latent mauve
#

Trigger actions aren't hard.

brave fable
#

did you get to the bottom of this? from the sound of things you've updated the mod in-place from 1.5.6->1.6.14. you can see the actual mod file structure on the nexus page with Files > Preview File Contents

#

in any case, there's only 1 set of assets, and all assets are loaded via CP in a way that means anyone can target and edit them if they like

dusk mulch
#

They look to be hard from the surface

fierce vault
#

Hi again. I have another theoretical question about possible mechanics. Can spouse/roommate rooms have a warp inside them utilized as a door on the wall, for example? (I’m not currently making a marriageable npc, I just want to know if it could be done.)

brave fable
#

$action AddItem 300, trigger action expert

floral canyon
#

Does this means i should put "ObjectInternalName": "(O)bb.beesPlus_BFSoap", ? 😅 also I don't know how to target "OutputItem" field? I tried "TargetField": [ "(BC)10", "OutputRules","OutputItem" ], but I guess it's not as simple as that. Thanks a lot for the advice you have given me SDVpufferheart

ornate locust
lucid iron
tribal ore
lucid iron
#

I don't think they use warps

true coyote
tribal ore
#

So I think I need to do some CP trickery

hallow prism
# dusk mulch They look to be hard from the surface

it's normal to be a bit overwhelmed by new stuff and there's a learning curve. Remember to do step by step, do breaks, and focus on stuff you find easier between hard stuff. You don't have to do everything at once

brittle pasture
tribal ore
ornate locust
dusk mulch
tribal ore
hallow prism
#

and look at CP docs/several mods doing stuff like what you want to do, so you can learn by example

fierce vault
brittle pasture
brave fable
brittle pasture
#

OutputRules can have multiple entries, in this case you need to tell it to "target the entry with the Id "Default" in OutputRules

brave fable
#

i'd recommend just using an edit layer rather than manually recolouring every pixel of a hi-def image lol

true coyote
brave fable
#

i sort of followed the style of the vanilla CC bundles page for that, it uses some similar page texture overlay with high sharpening

true coyote
#

I think i started out selecting pixels, got over it cause it was taking forever, then realized im dumb and could just select the cover pixels, invert selection and have all the page stuff highlighted way faster

latent mauve
brave fable
#

ah yeah there's like 5 colours in the actual palette and then a texture overlay that adds 63,535 more lol

dusk mulch
latent mauve
#

No worries, working on these recolors of my mod were draining my sanity, so I needed a break xD

hallow prism
#

recolors can do that, can relate 100%

#

Person, again, don't let your projects overwhelm you, limit them for now while you learn

dusk mulch
brave fable
#

good luck! try not to think about modding too much. your medical license is more important

hallow prism
#

yes of course nothing is more resting than events like that!

dusk mulch
hallow prism
#

you should consider doing your taxes next, it is likely as helpful in term of resting!

true coyote
#

i had an idea for a cute lil garden sign (that would show the crop image on it) that worked like immersive scarecrows that could move in half tile increments for better placement -- and then realized its c# I think cause there was a .dll in the folder for immersive scarecrows :(

#

and yes -- get that medical license. you are smart you are tough and you can do this!

#

woops

#

get that surgery

#

you are BRAVE

#

lol

brave fable
#

i believe in u

lucid iron
#

Hm you can do it with precise furniture right

#

If it is just decoration

dusk mulch
true coyote
lucid iron
#

I dunno if that works on BC tho

true coyote
#

ah no it'll be smol

lucid iron
#

But if u r ok with it lacking the sign features then just make it furniture ez

true coyote
#

I think ill plan out some "rugs/blankets" that i can label as decor so they can be placed outside

#

I wanna go full animal crossing and put blankets everywhere

dusk mulch
latent mauve
#

need to doublecheck the token for HasFlag but it's something along those lines.

dusk mulch
#

I forgot it was a flag...

#

Oops.

#

It is giving me an error saying it needs a player now.
"When": {"HasFlag: currentPlayer {{ModId}}_AreaUnlock":true} I am taking a break so you can fix it if you want, but I need to get ready for surgery

hallow prism
#

Theres a whole wiki with docs for when youll be back

#

And cp docs too

lucid mulch
#

(when doing codeblocks you can do ```json rather than just ``` and it will syntax highlight)

reef kiln
#

Not looking to discuss a specific mod. But do the mods we don't talk about here get DP points on nexus? They always seem to get put in the trending mods for me. Seems like easy DP to make one. Not that I am going to, just an observation.

lucid iron
#

like nsfw stuff?

reef kiln
#

Yup

lucid iron
#

i dont think nexus ban them from DP system?

#

its prob question for their discord server tho

uncut viper
#

(i mean i wouldnt be so sure that we're allowed to just passively discuss them like this either...)

reef kiln
#

Ok

lucid iron
#

making a mod just for big DP is a bit backwards anyways, it's not all that much money by NA standards Dokkan

#

if u r one of the rare ppl who make real money from DP then good for you

uncut viper
#

whats the threshold for 'real money'

lucid iron
#

whatever's a lot of money for you

reef kiln
#

True, I think I have just enough DP to get a copy of stardew if I wanted a 2nd one. Not a ton of money.

lucid iron
#

everyone's situations are different

#

though hm i guess i did assert some kind of "real money" threshold implicitly

uncut viper
#

you did so now you must be the one to decide the treshhold for the entire sdv community

#

no pressure

#

we're all going to judge the answer but no pressure

lucid iron
#

$3.5 USD per month \j

uncut viper
#

i deem that acceptable

lucid iron
#

i was thinking of min wage i feel

#

hence the specification of "NA standards"

rancid musk
#

That would be a lot of DP...

#

I definitely don't get that much. Maybe Casey does? lol

lucid iron
#

does pathos even make that much relative to time spent bolbpopcornhat

#

like if u somehow made a mod in 1hr that got hella popular for arcane reasons then u might be over the threshold

brave fable
rancid musk
#

I appreciate the DP I get, but I definitely don't make mods because of them. I just think modding is fun. The idea of making a living wage off modding is crazy to me.

ivory plume
#

(Last time I calculated it, I think I was making around 5-10 cents per hour from all modding revenue sources.)

uncut viper
reef kiln
#

So not livable then 🤣

brave fable
#

i feel like only foundational frameworks are going to receive enough DP to count as income, otherwise you may as well just redirect it to a charity and feel like you're spending your time for good reason

lucid iron
#

"relative to time spent" is why i said made a mod within 1hr

rancid musk
#

I'm putting all my dp to a new laptop since I have trouble justifying the cost otherwise.

lucid iron
#

a technicality ofc

#

do u have enough now

uncut viper
#

roughly ~600,000 unique downloads required in that hour. good luck

rancid musk
#

Not quite yet. But I'm most of the way there. I should get there this summer.

lucid iron
#

well min wage per hour california is $16.50

#

u just need to make that much in dp

uncut viper
#

so about 1.5 million unique downloads

#

should be easy

tribal ore
#

Found this in Data/ExtraDialogue for Maru. Anyone know if this will work for any marriageable NPC, or if I need to overwrite the two defaults?

,
  "Mines_PlayerKilled_Maru_NotSpouse": "...I found you unconscious in the mines. I was hunting for minerals and I almost stepped on your head!#$b#Be a little more careful next time, o
kay?$s",```
uncut viper
#

(maybe less i am working with slightly dated numbers so)

#

those only work for maru

brave fable
#

player killed maru....

uncut viper
#

i think

#

bc she works there

tribal ore
#

Alright :/

wet folio
#

Hi, I was wondering if someone could help me create a mod-showcase post for SproutSight 🙏 : #modded-stardew message

tribal ore
#

Worth a shot!

lucid iron
#

you have to patch the last one conditionally?

gentle rose
#

tbf, we calculate wage per hour assuming a 40 hour workweek, not a 168 hour work week. So pathos is actually earning a much more reasonable wage of 21-42 cents per hour

tribal ore
#

Yeah, it woudl be a relationship:married kinda thing

gentle rose
#

which is downright lavish!

lucid iron
#

Data\\ExtraDialogue:Mines_PlayerKilled_Spouse_PlayerMale or Data\\ExtraDialogue:Mines_PlayerKilled_Spouse_PlayerFemale

tribal ore
#

Yep. That's what I feared, but I hoped I was wrong

#

Ah well. Not too hard

#

Thanks chu

lucid iron
#

another violently gendered thing

#

iro when are u gonna make the gentle gendering mod that dehardcode all of these

gentle rose
#

one day I will do a solution-wide search for “male” and “female” and dehardcode the whole thing, just you wait

brittle pasture
#

I need that mod last year

#

(my second farmer ever is an OC named Otzi, a genderless snow golem (kinda, the lore™️ is complicated) lmao)
(and another of my OC is going to be a non-binary human)

true coyote
#

bro I hate when stardrop just decides to not load in mods, it randomly just decided its not going to see the mod I made today

lucid iron
#

oh but gnt covers things for farmers right

uncut viper
#

Oh by the way, @ivory plume , do you think it'd be too much to ask if somewhere on the CP docs for tokens it could make clearer that Dynamic Tokens use hashsets (I presume?) and so if you make a dynamic token that is a list, duplicate values will be deleted? someone in my thread and i were very confused for a bit bc they were trying to store RGBA values in a dynamic token and it wasnt working right because e.g. "255, 0, 100, 255" would become just "255, 0, 100" bc the 255 can only be added once, even though it was being added separately from a different token

lucid iron
#

these violent gendered parts are npc

uncut viper
ivory plume
gentle rose
rancid musk
gentle rose
uncut viper
#

(and just tagging @marble verge since you were the one running into the issue, to let you know that its been brought up to Pathos already now)

tiny zealot
#

pretty sure "set" holds the record for highest count of distinct dictionary definitions, and probably also the most space in the book

gentle rose
#

of course they’re distinct, it’s a set—

tiny zealot
#

boo /lh

ivory plume
uncut viper
#

Maybe change "can't have duplicate values" to "will remove extra duplicate values" for a laypersons understanding?

#

otherwise "can't have" might make someone think that if they try it'll break something

#

i know thats not technically accurate to how a set works, its not removing duplicates after the fact or anything, but i dont think most people looking at the token documentation are looking for a precise mathematical definition and just want to know how tokens work in practice

lucid iron
#

do not have duplicate values, even if you specify a value twice

#

like that?

uncut viper
#

that'd also work imo

#

maybe "add" instead of "specify"

#

or "even if the same value is added twice"

#

since it might not be you doing it but another token

lucid iron
#

ah yea

#

that is what happened with the dynamic token huh

uncut viper
#

yep

#

value wasnt specified beforehand cuz it was calculated on the fly from config

ivory plume
#

It might be confusing to talk about 'adding' or 'removing' in the general tokens introduction, before the concept of dynamic tokens is even mentioned. For example, what does it mean to 'remove' a value from a global token?

Maybe something like this?

In practical terms, that just means that they...

  • can't have duplicate values (i.e. each distinct value will appear once in the set);
uncut viper
#

to me that does change it from "things will break" to "this will happen instead if u do it" so i would say that works too

lucid iron
#

so hm does this mean i ought to be making HashSet for my tokens blobcatgooglyblep

#

i did kind of want them to be ordered

uncut viper
#

you can still order them if you want, some tokens already are like ChildNames

ivory plume
#

If you're using the basic API, Content Patcher will convert them into a set automatically. Content Patcher won't deliberately de-order them, but there's no guarantee the order will remain as-is if you perform operations on them (e.g. using {{Merge: x, y}}).

uncut viper
#

wait, what happens if you name both of your children the same thing

lucid iron
#

well you can't

uncut viper
#

oh ok

ivory plume
#

I think the game will rename one of them to make them unique?

lucid iron
#

game appends spaces

uncut viper
#

ive never looked at that part of the code SDVpuffersmile

lucid iron
#

assuming Utility.getAllCharacters returns the other Child at least

grand edge
reef kiln
grand edge
#

i switched to working on paintings in the meantime

reef kiln
#

Sucks, that it still is not working.

grand edge
#

yeah it's weird

uncut viper
#

okay, well, after the childnames thing i was curious, and now i know that if your player name is a comma separated list with duplicate values, and you use the {{PlayerName}} token in a dynamic token, it will fuck up the name

#

same with FarmName

#

with a player name of "true, true" it becomes just "true" inside the Dynamic Token

#

not ever likely to come up with either playername or farmname anyway but fun to know

ivory plume
uncut viper
#

(tho i could see it potentially happening with farmname moreso. like, "Cool, Cool Farm" would just be "Cool")

reef kiln
# grand edge yeah it's weird

I can tell you why it defaults to up.
direction: The direction the player should face when sitting. The possible values are down, left, right, up, or opposite. Any other value defaults to up. Per the wiki.

What I don't know is why your tile property does not work.

lucid iron
#

isnt it a Paths

ivory plume
#

Which tile property?

grand edge
#

i also tried "down"

reef kiln
#

They are trying to get the spouse to stand in the spouse room in a custom location. The location works but the tile property does not

calm nebula
#

Direction feels like it should be capitalized

#

It is case sensitive

grand edge
#

the wiki had it as lowercase

ivory plume
#

That seems incorrect; I see a direction tile property in the movie theater logic, but it's not used anywhere else.

#

(I'll correct the wiki.)

grand edge
#

yeah, the path tile is, but not the property it seems

reef kiln
ivory plume
#

Not that I can see. The game assumes that the NPC will then move after they're spawned.

calm nebula
#

For the spouse room?

#

I vaguely remember it existing

uncut viper
#

the only direction change i can see in spouse room is for Sebastian to look at his frog

grand edge
#

hm

sour sleet
#

I've loaded seasonal tilesheets in and they work great. I'm struggling with how to make these recolour compatible?

uncut viper
#

if theyre loaded in, that is as far as you go for compatibility unless you draw the compat yourself

uncut viper
calm nebula
#

Ah. Huh, okay

uncut viper
#
    else if (r.NextDouble() < 0.45)
    {
        Vector2 spot2 = Utility.PointToVector2(farmHouse.GetSpouseRoomSpot());
        this.setTilePosition((int)spot2.X, (int)spot2.Y);
        this.faceDirection(0);
        this.setSpouseRoomMarriageDialogue();
        if (base.name.Value == "Sebastian" && Game1.netWorldState.Value.hasWorldStateID("sebastianFrog"))
        {
            Point frog_spot = farmHouse.GetSpouseRoomCorner();
            frog_spot.X += 2;
            frog_spot.Y += 5;
            this.setTilePosition(frog_spot);
            this.faceDirection(2);
        }
    }
#

this is the only place SpouseRoomSpot is checked

sour sleet
uncut viper
#

a conditional EditImage

#

or a conditional Load over top of the originals with a priority that is something other than default/Exclusive

sour sleet
#

Ah ok, and would I need to do that with all the seasonal versions?

uncut viper
#

(so, Priority Late)

#

correct

sour sleet
#

Gotcha, thanks Button

ivory plume
#

(Wiki is updated.)

uncut viper
#

"numeric value (default down)" SDVpuffersquee

ivory plume
#

(Technically it's down rather than <samp>down</samp>, i.e. the numeric value for down.)

uncut viper
#

unrelated question, machine working effects are TASs right

ivory plume
#

Yep, I think they're tool-assisted speedruns under the hood.

reef kiln
grand edge
#

maybe he just really loves that axe /j XD

uncut viper
#

do you happen to know which method it is that initially creates that TAS? i need to patch the TAS creation part

ivory plume
#

I assume the NPC moves after they're spawned?

latent mauve
#

I don't know why it put a space in there after the " in the code block

grand edge
tiny zealot
#

my npc faces up when she spawns in her spouse room, but (you activated my trap card) that's what i wanted her to do.
i don't remember if i checked this out before

uncut viper
#

actually wait 0 is down right?

grand edge
#

i think 2 is down

latent mauve
#

0 is up

#

0 up
1 right
2 down
3 left

uncut viper
#

oh 0 is up

ivory plume
uncut viper
#

i will never remember this

brittle pasture
latent mauve
#

neither do I, it's on my builder as a reference for a reason

uncut viper
#

SDVpuffersweats i dont know what to believe about the working effects now

tiny zealot
brittle pasture
#

the bubbles emitting from the keg occasionally is a TAS

uncut viper
#

o-occasionally?

brittle pasture
#

yes, it happens randomly

lucid iron
#

i think the part that fucks me up is that the 0 1 2 3 does not match npc walk cycle sprite order SDVpufferpensive

#

nor is it exactly opposite

brittle pasture
#

some custom machines use frame animations, which actually swap out the machine's tile index

uncut viper
#

to me i just think 0 is down bc facing down is the default to me

#

in my mind

lucid iron
#

working effects is the only place that has data model version of TAS

#

which i have been stealing for stuf

tiny zealot
lucid iron
#

unfortunately for me i thought DRUL is the true one...

latent mauve
#

Hey Pathos, while you're here, is it possible we could get AddNPCWarps in Content Patcher, similar to AddWarps, at some point? So we can not accidentally nuke all existing NPC Warps on the vanilla maps...

tiny zealot
#

that was supposed to include
chu 🤝 ichor
but lol slowmode

lucid iron
#

so i had so many dum switches to convert the URDL cases

#

if it was like, ULDR

#

then i could just go ah its the "Facing"

brittle pasture
uncut viper
lucid iron
#

button wouldnt u want to patch all TAS ctors

lilac wigeon
#

Hey all! Anyone know of a good video tutorial on AT mods? Never made one with AT :)

ivory plume
uncut viper
lucid iron
#

ah i see

#

the machine uses a special static i think

grand edge
uncut viper
#

unfortunately that was the only lead i could think of for the spouse room thing

lucid iron
#

TemporaryAnimatedSprite.CreateFromData

uncut viper
#

oooh that is only used by PlayEffects

lucid iron
#

yea i think so

#

i didnt even use it bc it didnt have enough knobs kyuuchan_run

uncut viper
#

the other one selph mentioned thoug does just make a TAS

#

but if its just the one that should be easy enough to transpile

#

or skip prefix

lucid iron
#

nothing else in vanilla uses this one bc all other TAS things are some kinda string arg

#

or just hardcoding

uncut viper
#

much hardcoding

#

i took a look at the specificTemporarySprite event command and immediately decided that patching every TAS constructor was the way to go instead

lucid iron
#

actually hmmm

uncut viper
#

oh no

lucid iron
#

you dont want to change TAS that came from non map things do you

#

like the crop ghost when u harvest things

uncut viper
#

correct

#

any TAS that is spawned on something i want to not affect

lucid iron
#

how could u possibly tell then

uncut viper
#

which i just expected to need to play patch whack a mole with

#

i could transpile every TAS construction call that has a Vector2 constructor inside of it that doesnt have a ldfld

#

inside the Vector2 construction call space

lucid iron
#

can u patch TemporaryAnimatedSpriteList.Add

uncut viper
#

just simply iterate over ever single function in the StardewValley assembly

#

isnt that just like, List.Add

lucid iron
#

and check if __instance is current location's TemporarySprites

uncut viper
#

oh thats a whole ass class

lucid iron
#

yea

uncut viper
#

wouldnt that not help though

#

bc it 3would still be adding to the current locations temporary sprites even if it was from a crop or a machine right

lucid iron
#

ah yea broadcastSprites adds there sadness

uncut viper
#

for 1.7 i want TemporaryAnimatedSprite to implement IHaveModData pls

#

does the bigCraftable field on TemporaryAnimatedSprite always indicate that its like, from a machine

lucid iron
#

i dont think so

tiny zealot
#

i want many things to implement IHaveModData, the funniest and therefore best interface name in the codebase

lucid iron
#

TemporaryAnimatedSprite.CreateFromData doesn't take SObject machine and it never gets set any other way

uncut viper
#

what in the world is that field for then

lucid iron
#

i think its for drawing a big craftable in a TAS

#

line 1611ish

#

i wonder if TemporaryAnimatedSprite is also a big ol partial in real source code

uncut viper
#

maybe ill just accept that some TAS's will be improperly placed that sounds like a fine solution to me

#

no one would even notice that the crop ghost is gone i bet

lucid iron
#

well, if you do nothing it'll be correct

#

bc it's based on the player's position

#

it was only concern if u aggressively patch every tas ctor

uncut viper
#

im assuming that uses attachedCharacter

#

that seems like it'd still mess up if i moved the actual TAS's position

#

localPosition ? this.Position : Game1.GlobalToLocal(Game1.viewport, this.attachedCharacter.Position + new Vector2((int)this.Position.X + xOffset, (int)this.Position.Y + yOffset))

#

hmm

#

do you think it'd be a good enough heuristic to just. every time a TAS is created, check if its position matches the Tile Coordinates of any character, object, or terrain feature on the map

#

and just not affect it if so

sour sleet
#

SMAPI is stating that the tilesheets don't exist when they definitely do. Any ideas why this is happening?

uncut viper
#

no ideas without a log

lucid iron
#

what happens if i stand on a TAS made on the map then think

sour sleet
#

My custom tilesheets for the recolours

lucid iron
#

the wizard smoke TAS is remade often

latent mauve
#

smapi.io is struggling a little, so log parser may take a few minutes to load currently.

uncut viper
#

i can check attachedCharacter too

#

and just apply the heurstic to objects and terrain features

#

which i think will not move

#

mostly

lucid iron
#

PecoWant better than nothing

uncut viper
#

its better than patching every single TAS edge case

sour sleet
ocean sailBOT
#

Log Info: SMAPI 4.1.10 with SDV 1.6.15 build 24356 on Microsoft Windows 11 Home, with 12 C# mods and 4 content packs.
Suggested fixes: One or more mods are out of date, consider updating them

reef kiln
#

I have a very stange modding question, would it be easy or overly complicated to put the player back into the corner during the flower dance if they dont have a partner. Like it was in 1.5

pine elbow
#

Does anyone know if it is possible to create a C# mod that automatically enters a farm, using join with the Steam invitation code?

uncut viper
sour sleet
#

Oh

uncut viper
#

Recolour vs Recolor

sour sleet
#

I just realised oof

#

Haha thanks

reef kiln
#

The classic British vs American modding error 😇

uncut viper
#

(i use colour but im not british... dont tell anyone)

sour sleet
#

But that's a crime SDVpufferblargh

uncut viper
#

if i ever make a game i cant wait to use Colour and Favourite everywhere to force every modder to conform

tiny zealot
#

"colour" is prettier to me than "color" but i don't have any strong opinions about other intrusive us

pine elbow
#

Does anyone know if smapi has a command that connects to a farm in the coop, using the invitation code?

reef kiln
#

Also, add puzzles that require cultural knowledge and solution that only locals will understand.

uncut viper
#

sometimes i type theatre too but thats not for the same reason thats just bc im an idiot and can never remember which is the right spelling for the place i am currently in

reef kiln
pine elbow
#

Because I'm creating a Custom Loader, which will automate everything, from the creation of the server, to the client, which will automate the mods, for those who create and for those who connect, including the automatic connection of the game.

#

I could even copy the code to the clipboard, but it would be cooler if it automated the connection too, right?

uncut viper
#

to me that sounds like it will need a custom solution. i believe the game has a debug command to connect via IP but i dont believe it works with steam invite codes

#

but i could be wrong

#

theres a wiki page for console commands

lucid iron
#

i dont think it's SMAPI per say take a look at CoopMenu?

#

it uses Program.sdk to do stuff looks like

reef kiln
#

Also, not sure the modding community will appreciate a mod that bypasses the need for each person to download the mods from nexus. And that sounds like what your mod will do. Sorry if I am wrong.

tiny zealot
#

if it requires nexus premium to use nexus's API like stardrop does, then it's probably fine. otherwise it sounds like mod piracy to me

lucid iron
#

would you also be afoul of networking policies on nexusmod

uncut viper
#

that is a good point though, bc it cant do that, bc not every mod is guaranteed to have an update key

lucid iron
#

smapi needed special exempt for it

pine elbow
#

But when people create a server they send a modpack to each other

tiny zealot
#

that is, largely, not how we do things in stardew

reef kiln
lucid iron
#

i dunno if game's gonna like it if you try to send all of SVE over as bytes in mod messages LilyDerp

uncut viper
#

bypassing the mod authors getting their DLs is not something this discord server supports

#

when ive used servers in the past ive either been given or created a nexus collection which i then downloaded from nexus

reef kiln
#

But you are correct people do that, we just don't help them.

lucid iron
#

for minecraft which runs a server the mods just go on the server right think

uncut viper
#

no

lucid iron
#

oh then mc server literally does send mods to clients?

uncut viper
#

also no

pine elbow
#

In fact, there is no way to automate downloads on the Nexus, because it is closed and requires a login.

lucid iron
uncut viper
#

every client downloads the modpack

lucid iron
#

ah is it like built-in version of nexus collections

uncut viper
#

basically yes

lucid iron
#

you can automate downloads from nexus if you have premium

#

just grab the api key

uncut viper
#

^

pine elbow
#

The main objective of my client is to provide security to people by installing an anticheat and checking the client and server mods to avoid problems on the farm.

#

Downloading mods would be a plus if it were possible

tiny zealot
#

all i can really offer re:anticheat is "good luck"

uncut viper
#

it may be possible, but this channel will not help you do it via other means than nexus's api

#

nor do i think a mod piracy enabling mod would be allowed to be posted here once it is finished, either

lucid iron
#

i feel like people just wouldnt join your game?

uncut viper
#

and yeah. there are many many ways someone can bypass a stardew anticheat

lucid iron
#

its not like sdv really lend itself to the mc server kinda MMO experiance

#

personally i think your idea isn't without merit as a mod manager, with the premise of being nexus collection but actually works good for sdv

tiny zealot
#

also, as far as checking mods between players goes, two cakes is a thing but there is already a mod that does that

pine elbow
#

As a mod manager it's working fine

pine elbow
rancid musk
#

Why are people so obsessed with anti cheat in a client authoritative game

uncut viper
#

those can also be bypassed with just a different mod. any client can send fake data to the server

pine elbow
#

But you can encrypt the name of the mods

#

Create an online server that encrypts mod names in real time

rancid musk
#

Doesn't matter.

uncut viper
#

so what? i can download the mod you expect, figure out what the encryption should be, install my fake mod and just fake the encryption i send over

#

your server cannot 100% know what mods i have installed. my client might say i have ModA installed, but it can easily be ModB just telling the client to say its ModA

lucid iron
#

i dont really want to stop anyone from making anything, but i also think you should trust your friends more

pine elbow
#

But tell me one thing, a person with enough knowledge to develop software that will capture my encryption, rewrite the names of mods, will not enter a farm just to mess around... Those who enter games to mess around generally, in most cases, are people without knowledge.

uncut viper
#

or are people who downloaded a cheat mod from someone with the knowledge

#

it also takes about 2 seconds to change the name of a mod that SMAPI sees

pine elbow
#

And the purpose of anticheat is not just to block cheats, but to check if the person has installed all the necessary mods for the farm to work.

#

Because if I put a mod with new plants, new fruits, different maps, the game will be broken if the person doesn't put the mod there.

rancid musk
#

Mod list syncing isn't anti-cheat lol.

#

I'm honestly surprised SMAPI doesn't include it.

reef kiln
#

Cheating in stardew, is not really a thing. It is not a competitive game. You all share the same farm and if one player cheats (when they agreed to not) everyone is going to figure it out pretty quick. What they are saying is SMAPI mods are hard to prevent people that want to from cheating. If you have a way, I am sure no one is going to complain. As long as you are not by passing the current nexus download system.

pine elbow
#

The correct thing would be for smapi to only accept identical modpacks

uncut viper
#

thats not SMAPIs purview

rancid musk
#

Not really.

uncut viper
#

for starters, there are also a fuckton of mods that will work entirely client side that arent cheats

#

see: any recolour, portrait edit, etc

lucid iron
uncut viper
#

its not SMAPI's place to enforce things. its a mod loader

pine elbow
#

It is very difficult to check through this log of this mod

lucid iron
#

yea i think it's good if you want to release this but nice UI

uncut viper
#

(also, again, even if SMAPI did... its open source. someone can fork it and remove the mod list enforcement)

lucid iron
#

n+1 cakes etc

#

but im posting it bc it is open source PecoWant

pine elbow
uncut viper
#

you mean like, most C# modders in this channel?

rancid musk
#

How many fingers do you think I have? Cause I got 10

pine elbow
#

Making a mod for Stardew is one thing, but editing the smapi is much more complicated.

rancid musk
#

It's literally not

uncut viper
#

its literally not. just download it and recompile it with the stuff you dont want commented out

#

i did it in like 5 minutes when tracking down a bug and was able to make a bunch of edits and recompiles to track it down

#

the repo has the sln

pine elbow
#

But my friend, I'm Brazilian, and when I go to play it's usually with people from Brazil, and here there's almost no one who knows how to make mods, there are few of us, there's no one who can edit smapi

uncut viper
#

but there would be people making forks of it for those people to download

reef kiln
lucid iron
#

do you want to make mod that assumes most players are dum blobcatgooglyblep

pine elbow
#

Copying the mods would be a lot of work, it's not worth it

next plaza
uncut viper
#

copying the mods was really the only thing people were taking active issue with. everything else is just trying to emphasize that a true anticheat for stardew is impossible and any attempts to make one are easily bypassed. whether you think people will is one thing, but i wouldnt advertise security when it isnt there

pine elbow
lucid iron
pine elbow
uncut viper
#

creating a virus that can get past a tried and true antivirus is a hell of a lot harder than making a cheat mod for stardew that can bypass any stardew anticheat

#

so no, i dont think they are comparable

uncut viper
#

a dinky bike lock is enough to stop many people from just taking your bike, but i wouldnt call it secure

pine elbow
#

My software won't download

lucid iron
#

why do you need to control the peer connect then

latent mauve
#

Doesn't Stardrop already unzip mods for you?

reef kiln
pine elbow
lucid iron
#

im saying that you don't need to control the actual peer connect action, only listen on the peer connected event (which tells you a new peer connected)

uncut viper
#

them wanting the connection thing wasnt bc they needed to know when to check, that was just bc they thought itd be nice to automate, iirc

lucid iron
#

afterwards you can send mod message

pine elbow
#

I wanted to make the connection automatic so that the person wouldn't have to go through the menus and paste the invitation code there, like the person wouldn't even know what the invitation code was, that was the idea.

#

I was able to send the invitation code to a websocket server, through the server, and I can already get it through my software, the only thing missing is a way to automatically connect using the code received from the websocket, and have Stardew start on the farm in coop.

uncut viper
#

you just need to find where the functionality of that button is and recreate it. but also, have you considered that they will still need to pick their farmer first

pine elbow
#

I think I'll do it using the clipboard, it's less work.

lucid iron
#

do you want to host this server think

#

like, yourself

#

unless there is thing in steamapi for it

pine elbow
#

There are 2 people, A= the server, B = the client.

#

A - Start the farm on host - It has a mod server, which captures the invitation code and sends it to the websocket

B- It has client software, which checks online servers, on websocket And get the invitation code there

#

I managed to do all this

uncut viper
#

(i would also like to re-iterate chu's point from earlier that you do need permission from nexus to post this mod there, if you planned on it.)

lucid iron
#

yea that is why i was ask if this was separate server

pine elbow
#

This mod will not be posted on the nexus, it is part of my software

lucid iron
#

ok sure u good there PecoWant

pine elbow
#

If I had more knowledge, I would make a mod with a menu on the game's home screen, where people could leave their farms online

#

And thus get public invitation code

#

This would be cool to post on nexus

#

?

#

Server Lists Mod

uncut viper
#

any mod that makes any internet connection whatsoever must justify itself to Nexus staff, per its rules

#

whether every mod that does actually asks permission is one thing, but that is what their rules say

#

and its ONLY allowed in cases where such connectivity is required for the mod to fulfill its purpose

pine elbow
#

I understand

#

In fact, they have to preserve security

uncut viper
#

"Files (especially executables) that connect to the internet to download or send information and/or files are prohibited unless where it is crucial for the functioning of the mod/utility. Please note that "auto update" functionality does not qualify as crucial and that we reserve the right to moderate and/or remove any files/tools/utilities/mods that communicate with the internet. If your tool's/app's functionality depends on the ability to send and receive information/files, please contact staff or send an email to support@nexusmods.com laying out your reasoning and providing the source code for your tool/app."

pine elbow
#

Did they give permission for discord rich presence?

uncut viper
#

not a clue

rancid musk
#

Discord rich presence doesn't connect to the internet.

#

It connects to another local process.

lucid iron
#

i did think a within game mod loader for sdv would be cool

#

sadly not all that practical besides literally make your own smapi lol

uncut viper
#

ive also thought about it being cool but you'd miss out on some very important SMAPI events

ivory plume
#

(For the record, SMAPI does have explicit permission from Nexus staff for its Internet-connected features like update alerts.)

pine elbow
#

But without smapi there wouldn't even be a mod

ocean sailBOT
#

@pine elbow You leveled up to Cowpoke. You can now speak in our voice channels and share images in all channels!

rigid musk
uncut viper
#

there are always xnb mods

lucid iron
#

you can use smapi offline

pine elbow
uncut viper
#

far from "wouldnt even be a mod" though.

#

also there are tools for it

#

xnb mods is how SDV modding used to be

hard latch
#

Hello!! I am an amateur when it comes to modding and need to add the "CanSocialize" and "SocialTab" commands to a character mod. Does anyone know which file I am supposed to put that information in?

pine elbow
#

The smapi for android was not put on the nexus, right?

brave fable
#

packing xnb is as easy as unpacking it, people have been doing it for years

#

it's 1 button

reef kiln
uncut viper
#

hi

#

im 1 button

pine elbow
brittle pasture
#

assuming this is editing an existing mod for personal use

reef kiln
#

Correct, it is a hit or miss thing. We tell people with android smapi to download and try it. It will work or it wont. And we refer them to the android smapi discord for help.

hard latch
# brittle pasture assuming this is editing an existing mod for personal use

Yes it is. I made some edits and now I can talk to the character but can't give gifts and they aren't in the social tab 😅 my friend who has an unedited version of the mod can still do all of those things though, so I def just messed up somewhere and thought those two commands would be the easiest way to solve it

#

What would be the best way to figure out where that info is being edited? I only have experience with coding dialogue so idk where the other information is typically found

brittle pasture
#

mod authors can organize their mod in any way they want; your best bet is do a file system search for that string in the mod's directory (idk how to do that on windows)

hard latch
#

Ok! search for the characters string or the two commands I want to add?

brittle pasture
#

search for "Data/Characters", which is where the NPC's disposition data (including their socializability) is written

hard latch
#

Okay!

#

They have a file called "Disposition" - I assume that's probably my best bet of where to write the code? "Data/Characters" yielded no results

uncut viper
#

how old is the mod

#

does it have "Data/NPCDispositions"

hard latch
#

About 11 months I think?

brittle pasture
#

that is slightly after 1.6's release date, hmm

#

well it's still possible they used the old 1.5 method

uncut viper
#

not unlikely its still relying on CP's auto migration

brittle pasture
#

but you can't make antisocial NPCs in 1.5 with CP alone right

brave fable
uncut viper
#

i dont think 1.5 had the socialtab thing either but i could be wrong

brave fable
#

i forget if bash is preinstalled so im not sure which someone's more likely to have installed

#

i'm pretty sure 1.5 still needed NPC Exclusions or Antisocial NPCs

brittle pasture
#

anyway yeah if it's using Data/NPCDispositions and/or NPC Exclusions then that's beyond my knowledge

#

I love drawing (I don't)

hard latch
#

Yeah it is using the NPCDispositions

#

I appreciate you trying to help!

tender bloom
#

There was a whole cluster of frameworks

#

That helped out with basic npc stuff that’s now just CP

hard latch
#

I messed around with some things and was able to figure out the problem! Thanks everyone for trying to assist 🫡 I really appreciate it

lucid iron
teal bridge
brittle pasture
lucid iron
#

if u put them in Metadata then potential building skins support Dokkan

reef kiln
#

Can you plant anything in you hydroponics? Like modded crops too? Or just certain crops. I am excited for your mod.

lucid iron
#

cant wait to plant cactus in there

brittle pasture
#

all crops except for ancient fruit (it's a bunch of garden pots in disguise)

#

I've banned bushes for now

reef kiln
#

That's fine, custom bush work different then normal crops anyway.

reef kiln
reef kiln
brittle pasture
#

it should

reef kiln
#

Cool the mod I use for pots actually allows that, never used them for that. but I know it was in the configs.

brisk wedge
#

Is it better to postfix one class's function and include checks for the subclasses in that postfix, or make a different postfix for each subclass?

brittle pasture
#

the subclasses' overrides may not necessarily call the parent version

brisk wedge
#

oh so when i put a post fix on a parent, the children might not get it?

brittle pasture
#

if they don't call base then nope

brisk wedge
#

oh ok nice seems like what i thought was me being dumb was actually the right thing to do lol

#

hm I really should have committed before doing all of these refactoring changes...

brave fable
earnest moss
#

quick question, but i've updated an old mod of mine and it seems that
ModMessageReceivedEventArgs.FromPlayerID is giving me an invalid player ID
So if i do Farmer farmer = Game1.GetPlayer(FromPlayerID )
farmer is null.
Is that something that deprecated now or what could be causing that issue?

lucid mulch
#

are there mods adding fake farmers present? (like Farmtronics or other things)

#

though I would expect them to have at least been present in Game1.otherFarmers which Game1.GetPlayer() does read

earnest moss
#

negetive im testing my mod practically in isolation it only has GenericModConfigMenu and CheatsMenu as additional mods for testing

sour sleet
#

Is it possible to have water indoors to fish in?

lucid mulch
#

is the submarine technically indoors or outdoors?

brittle pasture
#

yeah it's indoors

sour sleet
#

Hmm I’m not sure

#

Oh good! So it can be done

brave fable
#

sure it's possible, it's done by map properties

brittle pasture
#

it is possible, there's a bunch of farm cave mods with indoor water pools

sour sleet
#

Brilliant

sour sleet
#

Would that go in the map properties within Tiled?

brave fable
#

within or via CP, up to you

fierce vault
#

I’ve heard people talk about getting nice mod ID numbers before or being disappointed at the number they got. What is a 'nice number'?

brave fable
#

if you'd use your mod ID as a volume number on your TV it's a nice number

uncut viper
#

to me a nice number is one i can easily memorize so i can search for when its posted or talked about

brittle pasture
#

Sunberry Village got 11111

#

that's pretty nice

fierce vault
#

Is it dependent on the total number of mods in succession?

rancid musk
#

Hmm my client is laggy as heck I thought my internet was back but like 20 messages loaded after I sent that

rancid musk
vernal crest
# fierce vault Is it dependent on the total number of mods in succession?

It's just based on how many mod pages have been made (including unpublished). So if I make one and then you make one immediately after me you'd get the number after mine.

I personally do not pay any attention to mod page number at all. The only one I could tell you any mod has is SBV and that's only because Selph's message telling me that is right there lol

marble verge
#

Do page numbers get recycled?

uncut viper
#

no

marble verge
#

Hrm

#

Appreciate the poke, by the way 👍

pale pebble
#

@ivory plume Hello! sorry to ping but i was wondering if you knew what was causing this issue?

So when i join my Partners save i can see everything im suppose to see on the Map and Mini Map for the SVE version of the game.

But my Partner Cannot see the same on both map and mini map?

Darker map is his view and lighter map is mine (Its spring in one and summer in the other)

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
#

unless this is a mod you're making

pale pebble
modest dagger
#

If a buff duration is listed as 0 does that just mean there isn't a buff applied or that it lasts the rest of the day

boreal belfry
#

Could some one please some one point me in the direction of how to lear/guide/wiki on how to .TMX? I have the motivation/need to learn how for a small edit that will likely lead to suffering and a larger project. thanks!

vernal crest
#

There are also tutorials on the modding wiki which are still pretty good as far as the mapmaking with Tiled part goes (though they are outdated when it comes to how to get the map in game). I tend to just go to the modding wiki "All Pages" page and then Ctrl+F for "map" https://stardewmodding.wiki.gg/wiki/Special:AllPages

boreal belfry
#

You are the best thank you!

vernal crest
#

You're welcome! You can also learn quite a lot from examining vanilla maps. Make sure you use a copy of a vanilla map as your starting point instead of making a new map from scratch!

boreal belfry
#

I am starting very small! my end goal changing out a shed an existing mod as a personal edit. and if that's too much I'll have to work up to it.

boreal belfry
#

After some poking around I think I actually need to learn tokens first. much to learn

vernal crest
#

Tokenisable strings are a game thing and if you needed to learn those I'd send you the wiki page for them but they're less common than CP tokens.

mint sinew
#

okay chaps so i've managed to get nvm etc all sorted and obtain FS, but when i try to run the code it just eats my png and doesn't put anything in the output folder so i'm likely doing something wrong. Seems to say the conversion type is undefined?

vernal crest
#

What is nvm?

mint sinew
#

squints at chicken scratching something to do with node package manager. Can't exactly remember what

#

ah, node version manager

vernal crest
#

Why are you using that to make a fashion sense pack?

mint sinew
#

i dunno. I was told in the "have these things to make this work" section of the page to install it

vernal crest
#

Can you send me a link to that page?

mint sinew
#

please don't tell me the lovely people here told me to go get myself a nice virus

vernal crest
#

Oh I see, you're trying to run a converter

mint sinew
#

something like that

#

to be honest i don't really know what i'm doing

vernal crest
#

Have you just got the one hairstyle so far?

mint sinew
#

yep

vernal crest
#

Then it'd be much easier for you to just make your FS pack manually

mint sinew
#

...i'm not a coder. But okay SDVpufferthumbsup

vernal crest
#

Don't worry there's no coding involved!

mint sinew
#

wait, don't you have to write the jsons yourself

vernal crest
#

Although it might feel that way lol

#

Yes, but writing json is not coding

mint sinew
#

it sure feels like it 🥲

vernal crest
#

It's just like putting values into a form, only you put the bits of the form in too

#

Although since the FS docs include examples, you mostly won't even have to put the form in. You can just copy the example that's there and then adjust the values to what you need.

mint sinew
#

huh okay

vernal crest
#

Anything where you can't figure out what it's telling you to do, you can ask me :)

mint sinew
#

sweet thanks man!

#

um, has the stardew valley wiki been taken over by hackers

#

because the content pack link does not lead to the stardew wiki

vernal crest
#

No, it's not supposed to

#

It's instructions for how to make a content pack for Fashion Sense which is a framework mod. Information for how to use it doesn't belong on the official wiki.

uncut viper
#

it is linking to the old community wiki

mint sinew
#

huh, well this appears for me

vernal crest
#

Oh the one on the FS page? Sorry yeah that is trying to link to the official wiki but like Button said it's linking to the old one.

#

Go to the link that Button shared instead.

mint sinew
#

ahh

mint sinew
#

hum, so, i've successfully managed to create it, and it says it's loaded and all, but it's not appearing in any of the hairstyles....

vernal crest
#

Do you know how to use Fashion Sense? (Sorry if that is a stupid question)

#

I'm just wondering if maybe you're not using the mirror to look at your fashion sense options and are instead looking at the character creator

mint sinew
#

oh nope i've never used it before lmao i was wondering what that mirror thing was

vernal crest
#

Ok glad I asked then lol

#

Yes the mirror is how you access items added by fashion sense packs

mint sinew
#

noice 👍 okay whew that's good

ionic cliff
#

I can't seem to get the dialogue to work for some reason. Am I missing something?

hard fern
ionic cliff
lucid mulch
#

edits only apply to an asset that something loads

vernal crest
ionic cliff
ionic cliff
#

I did the blank thingy and created a new save and the schedule works now, but the conversation does not pop up.

#

which is kind of hilarious because I was fine with broken schedule rn

vernal crest
#

Have you given your NPC gift tastes?

ionic cliff
vernal crest
# ionic cliff .....no

Try doing that. You can just copy and paste another NPC's actual tastes for now, the important thing is that your NPC has an entry in Data/NPCGiftTastes.

#

NPCs have a sort of minimum threshold of seemingly unnecessary parts that need to exist before they will start working.

ionic cliff
#

It worked!

#

Someone should really add it in the wiki "We know you want to see the NPC right away, but you need to have <X> stuff at minimum for the NPC to NPC."

#

Because I loaded the mod right after adding the portrait/character, and that somehow broke the schedule.

hard fern
#

im pretty sure it's already in there

ionic cliff
#

Also quick question. I understand the When key is used for conditionals, but how would I use it to load an entry only when a specific mod is loaded (e.g. use a.png when mod x is loaded. use b.png when x is not loaded)

unreal spoke
#

You’d use a HasMod condition. If you’re unsure about how to do that, I’d recommend checking Content Patcher’s docs.

winter dust
#

@rancid temple Hello, would you be willing to help me with some SMAPI code fixes please?

ionic cliff
unreal spoke
#

It was simply hiding in plain sight. SDVkrobusgiggle

vernal crest
ionic cliff
#

That said, the original plan *was* to make a C# mod.

vernal crest
#

Well, I guess that page will be helpful when you do!

#

Unless you were planning to make an NPC with C# and people convinced you to use CP instead lol

winter dust
#

If I want to patch a function with C#, do I need to replicate the entire function with my changes?

ionic cliff
vernal crest
ionic cliff
#

Also I managed to make resources not load when a mod is not there, but I can't seem to find an equivalent to make a resource not load when the mod is there. I basically want to load portrait A normally, but if mod X is loaded, I want to load portrait B.

#

I don't want to use config.json unless it's the only option available.

vernal crest
#
{
    "Action": "Load",
    "Target": "Portraits/NPCPortrait",
    "FromFile": "assets/portrait1.png",
},
{
    "Action": "Load",
    "Target": "Portraits/NPCPortrait",
    "FromFile": "assets/portrait2.png",
    "When": {
        "HasMod": "Abagaianye.OneCoolMod"
    }
}
drowsy pewter
#

I think you'll need to use Load priorities to make sure those dont butt heads as well?

ionic cliff
unreal spoke
#

Alternatively, dynamic tokens.

winter dust
#

Guess I do have to recreate the entire function if I patch it with SMAPI.

drowsy pewter
#

You can also do negatives like "HasMod | contains=Mod.Id": false (can someone correct my syntax)

ionic cliff
drowsy pewter
#

no need to set up a dynamic token

ionic cliff
#

I'll try both

drowsy pewter
#

Abagainye's method would work if you had Load priorities set in the priority field

vernal crest
#

Priorities, checking for a mod not existing, and dynamic tokens are all possible.

ionic cliff
#

I'm doing my best to avoid the fact that I have homework to finish.

vernal crest
#

The check for a mod not being present is probably? most performant.

drowsy pewter
#

i also believe so

#

marginally

unreal spoke
#

Actually, couldn’t you just do an EditImage if a specific mod is installed, too?

drowsy pewter
#

Awesome!

vernal crest
#

I guess it was remiss of me not to even bring it up though

unreal spoke
#

Ha, fair enough. Does it actually make a noticeable difference, though?

vernal crest
#

Depends how many mods a person has, I guess. I know it's not as bad as EditMap but I think it's one of those things where if you can find a straightforward way around it you might as well. I don't do any of the performance benchmarking stuff myself but I try to listen to those who do (try being the operative word, so sometimes I misremember or misunderstand lol)

ionic cliff
#

DynamicTokens also work. I had to create a ConfigSchema so that I could use some condition in When, where I checked for NOT when I wanted to load something when I didn't load a mod.

vernal crest
#

You don't need a config to do the dynamic token approach.

ionic cliff
#

Far longer than using 'contains' currently, but this could be useful when checking multiple mods (since I could just check at the top and store them in variables).

vernal crest
#

Because you can do that same "When" check in your dynamic token block

ionic cliff
#

Yeah, but I want the value returned from dynamic token to be used in another when block.

#

top is using config + dynamic
bot is using dynamic (probably the wrong way to use it I'm assuming)

vernal crest
#

If you want to check for the presence of multiple mods and do the same thing if any of them are present you can do this

"When": {
   "HasMod": "Abagaianye.OneCoolMod, Abagaianye.OneCoolModTwo"
}

Or if you want to check that none of the specified mods are present

"When": {
   "HasMod |contains=Abagaianye.OneCoolMod, Abagaianye.OneCoolModTwo": "false"
}
#

If you specifically want to create your own tokens and then check those for something, you can still do that with just dynamic tokens by setting the value of the first token in one block and then using that in the "When" field for the second dynamic token block like this

"DynamicTokens": [
      {
         "Name": "CoolModCheck",
         "Value": "false"
      },
      {
         "Name": "CoolModCheck",
         "Value": "true",
          "When": {
            "HasMod": "Abagaianye.OneCoolMod"
         }
      },
      {
         "Name": "SomeOtherCheck",
         "Value": "This is a value",
         "When": {
            "CoolModCheck": "true"
         }
      }
   ],

Or I think you could even use HasMod inside the value of the first token, but I haven't actually checked this works so caveat emptor. I'd test it before writing it here but I'm playing RoadCraft and my PC will explode if I try starting Stardew at the same time lol. So instead I bravely open myself up to ridicule and public humiliation if it turns out I missed something in my logic that would make this not possible xD

"DynamicTokens": [
      {
         "Name": "CoolModCheck",
         "Value": "{{HasMod: Abagaianye.OneCoolMod}}" // will return true if OneCoolMod is present, false otherwise
      },
      {
         "Name": "SomeOtherCheck",
         "Value": "This is a value",
         "When": {
            "CoolModCheck": "true"
         }
      }
   ],
ionic cliff
#

Welp, leaving aside my ability to create content for multiple different mods (whether loaded separately or together), this was a very helpful conversation.

#

Thanks y'all.

hard fern
#

apparently my pif greenhouse is broken again,... im never making a pif mod again

vernal void
#

ion understand anything in this channel

#

🙏

tribal ore
#

Is there a good list of item category IDs, for gift taste preferences? I already have one for item ids

royal stump
brittle pasture
#

you can also use context tags in gift tastes now

tribal ore
#

Thanks, Esca! What are context tags, @brittle pasture ?

brittle pasture
tribal ore
#

Nice. I llike learning new things

gentle rose
crude plank
tidal stone
#

I had a thought

#

What if if i do do the other rarity versions if cards whst if i make it where you CAN collect them all but the ones you “donate” to the card collector are the legendary rarity ones

#

Hmmm

lucid iron
#

What if u just give them quality then

#

The collector is unlockable bundle that is restricted to iridium star card

tidal stone
#

Ooooh

#

That would work :0

tribal ore
#

Hey chu, I had a question for you as the translations expert person. I'm getting a couple of translation releases for my mod now. Should I update my content.json in any way to support them, or will they work automatically by just dropping their json files into the i18n folder? (I'm assuming they have to rename them to default.json as it is, but I could be wrong)

vernal crest
#

If your mod is already set up with i18n, all someone needs to do to use a translation for it is to download the translation file (e.g., pt.json) and put it in your mod's i18n folder. You don't have to do anything and they should not be renamed to default.json.

tribal ore
#

Good!

#

I just wanted to make sure that they didn't need anything further from me 🙂

#

Translators are amazing people. Some of my favorite interactions on Nexus

vernal crest
#

Some people might offer you their translation to upload with the mod itself and if you took them up on that you'd just put it in the i18n folder and publish an updated version of your mod so when someone downloads your mod it already has the translation there ready to go.

tribal ore
#

Nice. I think I prefer having them as separate mods, so that any translation errors get reported to the people who can actually do something about it xD

#

But that's great to know

vernal crest
#

Totally fair, that's just me covering the bases so you know how it works in either case.

tribal ore
#

Thanks so much Abagaianye!

vernal crest
#

You will still get translation errors reported to your mod, by the way. Even if they are separate mods.

#

Users are great like that lol

#

But hopefully fewer will go to you!

#

And there's still advantages to separate releases, imo. One, you can easily let your translators earn DP for their work without having to worry about splitting up your own DP earnings. Two, you don't have to stress about releasing incomplete translations if you add more content and can't get hold of the person who did the OG translation.

wet wadi
ocean sailBOT
#

Log Info: SMAPI 4.1.10 with SDV 1.6.15 build 24356 on Microsoft Windows 11 Home Single Language, with 3 C# mods and 1 content packs.

vernal crest
#

But if you are just translating it, there shouldn't be anything in the schedule that you need to edit anyway because there's no dialogue or anything in it.

wet wadi
vernal crest
wet wadi
#

That's the problem it seems, I don't see them in the map 😔

deep cypress
#

A User Interface Question, if I might!

So, I am prepping my Clothing/Armour buffs mod for release, and I realized, there is no visible way for people to see what all buffs are added by my mod. Technically, the things it adds mostly are not technically buffs in-program, just like +1 Attack or +1Luck or somesuch. Anyways, should I try to make them appear as buffs? If so, what is a good way that is done?

Or do you all think it is better maybe to have some small words somewhere on the screen?

vernal crest
wet wadi
vernal crest
# wet wadi No no, the character in the map

Yeah because he doesn't have a functional schedule. Don't try to find him right now. You need to find out what is wrong with the maps themselves. Or if this mod was working before you started translating it (I assume you're translating it to English?) and broke after you started, try undoing what you did.

wet wadi
lean river
#

Starting to make my npc mod aa

wet wadi
vernal crest
wet wadi
ocean sailBOT
#

Log Info: SMAPI 4.1.10 with SDV 1.6.15 build 24356 on Microsoft Windows 11 Home Single Language, with 3 C# mods and 1 content packs.

vernal crest
wet wadi
#

It's only DMed by the owner for access.

vernal crest
# wet wadi It's from Bilibili, I can send you the file if you want.

Sharing other people's mods is considered mod piracy in this server so we wouldn't be allowed to do that. There might be an exception for something like this where I wouldn't be able to access it anyway but I don't know.

I have to go to bed now anyway but if you would like my help in the morning you can DM me and we can talk more about it?

wet wadi
tiny zealot
#

hey friends, before i proceed with my current plan, i'd like to confirm some knowledge about museum donations.
the way it looks to me, if i add the context tag not_museum_donatable to an item, but leave it as type "Arch", it will appear with the standard description "Gunther can tell you more about this if you donate it to the museum.", but it will not be eligible for donation and (this is the important part) it will not count toward perfection, since the museum completion reward is not hardcoded and checks whether your count of donated items matches the number of eligible ones.

#

do i have this right? (to be clear, this is the desired behavior)

latent mauve
#

Is this for a custom object or editing a vanilla object?

tiny zealot
#

custom object

#

actually, one edit: the standard description doesn't appear if it's not donatable. but that's fine, i can just mirror it

#

(i already had it set to the same text, so i didn't notice it wasn't being used with the tag set)

#

i guess the major question is am i right that it won't be required for perfection? i don't want to cause problems for people

deep cypress
#

Is there a way to get BuffEffects to display the buff?

latent mauve
#

These were the ones Selph listed as not showing icons

#

I think the suggestion to make sure that it shows up if it's not one of those is to set the Buff information in Data/Buffs and then call the BuffId?

hallow prism
#

for what i remember the collection display and the perfection check are separated

deep cypress
#

Thanks fireredily! Imma probably just drop a train on it and make it show em!!!

#

Off to Harmony Land, where birds sing, and mermaids sing sweet songs... luckily, I am a mermaid, so crashing on rocks is a sporting passtime!

wicked plover
#

How can I get the ids of the items in the game in bulk.

tiny zealot
#

list_items in your smapi console will produce a plaintext table of every item loaded into your game, including modded ones

#

!unpack check the data files if you just mean vanilla

ocean sailBOT
#

Follow this guide to unpack the game's content files in order to see and explore how the game data is structured.
It's helpful when making your own mods, or just to learn about how the game works!

tribal ore
#

I finished my little Gus mod 🙂 Thanks again to @hallow prism and @vernal crest for help on the dialogue flag stuff! Just putting together a blurb now for mod-showcase

tribal ore
#

Ever wished Gus would lend a helping hand to new (and poor!) players? Well, now he does!
Generous Gus is a little dialogue expansion for Pelican Town's friendly Saloon owner.
https://www.nexusmods.com/stardewvalley/mods/32443

Nexus Mods :: Stardew Valley

Now Gus always has a spare plate set aside for any player who needs it!

deep cypress
#

Y'all, would it drive you nuts if you couldn't see a buff icon thingie on screen for your clothes you were wearing? Like, u are wearing the leprechaun shoes, n they r giving u +1 luck and +1 speed. Would you just believe the item description, or would you feel like you had to see it on screen to believe it?

tribal ore
#

So I don't think it would bother me

#

Maybe you could make it a tooltip. A single "clothes buffs" icon that would display all cummulative buffs when you hover over it

#

Or perhaps just do that on the portrait for the player

deep cypress
#

I have it with the tool tip, like of you hover over the item, it is patched in the marmony to display what are the buffs, such as +1 Luck and +1Speed for those shoes. I extremely forgot that also there were not displayed such things for the regular shoes!

tribal ore
#

I think a tooltip alone is fine. If people complain, you can always try adding a single icon at the top and repeat the tooltip there

#

I would rather not have a ton of buff icons on my screen

gentle rose
#

tooltip alone isn't super accessible

#

especially if there's nothing showing you that you should be hovering over the item in the first place

hard fern
rigid oriole
#

Is the general consensus that if you want to match a short form instruction like ldc.i4.s 10 with harmony's codematcher, you can't include the operand in the match? I've tried casting the operand to byte but that doesn't match it. Only omitting the operand yields a match. (which works, but like it'd be nice to be more specific)

gentle rose
#

plus it's just weird to have a buff not be shown with all the other buffs

hard fern
#

😅 im used to things going wrong all the time

rigid oriole
#

ooo

lucid iron
#

Shits confusing so honestly if u have enough other context you can leave it out

#

Esp if u wanna be compatible with ppl who modify this const in a transpiler b4 your own

rigid oriole
#

valid point

#

for posterity, sbyte does yield matches if you really need it

gentle rose
#

all I want is a magic version of harmony that doesn't need to use IL and does exactly what I want, is that really so much to ask

rigid oriole
#

simply let me edit the game code with my brain

gentle rose
#

let me edit the loaded instructions live, xkcd Mrs Roberts style

gentle rose
#

now THAT I want to see

#

but no cop-out "ask it to write one then clean it up". hook into the API and ask it to write a new one every time you load the game

rigid oriole
#

feels wrong to feed it decompiled SDV even just for kicks lol

lucid comet
proud wyvern
#

asked it for a transpiler, got this instead

gentle rose
proud wyvern
gentle rose
#

dirt.crop.dead

proud wyvern
#

i am dead

lucid iron
#

Wow banned \j

proud wyvern
#

i can't even check if any of this makes sense

gentle rose
#

I love the useless toRemove var SBVLmaoDog

proud wyvern
#

now it wrote a prefix

lucid comet
#

the longer i look the worse it gets D:

proud wyvern
#

kek

#

Contains("die")

#

that's a great way to get invalid IL

#

just nop the call

#

stack? who cares about that

gentle rose
#

I hate that with a passion but there's a small chance that that strategy would actually work...
if you don't consider the stack SDVpuffersquee

rigid oriole
#

ask it to use CodeMatcher

gentle rose
#

"you're right again!" I feel like I'm being gaslit

proud wyvern
#

is that correct? i have no clue, i don't use CodeMatcher

#

i use my own lib instead

rigid oriole
#

nope

gentle rose
#

why is matchforward taking a bool as the first param

rigid oriole
#

MatchForward also does not exist

gentle rose
#

and yeah, it should be one of those lmao

proud wyvern
#

rofl

gentle rose
#

is setopcodeandadvance real?

rigid oriole
#

i think so

#

yes i get autocomplete for it

#

idk why i'm testing this i should be modifying labels on the stack for a very not cursed transpiler

gentle rose
rigid oriole
old edge
#

Evil entity character ideas?

brittle ledge
#

Uh... what's the context for this question?

hallow prism
#

(note that if no one does, then you may need to just accept it, as showcase is quite like vouching and may not happen)

rough lintel
rough lintel
brittle pasture
#

evil farmer by like - I water the soil before tilling dirt

rough lintel
#

SDVpufferdizzy hes too dangerous we cant let him live

wet folio
#

thanks @lucid iron !

lucid iron
#

Evil farmer who steals from junimos (we already fo this)

deep cypress
#

I am trying to make a custom token for PolyamorySweet which is essentially string NPCname , int dayofwedding. Like, if they wanted to know what day Claire from SVE got married, they would just put in Claire.DaysMarried. Is that possible? I am looking at the extensibility docs.

lucid iron
#

You may need a complex token

#

The simple token can't take arguments

deep cypress
#

Yes, I am making a token class, like it was showing in the docs.

wicked plover
#

How can I add the same without conflicting with other huds.

brittle pasture
#

add what specifically? a new meter?

tawny ore
#

Huds are hardcoded so you really can't without making specific compatibility for every mod that adds their own

lucid iron
#

Better HUD...

brittle pasture
#

I know there's mana and hunger meter

#

without a hypothetical better hud meter mod you'd need patches for "no mana or hunger", "has mana only", "has hunger only", and "has both"

gentle rose
#

speaking of Better Feature... time to get to work on dehardcoding this I believe

tawny ore
#

Is there a mod that can be scope creeped? I do love scope-creeping mods.

brittle pasture
#

and if there's another meter mod released after yours they would need 8 patches

tawny ore
#

I feel like SpaceCore should be the meters mod and then we can call it a day

brittle pasture
#

and the one after that 16

gentle rose
#

...there's a debug command that adds another farmer? and it's always male?

why?

rigid oriole
#

maybe to test multiplayer marriage or something?

wicked plover
#

I haven't thought about what to add yet, I just wanted to ask. thx

tawny ore
#

Introducing other mods just complicates things

deep cypress
#

A new mod idea: I harmony patch it to be a female farmer only! (Enbies sadly left out in the cold again!)

gentle rose
#

wasn't a third option added to dialogue gender blocks at some point? I could have sworn I'm looking at the latest decompile from the repo but it seems to only have m/f version in the method I'm looking at

hard fern
uncut viper
latent mauve
#

I feel like it's more likely that it was meant to test cabin stuff

gentle rose
#

yeah, what I'm looking at doesn't have a third option at all SDVpufferthinkblob maybe it's outdated even though I thought it was the latest one?

uncut viper
#

are you sure its not parsing the old form

brittle pasture
#

it's part of 1.6

gentle rose
#

I'm sure of nothing

#

oh, I guess technically it wouldn't error out for any number of blocks separated by ^s, it just wouldn't apply any of them SDVpufferthinkblob

#

I'll move this soon-to-be-rant to my thread I think

#

or somewhere else in general KEK

deep cypress
#

Is this what I want for my token code, so as they can input the name, and get the correct int? (NPCWeddingDate in the Dictionary defined earlier in the class, which gets its information from ModEntry.SpouseWeddingDate, which is added to whenever someone gets married),

public IEnumerable<string> GetValues(string input)
{
    // get name
    string name = input;
    if (string.IsNullOrWhiteSpace(name))
        yield break;
    if(NPCWeddingDate.ContainsKey(name))
            yield return name;

    yield return "";
}```
candid stratus
#

Do you need C# to add new monsters?

gentle rose
#

that doesn't return an int at any point

#

nor can it, since the return type is IEnumerable<string>

deep cypress
#

Sorry, the int is in the dictionary, it needs to be there too I take it? (Sorry, I'm not super sure how CP uses this class!)

lucid iron
#

You need C# to give monster special behavior

#

You can spawn reskins with FTM

gentle rose
#

you aren't yielding the dictionary though, you're just yielding the name

brittle pasture
deep cypress
#

So this is where we want to yield the dictionary, then?

gentle rose
#

honestly not sure, all I know is that you definitely aren't getting the date from what you have right now. I haven't looked at the custom token api in detail yet

forest osprey
#

How do you write the content.json for custom npcs post-1.6?

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:

lucid iron
#

The first one is overview

forest osprey
#

thank you!

deep cypress
gentle rose
#

still don't know what actually works, just that this wouldn't

deep cypress
#

I see! Thanks! So I want to (likely, mayhap) make the yield be string, int, then?

gentle rose
#

well that's not possible because your IEnumerable has to have a specific type

#

right now it has string

#

but again, I don't know

deep cypress
#

This is where what the player types in gets defined, I want to make it be a custom name, so they can make it be any npc for whom they wish to use.
contentPatcherAPI.RegisterToken(context.ModManifest, "NPCNAMEHERE", new WeddingDateToken());

#

Gonna change my return to int...

gentle rose
#

I doubt that's a good idea, since tokens are inherently strings anyway, and I think you may be looking in the wrong place regardless

brittle pasture
#

as mentioned by chue above you probably want one token that accepts arguments with the advanced api

gentle rose
#

that is the advanced api I believe

lucid iron
#

Yeah looks like it

#

Personally i never used it tho, think cmct does?

gentle rose
#

I'm scared to because idk how likely it is to be completely changed KEK since it's technically an experimental api

lucid iron
#

Eh if you need it then use it

deep cypress
#

I am thinking that instead of this, I might well just add to the CustomFields thing in CharacterData, can that take string, int?

#

And instruct the end user wherein to access that?

lucid iron
#

You can't because that's not stateful

#

Add to modData is ok

#

Make GSQ to check by modData is also ok

deep cypress
#

Can people access an NPC's modData in CP?

lucid iron
#

Only with token (which u r trying already) and sometimes GSQ (which only gives true false and won't work in a when)

#

tokens is how you are supposed to expose things to content patcher here

tawny ore
#

I'm curious, how do you imagine this being used? Because if the main usecase is to determine whether TARGET NPC is their marriage date today, then a GSQ would suffice

deep cypress
#

I spose I could make a token which is just an int token, and is like AbigailWeddingDay, ClaireWeddingDay, EmilyWeddingDay... and so forth. Hackish, and will need many updates by me, but, my wife is trying to make em go to sleep.

#

The end user wants a token where they can use for the spouse's anniversaries.

tawny ore
#

Yeah, so like if their wedding day is today, then do this dialogue or whatever. That only needs a boolean return.

#

Yes it is TARGET wedding day, or not it's not.