#making-mods-general

1 messages · Page 409 of 1

late gull
#

Will try, thanks!

lucid iron
#

The tsx doesn't matter, game only checks the source

#

Need to make sure you dont have the sheets in the folder

late gull
#

Nope, I don't have them in the folder either

lucid iron
#

Try using the season gsq

#

To validate that you are definitely in a particular season

#

debug gq SEASON Here Spring

#

Hopefully i spel right

late gull
#

I have no idea why but its working now after a game reboot despite not changing anything

#

Thank you again for the help and sorry for the bother. I think my first mod is basically done so i shouldnt be bothering much anymore lol

gray bear
#

mystery! hey it just works

urban patrol
#

can i combine two image edit patches into one by combining the targets, like so:
"Target": "LooseSprites/map_{{season}}, LooseSprites/map",

#

oh wait no that still wouldn't work because spring wouldn't pull from the correct image

#

please why can't the spring world map be stored in LooseSprites/map_spring screaming

#

is that something reasonable to request in 1.6.16 or would it involve more than i think

late gull
brittle pasture
hot gale
#

Been working on a C# tool that will stitch together 'random' NPCs with all of the available animations using the games assets - took a bit of work to get here and it still has minor bugs, but I feel like it's in a good place to showcase a little bit. I was having a ton of issues trying to accomplish this in-game to use for a mod so I decided to just accomplish it externally

lucid iron
#

Bus Stop Fence Inc. diversifies their business

gentle rose
crude plank
#

that is not alex, it's Leon, his long lost cousin

late gull
#

Nah its my first one but thanks!

hot gale
#

Is there a legend somewhere that has visual Ids of the stardew hairstyles?

cold marsh
#

Questions regarding the Projectile fields in Data/Weapons: Can I load my projectile SFX like a regular asset or do they need to go through Data/AudioChanges and can I use my own tilesheet instead of Tilesheets/Projectiles?

#

The wording here is a little dubious.

lucid iron
#

these take cue names, which means you must load it via audio changes if custom

#

you can try them out by putting in vanilla cues like "yoba"

cold marsh
#

Good to know, so one of the very few excerpts I managed to search here was wrong. And the tilesheet?

lucid iron
#

that's sorta hardcoded

#

to use a custom tilesheet as the bullet you need to add it as an object

#

here's an example of a weapon that shoots milk

cold marsh
#

Oh, I was about to go nuclear and replace an index in Tilesheets/Projectiles

#

That'll work perfectly, thank you

lucid iron
#

naw dont do that Dokkan

#

it is a lil jank that u need an item but it works/10

thick violet
#

would it be possible for someone to help me out with why smapi says this even though my manifest looks fine

lucid iron
#

!json

ocean sailBOT
#

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

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

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

latent mauve
#

Specifically of the manifest.json

#

It's very likely you missed a quotation mark or a curly brace or something that is making the UniqueID field in ContentPackFor unrecognized

thick violet
#

i send the link for the validation right

gentle rose
#

!log

ocean sailBOT
#

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

Please share your SMAPI log file. To do so:

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

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

lucid iron
#

your manifest looks correct so double check if the mod folder has right one

thick violet
#

i didnt realize

trim ruin
#

I've been coding for a couple hours now and wanted to do a little test launch to see and got three errors. Have I made an error or is it because the mod is still incomplete?

uncut viper
#

well, do you have those files?

trim ruin
#

I'm pretty sure, I've made the Sprites and Portraits and named them exactly that, I've made the pixelart ontop of an existing NPC to make sure I get the size right aswell. And about the dispos file, I'm trying to fix that right now

gentle rose
#

are they in the matching folders too?

uncut viper
#

are they actually .png files, or are they .png.png files?

trim ruin
#

they're in Images yes

#

and they should be pngs

gentle rose
#

assets/images, right?

trim ruin
#

so no double

#

yes

gentle rose
#

can we see a screenshot of what’s in that folder?

uncut viper
#

are you on Linux (or Mac maybe?) where it may be a case sensitivity issue?

trim ruin
#

ahh sorry my keyboard lagged lol

#

sure thing*

gentle rose
#

oh, gotcha haha, dw

#

I meant what’s inside images SDVpuffersquee sorry

uncut viper
#

those appear to not be named SkottPortraits.png or SkottSprites.png

gentle rose
#

they aren’t named the same thing

uncut viper
#

so, you do not have those files

trim ruin
uncut viper
#

a good idea when asking for help with an issue is to not change things between the error and screenshots of your setup

gentle rose
#

I’m not really sure how that would help tbh, but you should add that back

uncut viper
#

the file names need to match your json

#

what you wrote in your json

trim ruin
#

oh my gosh i found the error

uncut viper
#

also, you should really turn on file extensions

trim ruin
#

Ah I'm pretty new to modding so I don't really know how to or what that does lol

uncut viper
#

!fileextensions

ocean sailBOT
#
Hidden File Extensions

Windows and Mac hide most file extensions by default. If you are creating or updating mods, it's helpful to show file extensions so that you can be sure all mod files are named correctly.

To show file extensions on your computer:

On Windows 10, open File Explorer, click on the View tab, then check the File Name Extensions box.

On Windows 11, open File Explorer and click on View > Show > File Name Extensions.

On Mac, open Finder, and in the menu bar, click on Finder > Settings (or Preferences) > Advanced, then check the Show all filename extensions box.

trim ruin
#

Ah thank you!

#

No red texts! Tysm!!

hot gale
#

Someone may find this useful :D

trim ruin
hot gale
#

Oh, that must have been weird timing I wasn't replying to you 😅

trim ruin
#

Oh😂

hot gale
#

This npc generator paired with that portrait creator, fully custom NPCs - albeit basic - can be spun up real quick now :D

trim ruin
#

Ooh that's pretty cool!

brave fable
#

wow that was fast lol, uhhh it doesn't actually support custom overlays at the moment since noone ever mentioned it over the last 5 years. probably wouldn't take too long to implement

mellow knot
#

what can i say ....mushrooms....they call to me evilwildflour

brave fable
#

currently simply adding objects as propagator inputs is fine, just need to add their object ID to the Mushrooms dict in the data asset. which could also probably be replaced with a list of item queries

#

it'll just draw the object sprite over the top as usual, rather than the growth overlay sprites

mellow knot
#

neato yeah have been on break for a bit but i had been thinking of diff ways for players to obtain the mushrooms from my mods so this is perfection

#

i have a bunch of them as crops atm but id prefer something more like mushroom spawn/inoculation so the logs are awesome

brave fable
#

you'll still need the original mushroom to reproduce with the propagator log, but it does let you get more lol

mellow knot
#

yeah precisely! since i prefer having folks forage for stuff SBVPufferSquee

#

whenever i dont have a crop equivalent for something folks are bummed and i know i could ignore that BUT i like the idea of a way for you to obtain them but maybe works a little more like irl

#

regardless ty for the info / response!! hehe i am excited to try it out rosehappy

hot gale
#

Got it outputting useable sheets now :D

tame orbit
vernal crest
tame orbit
#

Yeah

vernal crest
#

Then the map is using the tilesheet from that folder instead of the one in the game

#

So even though you're replacing the one in the game with the next season, it doesn't matter because the map isn't using those.

#

I recommend changing the name of your tilesheets to spring_AV_OutdoorsTileSheet.png (etc) and putting them in a Tilesheets folder and Loading them from there. Having the season name at the front will make the game automatically look for the appropriate seasonal sheet without you having to do those EditImage replacements (provided the map is an outdoor one) and having the tilesheets in a separate folder from the map will let the map use the right one.

tame orbit
#

ooo okay I'll change the naming system
so even though I'm trying to switch my own tilesheet for each season it won't work because it's in the same folder? (sorry I'm still learning)

#

if its any help this is my maps folder

vernal crest
#

Yes, that's correct

#

The way it works is that it checks inside your map folder for the tilesheets first and only if it doesn't find them there does it look inside the Maps/ folder for the game.

#

Since it's finding yours, it's using that.

#

Also, you don't have apologise for learning or asking questions. That's what this channel is for :)

tame orbit
#

Okay haha thank you I feel silly sometimes. Let me see if I understand. So for my map I have the "AV_Spring_OutdoorsTileSheet.png" as a TileSeet used by the map. The reason it isn't working is because it's in the same folder as the other seasonal variants?

#

(oh and yeah Outdoors is true, the regular game assets are fine it's just my tilesets that are always in spring vs seasonal variant)

#

thank you so much! I'll go ahead and make the map again with the renamed tilesheet then move stuff around so it's not in the same place SDVpufferheart

vernal crest
#

You don't have to make the map again

vernal crest
tame orbit
#

oh you can?? how do you do that? 👀

hot gale
#

What I do is extract all the game files, then do all of my map work directly inside the Maps/ folder of the extracted assets

#

Picking sheets from there just works for me once I move and test them

vernal crest
#

I used to have a mapmaking folder but iro's Tiled plugin makes it possible to use tilesheets from anywhere without tilesheet climbing so I just do that now

hot gale
#

Moving custom sheets to the Maps/folder works as well, since they all just call to Maps/Tilesheetname.png anyway

vernal crest
tame orbit
#

ah this is perfect!! I'm gonna go try this out
thank you both so much! SDVpuffersquee SDVemoteheart

vernal crest
#

I will grab links to the plugin now

#

This is the file to download and put in your extensions folder (which you can get to by going Edit -> Preferences -> Plugins -> Open...

tame orbit
#

oh perfect! is it the nexus mod or is it the tilesheetinator.js?

vernal crest
#

The tilesheetinator.js

tropic hare
# lucid iron your manifest looks correct so double check if the mod folder has right one

Hi, I'm here again. This time I would like to ask, "mushymato.MMAP_CritterRandom <chance> [<critterType> [type-dependent args]]+" - how is this used?
I tried writing the following code, but the result was not satisfactory:
{
"Action": "Load",
"Target":"{{ModId}}/critters/butterfly",
"FromFile": "Assets/Image/Texture/AD.Butterfly_{{Random: FlashBlue, LunaMoth}}.png"
},
{
"Action": "EditData",
"Target": "Data/TriggerActions",
"Entries": {
"{{ModId}}_MapButterfly": {
"Id": "{{ModId}}_MapButterfly",
"Trigger": "LocationChanged",
"Conditions": "LOCATION_NAME Here CustomMap",
"Actions": [
"mushymato.MMAP_CritterRandom 1 Butterfly {{ModId}}/critters/butterfly 8",
]
"MarkActionApplied": false
},
}
}
I have tried a simpler version of "mushymato.MMAP_Critter [<critterType> [type-dependent args]]+", and small creatures can appear normally.🥲

lucid iron
#

!json you can send json with this

ocean sailBOT
#

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

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

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

lucid iron
#

anyways this will give you 8 butterflies at every tile on the map you sure you want that

tropic hare
#

No, I was just trying it out to confirm that this butterfly appears on the map. After that, I'll adjust the occurrence probability.

lucid iron
#

the first argument chance is a float, it is chance per Back tile so you probably want like 0.01

#

as for whether it's not appearing, you can try this smapi command first

#
debug action mushymato.MMAP_CritterRandom 0.1 Butterfly youractualmodid/critters/butterfly 8
#

this will verify whether you wrote the action correctly

hot gale
#

Some minor kinks to work out, really pleased with how this turned out

#

Can generate as many usable NPC sheets as you want real fast

tropic hare
hot gale
#

ha there was a typo in there

#

damn

#

O lawd

candid veldt
#

Is there any way to add a diggable artifact and have it not show up in the perfection screen for artifacts? In my mod I got the artifact working correctly and tagged it not donateable to the museum (because I'd prefer it didn't have to be donated), but its still showing up in the artifacts and minerals area of the menu. Was considering trying to make the game think it has been donated once the item was found, but I can't find info on if I can do that or not.

uncut viper
#

no thats just an issue with the vanilla game

candid veldt
#

I see...so I either have to make it donateable (and expand the museum?) or find another way to add my object.

uncut viper
#

you could just make it not categorically an artifact or mineral

candid veldt
#

Isn't it only possible to make an object findable in an artifact spot by making it the 'arch' type or am I misunderstanding that?

uncut viper
#

you can just add anything to the default artifact spot list

candid veldt
#

Oh, okay! That would make it easier lol

uncut viper
#

i dont recall but i thought there was even specific reason you shouldnt make an item arch

#

you can edit Data/Location's Default location ArtifactSpots list

candid veldt
#

Okay, I'll try that out. Thanks for the help!

tiny zealot
uncut viper
#

"Caution: adding custom items with the Arch type is inadvisable as it often leads to artifact spots becoming broken and not giving any items. "
this is on the wiki
i have no idea what it means. no idea what kind of broken. as far as i remember its been there since i started modding SDV. no clue if its outdated

tiny zealot
#

that sounds familiar and i bet it dates from 1.5 or maybe even earlier

uncut viper
#

the ancient texts with none who yet remain to decipher their meaning

#

superstition passed down from one generation to the next

tiny zealot
brittle pasture
#

that line's still there? wow

uncut viper
#

what the fuck is decomposition

tiny zealot
#

(please, no one remove this sentence from the Chest page. it is sacred, to me)

#

it's been there since like three months after 1.0 release or something. i cannot bear a world without it

brittle pasture
#

we talked at length about that sentence months ago, good to know no one's done anything about it since

uncut viper
#

that shit i do when i use paranthesis on a for loop?

#

(/j)

calm nebula
uncut viper
#

so whats the deal with the note then

tiny zealot
#

maybe somebody fucked up their game with mods and misattributed the blame to having an arch item

#

afaik the chest one was just fully invented (although it is true! items do not decompose in chests). no clue where they even got the idea from, except maybe noticing that items in chests were safe and assuming without evidence that ones outside were not

#

or maybe it's just specifically about the jack-o'-lantern

tired matrix
#

Why does my custom crop look like this wheeze

uncut viper
#

seems like you mightve not stuck to the correct dimensions in your texture

tired matrix
#

Isnt it also 16x16?

uncut viper
#

crops are 16x32

#

where the bottom half of that 32 is where you'd want your sprite to be in this case

candid veldt
#

Here's the crop template I used, it's modified from the one on the modding wiki.

tired matrix
#

Wait so i can make a big one too? I thought it would require some c# ill make a party rn

uncut viper
#

big as in tall like a sunflower? yeah that should be fine, just use up the whole 32 tall

tired matrix
dusky sigil
#

is there a way in content patcher to make something depend on the player's daily luck?

uncut viper
#

depends on what the "something" is

dusky sigil
#

in this case, event dialogue

uncut viper
#

in that case i'd try the $query dialogue command with the RANDOM GSQ using the @addDailyLuck argument

brittle pasture
#

CP has a luck token right

brave fable
#

doublechecking, is it decently performant to use Game1.content.Load<Texture2D>() in a draw() method with the game content manager doing the caching for me

uncut viper
#

i.e. if i collect the luck buff from the truck mid day

uncut viper
dusky sigil
#

it looks like the daily luck token is more what i'm looking for

brittle pasture
#

that's like the only case of it changing right, quite niche to the point of not worth worrying about

lucid mulch
uncut viper
#

swapping out an entire event patch for a single luck-dependent dialogue seems like overkill to me though but its not like its a big deal in the grand scheme of cycles

dusky sigil
#

well it's less a single dialogue and more several of them at once

brave fable
#

oh i meant never caching it myself

lucid mulch
#

SMAPI when invalidating a texture will load the new version of the texture in a temporary context and then copy the texture over to the reference in the main content manager

uncut viper
lucid mulch
#

or obtain the luck charm thing during that day iirc

uncut viper
#

that was mentioned just prior

#

but yeah, other mod interactions aside, farmhands connecting and the luck charm are the instances it'd change

lucid mulch
#

ah I didn't backread far

#

is there vanilla luck food, I can't remember

uncut viper
#

that uses the Luck skill i believe and not DailyLuck

lucid mulch
#

ah true

uncut viper
#

but good to point out, that if you want to account for lucky food, Cheese, dailyluck wont cut it

dusky sigil
#

it's not really that big of a deal tbh. i just thought it would be neat to have the outcome of a card game within an event depend on the player's daily luck, if they change it midday they'll never even know that they got the "wrong" version of the event

uncut viper
#

is this event repeatable?

dusky sigil
#

i don't think so

tiny zealot
#

you have to go out of your way to make an event repeatable, generally speaking

uncut viper
#

you can decide for yourself then ofc which approach to take then, though a non-repeatable event having to be re-patched every single day even when its not being used anymore seems a shame

#

since the DailyLuck token will change every single day, so the asset will be invalidated every single day

dusky sigil
#

ah that makes sense

#

i'll look into both ways of doing it, thanks for the advice

uncut viper
#

its not likely to be noticed, just one of those "if everyone did it, it can add up" things, so dont worry about it too much

#

especially if its an event in a custom location that isnt likely to have a lot of patches needing applying to it

dusky sigil
#

oh yeah it's a custom location. no one's ever touching it but my one mod

uncut viper
#

could be a lot worse then

lucid iron
#

is there a daily luck gsq

uncut viper
#

not in vanilla, just RANDOM but adding the daily luck

#

(and SYNCED_RANDOM ofc)

lucid mulch
uncut viper
#

yeah i assume the first time that asset would be checked is when events for it are checked, which is on warp

#

so it being a custom location helps thre. would be more potentially annoying somewhere like Town though

#

(unrelated but thought you'd also like to know that CP 2.8.0 will have a step argument for Range now)

lucid mulch
#

😄

hot gale
#

Filesize for 2500 NPC sprites is only 10mb, nice lmao

vagrant ivy
#

anyone know why there's a black box around the chair?

lucid iron
#

what is your png like?

vagrant ivy
#

i was working on a recolor and once I tried to test it, the black box appeared in game

brave fable
#

you know, your spritesheet is also black

vital lotus
#

It's black, not transparent

brave fable
#

what art program are you using to make your recolour?

vital lotus
#

So... Magic wand then select the black, then delete. Prolly would do the trick?

vagrant ivy
#

the og sheet was black not transparent, I saved my changes as a transparent png. So if i just get rid of the background it should be ok?

hard fern
#

It should, so long as it's saves transparent

brave fable
#

the original image would only be black if you copied the image from say, a web browser, rather than copying the file itself

#

the actual image would definitely be transparent

vagrant ivy
#

oki tyy

uncut viper
#

that said, if you did originally just copy the image from a web browser, it was probably a jpeg and you probably lost quality in doing so

brave fable
#

the image posted above seems fine to me, quality-wise

#

no lossy compression or artefacts

#

just the black background/no transparency issue

vagrant ivy
#

I used a version from the files on my pc. if it was a copy instead of directly opening it, just means my brain forgot a step haha

brave fable
#

thing is though, you'll also have to recreate the shadows

#

since those are now non-transparent blobs

vital lotus
#

Could just copy paste the shadow from the og tilesheet

brave fable
hot gale
#

Working on a little GUI now so you can dress up before you export

gray bear
#

cool!

hot gale
#

Thanks y'all!

#

Gonna refine it a bunch before I release the GUI

stark spindle
#

Ive been thinking about doing something like that so I can make a gold statue of the player but I still cant really work out how best to do it.

brave fable
#

it's pretty simple in theory, you're able to make a copy of the farmer with var fake = player.CreateFakeEventFarmer() and render them with fake.FarmerRenderer.draw()

#

no guarantees on overrideColor: Color.Gold actually looking good though

stark spindle
#

hmm can you apply that to items?

brave fable
#

apply that to items?

stark spindle
#

well i want it to be an item

#

that you can place wherever like the mayors statue

brave fable
#

well with c# you can do anything you like

stark spindle
#

true i just need to spend time working out how that system works

brave fable
#

probably not too much work, just make the actual item sprite be a plinth of some sort, then harmony patch the various item draw methods to also call your fake.FarmerRenderer.draw() method on top

stark spindle
#

o yeah i always forget about harmony. i should play with that.

#

thanks

brave fable
#

hi, maybe you'd like to give this a try - all the appearance values are set in Mods/blueberry.MushroomPropagator.CP/Assets/Data, keyed by unqualified item ID (only (O) types are usable anyway)

#

if OverlayTextureName is set it'll try and load the texture, if not it'll just use the item sprite from game data

hard fern
brave fable
#

oh yeah also that doesn't happen in this version

#

just so you're sure

#

i mean it didn't happen in the previous version either, but now it still doesn't

gray bear
#

is there a way to run trigger actions using the console?

#

it uh already triggered

ocean sailBOT
#

Log Info: SMAPI 4.3.2 with SDV 1.6.15 build 24356 on Microsoft Windows NT 10.0.26100.0, with 22 C# mods and 2 content packs.

flat sluice
flat sluice
gray bear
#

like debug TriggerAction [id here]?

flat sluice
gray bear
flat sluice
gray bear
#

ah i see, ty

flat sluice
gray bear
#

hey @ornate trellis did you happen the change the mod id for fishmonger

flat sluice
gray bear
#

maybe the mod id changes

#

wait no it is action, ok cool

#

i test

#

ok no everything is the same with id's, is it the "Relationship:TheFishmonger |contains=Unmet": "false"?

flat sluice
gray bear
ocean sailBOT
#

Log Info: SMAPI 4.3.2 with SDV 1.6.15 build 24356 on Microsoft Windows NT 10.0.26100.0, with 24 C# mods and 2 content packs.

flat sluice
gray bear
#

trigger action

flat sluice
# gray bear

Never added Trigger Actions, but somewhy I don't think that's true, but I may be wrong

gray bear
#

trigger actions confuse me

flat sluice
#

This is how I send mail (and as long as I know, it is correct)

drowsy pewter
#

the id for trigger action can be anything tho

gray bear
#

is there a way to make them retrigger without the "MarkAsApplied" being set first

gray bear
#

there isn't a console command?

flat sluice
#

Not one I'd know of, nor can I find any on the wiki

gray bear
#

sadge

drowsy pewter
#

i dont know what exactly you want but im sure it is possible

#

are you saying that it was already marked as applied because you didnt set a value so it was true by default?

gray bear
#

yes

drowsy pewter
#

You can either change the ID of your wip trigger action (essentially making it a new unused trigger action), or make another trigger action and use the trigger action action that marks something as unapplied

#

MarkActionApplied false

gray bear
#

so i tried using clearmail and it seems to have worked?
i don't want it to happen more than once, i just fucked up with rtf

devout otter
drowsy pewter
#

Dennis i know you're trying to help but when you 👆 reaction me are you saying that you agree with me. Because you just told bea it wasnt possible...

gray bear
devout otter
#

Yar, unfortunately it can't be done like that. CP will specifically search for Fishmonger if you tell it to look at its relationahip token. And then it will give an error because it can't find the Fishmonger.

gray bear
#

ah
should i just have the hasmod condition then

flat sluice
gray bear
#

i did it by using clearmail i think puffer_party
i am probably gonna add the second one to just reset it for testing. thank you

drowsy pewter
#

Great!

devout otter
gray bear
gray bear
devout otter
# gray bear how would i, do that? unsure sorry

Do something like { "Action": "Include", "FromFile": "patches/Fishmonger.json", "When": { "HasMod": "VoidWitchCult.CP.TheFishmongerNPC", } }, And then do your Gift Taste patch with the Unmet conditional in Fishmonger.json

drowsy pewter
#

Additionally

#

currently it will run after ClearThatTerrain runs

drowsy pewter
#

so ClearThatTerrain wont run on the same day that UnclearThatTerrain runs. It will actually run the day after

#

I'm gonna get back to my own stuff now tho

gray bear
#

gotchu. thank you for all the help!

hallow prism
#

if i want to share a beta version of a mod and have users be aware when the update finally drop on nexus, i can just have (plannedversionnumber)-beta ?
Like 4.0.5-beta ?

obtuse wigeon
#

I believe so, SMAPI will detect when a version 4.0.5 or greater is available (4.0.5, not 4.0.6, fat fingered the wrong number hence the edit incase you saw it)

hallow prism
#

thanks 🙂

mellow knot
iron ridge
#

patching out a single check in an if with harmony would be a transpiler, wouldn't it?

lucid iron
#

Sometimes you can do shenanigans to make the if false

gentle rose
#

depends what the method is tbh

lucid iron
#

Undo the shenanigans in a postfix

gentle rose
#

or sometimes you can do stuff in a prefix to force it to be the value you want, and then unset in the postfix

lucid iron
#

That's what i meant yes

iron ridge
#

not a method that icould patch sadly, it's the Game1.currentLocation is Summit here
if (Game1.currentLocation.IsRainingHere() && !(Game1.currentLocation is Summit) && (!Game1.eventUp || Game1.currentLocation.isTileOnMap(new Vector2(Game1.viewport.X / 64, Game1.viewport.Y / 64))))

#

but i might be able to do that (prefix change and postfix unchange)

gentle rose
#

(I do that in the portrait mod, I set something to a blank texture haha)

lucid iron
#

Oh this bit is the rain check?

gentle rose
iron ridge
lucid iron
#

I transpilerd it i think

iron ridge
iron ridge
gentle rose
#

I usually just stuck stuff in static fields on the patch class for some reason pffft which tbf I'm pretty sure is part of how __state works but I think they have extra checks to make sure it's only passed between matching prefixes and postfixes

lucid iron
#

On reflection this is probably another place

#

But at least u can see what changing is Summit might be like

gentle rose
#

(my goal in this mod is to avoid transpilers entirely, try to minimise skipping prefixes wherever possible, and prefer postfixes over prefixes in general)

iron ridge
lucid iron
#

Yeah

iron ridge
#

i see

lucid iron
#

It's adds a Game1.background is not null basically

iron ridge
#

ah

lucid iron
#

And jumps to same label as the is IslandNorth

#

Up to you what you wanna do

lucid mulch
gray bear
#

( 👀 )

iron ridge
#

does __state have a type?

#

oh

It can be any type and you are responsible to initialize its value in the prefix

lucid mulch
#

its whatever type you want it to be, just remember to be consistent

#

in Profiler its a Stopwatch

iron ridge
#

I imagine there's a dictionary or something somewhere that corresponds location names to instances of their class?

lucid mulch
#

do remember to check in the postfix that the state is assigned, because if someone else has a skipping prefix your postfix can run anyway without the initialized __state

#

Game1.getLocationFromName() which uses a mix of Game1._locationLookup and Game1.getLocationFromNameInLocationsList()

#

just remember for farmhands it can grab locations from the shadow realm

iron ridge
#

under what circumstance would it only be found in the shadow realm?

lucid mulch
#

every location that isn't AlwaysActive that the farmhand isn't currently in

iron ridge
#

ah

lucid mulch
#

If the farmhand hasn't been in the location at all that session its entirely shadow realm, if they have been in it that session but not currently in it, it will be a semi snapshot in time from when they were last there

lucid iron
lucid mulch
#

postfixes dont get skipped by a skipping prefix

iron ridge
#

i think it should be fine unless they're warping to the summit for some reason then

lucid mulch
#

Nor finalizers, which I found the hard way in profiler

lucid iron
#

Wack

#

Tho i usually only use __state in a void prefix

#

Which i understood as won't be skipped?

lucid mulch
#

Profiler is a void prefix and it does get skipped

lucid iron
#

What is the point of that note on the docs then

lucid mulch
#

I have no idea, but I spent ages troubleshooting it recently which is a pain in the ass because my PC is cursed and it takes like 30min to bootup stardew if the debuggers attached

proud wyvern
#

best to build your mod in debug, run Stardew manually, and attach the debugger later

lucid iron
#

Oh i guess the fact that you have a ref arg makes you side effect

#

Didn't think about that one

lucid mulch
#

profiler doesn't have ref arguments as it doesn't mutate the methods

iron ridge
#

oh so that was a bad idea

lucid iron
#

But __state has to be a ref arg i thought

lucid mulch
#
public static void GenericDurationPrefix(out Stopwatch __state, MethodBase __originalMethod, object __instance)
public static void GenericDurationPrefixWithArgs(out Stopwatch __state, MethodBase __originalMethod, object __instance, object[] __args)
lucid iron
#

out is a kind of ref too right

gray bear
#

horror movie esc

proud wyvern
#

if __state makes it "side-effect", then i'd call that a flawed implementation on Harmony's side

#

flawed or straight up a bug

iron ridge
#

looks like it's first transpiler time then

woeful lintel
#

You can with FF

#

can I steal some of this for FF doc? I've had a hard time explaining depth as well.

lucid iron
#

Yeah sure although idk if you used this particular SortTileOffset logic

#

This one's based on how buildings work

fast plaza
#

Has anyone looked at a system of giving monsters debuffs? I've implemented something for it but it feels very hacky so I was wondering if there's any better ways that people have used

lucid iron
#

Monsters are hacky period

fast plaza
#

forreal

lucid iron
#

That said, are you doing anything beyond granting them a buff and then checking that in whatever relevant harmony patch?

red egret
#

yes please Bea

gray bear
#

just replace or would like addtional hairstyles on top of vanilla

lucid iron
#

Idk if monster stats natively respond to buff fields either, maybe?

red egret
#

whatever is easier

gray bear
#

first one

fast plaza
#

yeah monsters don't seem to have buff fields at all from what I've seen. I think thats only on farmers actually

lucid iron
#

That does make sense yeah

fast plaza
#

my method was using the modData for the character class then updating the value and applying effects like poison damage on an interval in the monster update method

gray bear
# red egret whatever is easier
    "Format": "2.75",
    "Changes": [
        {
            "Action": "EditImage",
            "Target:": "Characters/Farmer/hairstyles",
            "FromFile": "nameofpng.png"
        }
    ]
}```
fast plaza
#

but that feels awful to do, and I'm not sure how It works in multiplayer at all since I'm not quite sure where update logic is applied for clients

gentle rose
gray bear
#

actually that would remove some vanilla ones, give me a moment

gentle rose
#

anything else could be skipped by an earlier skipping prefix

red egret
#

i dont mind

gray bear
#

i mean u can make it not but if u dun care shrug

fast plaza
#

actually I'm using the Manners value since its unused on monsters and is a NetInt for some reason but that feels even worse. I'm unsure if I should change it to use modData cuz I'm not sure if a dictionary lookup would be too much extra load for such an important method.

red egret
#

i will use only 1 hairdo

#

and i will edit the png a tiny bit too

#

should i put the Replace there too?

gray bear
#

you wanna use, 1 hairdo from all of the ones in the mod?

red egret
#

yea

gray bear
#

which one

red egret
#

second set, last one

gray bear
#

this one?

red egret
#

yeah

gray bear
#

alright gimmie a moment

lucid iron
fast plaza
#

its poison damage, every 90 frames it deals some damage to the monster

fast plaza
#

the system I have works atleast in singleplayer but it feels wrong to mess with an update method like this

gray bear
#
    "Format": "2.7.5",
    "Changes": [
        {
            "Action": "EditImage",
            "Target": "Characters/Farmer/hairstyles",
            "FromFile": "hairstyles.png",
            // takes the hairstyle you want
            "FromArea": {
                "X": 112,
                "Y": 96,
                "Width": 1,
                "Height": 4
            },
            // replaces first vanilla hairstyle
            "ToArea": {
                "X": 0,
                "Y": 0,
                "Width": 1,
                "Height": 4
            }
        }
    ]
}```
brave fable
#

well things have to happen at some point right

fast plaza
#

true

brave fable
#

my only concern would be using Ticks as a duration instead of TotalGameTime or ElapsedGameTime

#

if you say you're counting frames

gray bear
fast plaza
#

thats probably a much better system yeah

#

I'll have a look at that

#

was very sleepy when I wrote the ticks system hah

red egret
#

aha i get it, tysm Bea!

gray bear
red egret
#

hairstyles are 4 height? 😮

brave fable
#

what SDV usually does is use a counter variable and check for if (counter -= time.ElapsedGameTime.TotalMilliseconds <= 0) counter += duration or somesuch

lucid iron
#

Oh i implemented poison damage actually (in a silly way)

red egret
#

6 i guess for the back one too

gray bear
#

height and width here are tiles

#

wait should it be tiles e_stares

#

i check wiki

red egret
#

yep 2 tiles high each

gray bear
#

yep i am mistaken

#

tiles is for map

gray bear
#

"X": 16, "Y":64

fast plaza
#

ooo thats really good

lucid iron
#

DelayedAction.functionAfterDelay is a vanilla util that does what it says on the tin

#

You can probably just do that

iron ridge
# iron ridge looks like it's first transpiler time then
matcher.MatchStartForward(
                    [
                        new(OpCodes.Call, AccessTools.PropertyGetter(typeof(Game1), nameof(Game1.currentLocation))),
                        new(OpCodes.Isinst, typeof(Summit)),
                        new(OpCodes.Brtrue),
                    ]
                );
                matcher.ThrowIfNotMatch("Failed to match summit check");
                matcher.RemoveInstructions(3);

this doesn't seem to remove the check, but it also doesn't error/throw which indicates it worked?
the other checks in the if are all true, and it does rain on other maps

fast plaza
#

thats awesome, tysm!

lucid iron
#

It looks like i forgor to check if monster is dead tho

#

I'll uh, fix that later

gray bear
#

[note to self: to and from area use tiles for editmap and pixels for editimage]

red egret
#

aha

brave fable
red egret
#

so no width and height necessary?

brave fable
#

did you also return matcher.InstructionEnumerable when you're done?

gray bear
#

wait no

iron ridge
lucid iron
iron ridge
brave fable
#

ah so u do

gray bear
red egret
#

i see

brave fable
#

i hadn't read the description, figured it worked differently

red egret
#

i will test it

hallow prism
#

!stone

ocean sailBOT
#

🪨 The item ID for Stone is 390.

lucid iron
#

Pillow you can print your final list of IL to double check if working as expected

iron ridge
#

as in logging matcher.Instructions()?

gray bear
lucid iron
hallow prism
#

yes, it is easier than searching the 50 different stones that aren't real stones

lucid iron
iron ridge
ocean sailBOT
#

Log Info: SMAPI 4.3.2 with SDV 1.6.15 build 24356 on Unix 6.11.0.29, with 5 C# mods and 1 content packs.

red egret
#

okay it works! 😄 ty Bea

gray bear
#

np!

#

enjoy hair

iron ridge
#

looks like it did remove them correctly

endfinally NULL [EX_EndException]
call static StardewValley.GameLocation StardewValley.Game1::get_currentLocation() [Label7, Label8, Label10, Label13, Label14, Label17]
callvirt System.Boolean StardewValley.GameLocation::IsRainingHere()
brfalse Label18
ldsfld System.Boolean StardewValley.Game1::eventUp

vs original

    IL_02a3: endfinally
} // end handler

IL_02a4: call class StardewValley.GameLocation StardewValley.Game1::get_currentLocation()
IL_02a9: callvirt instance bool StardewValley.GameLocation::IsRainingHere()
IL_02ae: brfalse IL_03ab

IL_02b3: call class StardewValley.GameLocation StardewValley.Game1::get_currentLocation()
IL_02b8: isinst StardewValley.Locations.Summit
IL_02bd: brtrue IL_03ab

// (no C# code)
IL_02c2: ldsfld bool StardewValley.Game1::eventUp
IL_02c7: brfalse.s IL_02f9
lucid iron
#

Yep just check

#

Transpilers r pretty manual like that

iron ridge
#

ah

#

very odd it doesnt work then

lucid iron
#

Where does IL_03ab go

iron ridge
#

that's the other side of the if

lucid iron
#

Hrm no clue then Dokkan

iron ridge
#

mhm

hallow prism
#

note to self : forgetting tree texture makes the game crash

true coyote
#

So I'm looking at the vanilla bag config json for item bags, would it be possible (after making a back up copy) to change the set up so the bags are more like some of the mod added all-in-one bags? I really enjoy the all in one bags and there doesn't seem to be any vanilla ones... if that makes sense

iron ridge
lucid iron
#

If you do it you match more specifically

iron ridge
#

ah

hoary lake
#

Idea: when you boop prismatic shard at the dessert. You get a random galaxy weapon rather than just the sword.

#

You could also have a rare chance of getting a infinity weapon or whatever they are called in vanilla...

iron ridge
#
✦ ❯ dotnet build
MSBuild version 17.7.6+77d58ec69 for .NET
  Determining projects to restore...
  All projects are up-to-date for restore.
^CAttempting to cancel the build...

Build FAILED.
    0 Warning(s)
    0 Error(s)

Time Elapsed 00:02:58.15

BeaSummitPatches on  master [!] via .NET v7.0.410 🎯 net6.0 took 2m58s 
✦ ❯ rm -rf ./bin

BeaSummitPatches on  master [!] via .NET v7.0.410 🎯 net6.0 
✦ ❯ rm -rf ./obj

BeaSummitPatches on  master [!] via .NET v7.0.410 🎯 net6.0 
✦ ❯ dotnet build
MSBuild version 17.7.6+77d58ec69 for .NET
  Determining projects to restore...
  Restored /home/pillow/Programming/BeaSummitPatches/BeaSummitPatches.csproj (in 140 ms).

is it normal for dotnet build to just hang

hallow prism
#

where is iridium krobus texture located? i don't remember if it's a furniture or a craftable

lucid iron
#

🎯

#

It's not normal but it might be nuget problems?

iron ridge
hallow prism
#

hmm, i don't see it

brave fable
#

funny purple krobus is in the bottom right of tilesheets/furniture.png

hallow prism
#

thanks!

iron ridge
#

oh it looks like theres a bunch of orphaned processes

#

yep killed them and almost instant compile

cold marsh
#

Can you use the game's own junimos in events or is the only way out to make temp actors?

hallow prism
#

so

#

i did use one, but i think some stuff is hardcoded (color change and size)

cold marsh
#

If color change is restricted then it's no good, I've been dreading a new event due to the multiple colored junimo sheets I'll need

hallow prism
#

then i don't really have a suggestion

#

maybe look at eli and dylan how they did it, i believe one of their event is full of colored junimos

lucid iron
#

Does the event version of temporary animated sprites take a color arg

#

Yeah it do, it should be possible then

iron ridge
#

ah my favourite an invalid program
https://smapi.io/log/4ba20e7063fe41aa8b672d1795e9d989

matcher.MatchStartForward(
                    [
                        // new(OpCodes.Ldloc_S),
                        new(OpCodes.Ldstr, "Summit"),
                        // new(OpCodes.Call),
                        // new(OpCodes.Brtrue),
                        // new(OpCodes.Ret),
                    ]
                );

                matcher.Instructions().ForEach(inst =>
                    {
                        smonitor.Log(inst.ToString(), LogLevel.Info);
                    }
                );

                matcher.ThrowIfNotMatch("Failed to match gamelocation specific flair check");
                matcher.RemoveInstructions(1);

(i'm just trying to see if just the string will get matched, it's the only reference to that string in the method so technically should work)

ocean sailBOT
#

Log Info: SMAPI 4.3.2 with SDV 1.6.15 build 24356 on Unix 6.11.0.29, with 5 C# mods and 1 content packs.

iron ridge
#

oh i probably shouldnt just remove the one instruction

#

how is it still dark

#

its definitely replacing it

gray bear
#

summit cursed

bleak spade
#

Does anyone know what this tile is for?

#

I've never found out what tree its meant for

gray bear
#

no clue tbh

obtuse wigeon
#

(I had a recolour during this patch export so it doesn't match perfectly)

gray bear
#

mini tree

true coyote
#

If we're talking about the one that's just a stump, I think it's for some of the oob trees? I've seen them near the mountain lake, only because I think in the starblue update for spring they forgot to recolor the grass, that bright green vanilla grass stands out a lot in it and I've been trying to find this stump. I'm probably just tilesheet blind

iron ridge
obtuse wigeon
#

Does the state of endless fortune produce loved items of modded NPCs, or modded items automatically? or do they have to be added/it's hardcoded?

brittle pasture
#

it produces the first item in their loved list, and yes it works with modded npcs

obtuse wigeon
#

Oh perfect thank you

young sluice
#

Howdy folks! I'm running into a bit of a strange error - "[Content Patcher] Error loading patch 'Alx's Additions > Include code/Items/Objects.json': file contains fields which aren't allowed for a secondary file (Format).."

#

that's my content.json

#

this is the objects.json file

finite ginkgo
#

Just as the error says, secondary files, or for a simpler name includes, can’t have the “Format” field, simply remove it from objects.json

young sluice
#

Aaah!

#

Thankyou very much 🙂

pine elbow
urban patrol
#

move it to line 47

pine elbow
pallid sundial
#

Queeeeeestion. I want to make a compatibility patch between two mods, where one of them has "ask first" permissions and comments locked, but they're active here...where do I ask them? Do I DM, do I ping them in one of the making-mods channels? There's nothing in the rules about this and I'm terrible at inferring social norms. D=

lucid iron
pallid sundial
#

Reskinning a single building. I'm trying to make Elle's Town Buildings compatible with Piper - A Pierre Rewrite by adjusting the sign on the Elle's texture to have the "Piper's" sign.

gray bear
#

oh. yeah just ping her

#

actually is she in here

#

is she okay with pings? maybe a dm is better? user is Elle (junimods)

pallid sundial
#

Yeah that's what I don't know. Etiquette! My nemesis!

ornate trellis
#

i at least dont see a "dont ping me" in elles profile or name (personally speaking I prefer pings over dms, but i jsut dont like dms from people i dont know lol)

pallid sundial
#

Well, if there isn't an explicit "don't", I guess it's ping time! Thanks folks. nervous!

gray bear
#

I think she's like sleeping anyway

#

I asked her about it, will let u know what she says

pallid sundial
#

Oh! Uh. Okay! Then, thank you for that, too! X)

ivory plume
#

(Experimenting with bomb radius in Data Layers, now that we have the new 'auto' layer. Still not settled on the color scheme though.)

gray bear
#

can I dm u for the answer?

pallid sundial
#

Sure sure!

gray bear
#

is that pink? what is color

ivory plume
#

(Magenta.)

gray bear
#

good color 10/10

obtuse wigeon
#

Is the dig radius always perfect? also I too like the colour

crude plank
#

it's bright so you pay attention to it which is important when it comes to bombs SMCPufferThumbsUp

ivory plume
#

Every tile within the dig radius has a pretty high chance to be dug, but it's not guaranteed.

gray bear
#

ooh interesting

obtuse wigeon
#

Ahh okay that's what I thought, was just a bit confused with the perfect dig area

ivory plume
#

(I just bombed twice to compare the actual radius with what Data Layers shows.)

pallid sundial
#

@deep plume Hi! I'd like to create a compatibility patch for Elle's Town Buildings and Piper - A Pierre Rewrite. It just involves swapping out the sign on Pierre's store to be the "Piper's" sign from that mod. I've already asked the other author for permission (still waiting for a response), and wanted to get your go-ahead, too!

iron ridge
obtuse wigeon
#

the summit really is cursed, wow

hard fern
#

Ahhhh nice to see so many people fighting the summit

gray bear
#

I am sorry pillow for introducing you to the summit of nightmares

#

it just defies everything

iron ridge
oblique meadow
#

So im finding that Content patcher isnt letting me do operators for time. How can I trigger something to happen only between the hours of lets say 10 and 12. I dont see it on the git or the wiki.

brittle pasture
#

is this event or trigger action

uncut viper
#

also what do you mean operators for time

obtuse wigeon
#

I'm guessing operator being < or >

oblique meadow
#
           "Weather": "Sun",
       "Time": ">=1900",
       "Time": "<2600"
            },```
#

Throws an error saying time needs to be an integer so I cant use the operators

urban patrol
#

use {{Range}} instead perhaps

#

but also if it's an event then that's built in with preconditions

oblique meadow
#

Im trying to trigger an editmap action between specific times only

uncut viper
#

the token docs show how to use the time token with a range

oblique meadow
#

I missed that. I'll check

#

thanks

uncut viper
#

time is not unique in that regard by the way, you can't do operations like the way you wrote it for anything

#

if a situation is encountered where range does not suffice (or just manually writing the numbers), Query allows mathematical expressions, though should ideally be used sparingly

#

also, you cannot have duplicate keys in a single json object either

obtuse wigeon
#

Why should query be used sparingly? performance reasons I'm guessing?

uncut viper
#

performance reasons, yeah. as with most performance-related concerns with CP, its not likely to be noticed on its own ever

#

relative to most tokens theres more work that goes into parsing a Query expression and evaluating it, and it has to redo it every time it checks the token after an update

obtuse wigeon
#

Ahh I can see how that adds up quick

sudden estuary
#

Shoot lemme clarify

#

I should have forwarded

uncut viper
#

oh i see, thats a message link, not a channel name

#

thats more my bad, sorry

sudden estuary
#

Nah it's fine I'm not the best at communicating lol

hallow prism
#

speaking of query, if i want that :
"Query: {{Random: {{Range:1,101}} <= {{MyValue}}": true,

Has a higher chance of happening, is
"Query: {{Random: {{Range:1,101}} <= ({{MyValue}}+20)": true,
The proper format?

#

(+20 is just a placeholder value)

hot gale
#

Got the NPC generator outputting full sheets with all animations

obtuse wigeon
#

Aye nice one! i saw the NPC generator on nexus, I just wish I had a use for it

hot gale
#

I felt like I might be the only one who would use something like that, I attempted to accomplish something similarly ingame with C# and it did not like me touching FarmerRenderer at all

#

Decided to upload it though, thought maybe someone out there could use it

obtuse wigeon
#

I remember your attempts to tame the wild wild DarmerRenderer, certainly not the most friendly this that's for sure

#

I can defo see use for people making seasonal outfits and custom NPCs

hot gale
#

Will save a lot of time for developers who dont need or want anything more than a very basic npc

blissful panther
#

(I feel like I'm obligated to send a message given there's a Gohan in the channel.)

hot gale
#

lol

#

I wish I had something like this for myself when I was working on my artisanal honey mead

#

I ended up reusing NPCs from nexus that were marked as free use ;p

#

The logic for this still cant be executed ingame sadly, so my thought for using the logic transposed into the game somehow would work but alas it does not FarmerRenderer is so guarded

#

So now, if I can get the game to translate my custom sheets will the full animation sets I can export externally..

#

I can use random sheets as random humanoids in Mayor's Town instead of the janky dwarf art I edited

#

I'll have to include like.. thousands of sheets for the mod to pull from though lmao

#

I want my villagers to be fully animated. Farming, eating, fishing, etc

uncut viper
hot gale
#

I might end up turning this generator into a full blown framework if I can get NPCs animating properly ingame with all the actions

#

So users can generate these random NPCs, get their full animation sets and have a lot more possibility with what to do with NPCs

#

We'll see 😁

hallow prism
#

i believe i ate the }} when cleaning stuff, thanks

pine elbow
#

Hello, does anyone know if there's a way to enable cabin construction on other maps? I've managed to enable buildings, chicken coops, barns, etc. I can build on other maps, but the cabin only appears on the farm... Is there a way to change this?

inner harbor
#

(Far better than using other people's NPCs, free use or not)

willow nest
#

Hello. Is there a way to trigger an action for when the game exits? Like OnReturnedToTitle but for when closing the game. Thank you in advance.

lucid iron
lucid iron
willow nest
#

Update a discord webhook when the game is closed

inner harbor
#

It uses the Seasonal Cute model as well which is super useful for when I do my seasonal cute compat

lucid iron
#

Can you just make the web hook do periodic heart beat

#

To assert that game is up or down

lucid iron
#

What's the crediting situation for the dollmaker?

uncut viper
#

that dollmaker credits a lot of things with various levels of permissiveness that makes me feel like i wouldnt want to use it, from a licensing standpoint

lucid iron
#

Ik it's a combo of several artist's work so i was never sure what I'd write on my mod page if i used it

uncut viper
#

Seasonal Outfits alone has a bunch of artists that i didnt see proof of permission for, and Slightly Cuter doesnt allow uploading their work to other sites, so if theyre used in the dollmaker...

#

and Genderswap Bachelorettes has pretty strict permissions too

willow nest
lucid iron
#

Unfortunate i guess i was thinking more of a discord bot

hallow prism
#

my feeling is that, if you need placeholder, using existing npcs is enough, and if you need art that is seen by others, there are better options than farmer or dollmaker

uncut viper
#

Webhooks are more of "do an action when they receive a ping"

#

for Discord that is

hallow prism
#

but of course, having the option to make stuff myself is influencing this viewpoint

uncut viper
#

most commonly that action is sending a message

#

so yeah, they dont act on their own so cant react to lack of a heartbeat

pine elbow
willow nest
#

Well, thank you anyway. Just needed some confirmation. The tool is mostly done then.

lucid iron
#

But hrm, maybe you can build cabins if the location is AlwaysActive?

#

I don't know if they had to be Farm exactly

pine elbow
#

Yes, I already use the AlwaysActive properties, and on the map I use the properties: IsFarm = T and CanBuildHere=T
These properties enabled the construction of buildings, but not cabins.

hallow prism
#

i know cabins have a special logic

#

i don't remember which one

blissful panther
#

Definitely hardcoded to only be buildable on the farm, though. So C# town it is.

iron ridge
#

and when the game exits it wouldn't've hit the delete, in theory

uncut viper
#

seems like itd be pretty unreliable to rely on the game to be closed exactly between the message being sent and the message being deleted, though.

lucid iron
#

Can webhooks respond to discord rich presence

iron ridge
#

No

uncut viper
#

and it wouldnt be useful as a "server went down!" alert if thats the goal

#

because you'd need to mute the alerts

lucid iron
#

No fun allowed 😔

iron ridge
#

Web hooks can't do anything, they just get sent data and do it

uncut viper
#

(or not necessarily server but yknow, general "Game closed" alert. an alert is not so useful if you have to ignore it)

lucid iron
#

Maybe the answer is just make discord bot then

willow nest
#

I really need a native way to check when the game is closing.

#

I don't want to host anything. The webhook is good enough.

uncut viper
#

theres just kinda inherently not gonna be a good way to guarantee that a thing is Closed when you are relying on the thing itself to report that it is closed

lucid iron
#

I don't think anyone except the OS can reliably know about a process exiting...

uncut viper
#

the game is not in control of how it is closed or when

iron ridge
#

Are you looking for

  • title screen exit button pressed
  • exit to title in pause being pressed
  • the window's X being pressed
  • process being forcibly killed
#

First two definitely easy enough, third maybe - depends on how low level you can go + how that works internally, fourth definitely not

willow nest
#

If it is forcibly killed I can let it pass, but the others should have a way to check it.

iron ridge
#

I know some malware can ignore the window X so I think that's just a standardised, but optional, response to it being clicked

lucid iron
#

Hm actually

#

SMAPI has a disconnected game logging right

#

Harmony wherever that is?

willow nest
#

Does the game just close. Does it not "pack its things properly" and then close?

uncut viper
#

SMAPI cant do that if the process is closed forcefully enough that it kills SMAPI

uncut viper
#

and if you're not worried about force closes and are fine enough with the first two bullet points that Pillow described, then its not difficult to just look for those button presses

willow nest
#

Yeah, that sounds good enough

#

Actually I would only need to check the second case, as the first one is already included in something I already control

blissful panther
#

You could at least experiment with the GameRunner.instance.Disposed event? Might not work reliably if at all, but it's worth testing.

willow nest
#

oh boy

lucid iron
#

Hey it's nice and easy to patch

blissful panther
#

Oh hey, and it looks like it probably bubbles through to Game's Dispose() method, too.

#

Hmm, no, probably not.

lucid iron
#

I'm interested hear which crime works the best

blissful panther
#

Yeah, definitely ping me if you try either of them. Whether they work or not. I'm slightly invested now.

willow nest
#

OnGameExiting did not update the webhook.

lucid iron
#

Did you try both the button on title menu and the close X

willow nest
#

Sorry. It's late here. I'm not thinking properly XD. I tried using the return to desktop button. Let me check the close X

#

Same thing.

#

I'm going to discuss all this with my pillow. Thank you all for the help 👍

uncut viper
#

you can search with ILSpy

#

its in CarpenterMenu

proud wyvern
willow nest
#

Thank you. I'll check it when I wake up 🙂

deep plume
worn oar
#

how would I add a respawning hardwood stump to a farm with tiled?

pallid sundial
deep plume
pine elbow
winged charm
worn oar
uncut viper
urban patrol
#

same thing with your i18n on line 339

vernal crest
#

That's a modding wiki problem, there have been some changes to some templates lately and that has caused problems

#

I'll go fix today

winged charm
winged charm
brave fable
vernal crest
#

* especially the videos are outdated. Videos take a lot of work to produce lol

brave fable
#

you'd need to make a new mod (with a new manifest, etc) following the guide on the mod page

#

so your CP mod loads the farm map and adds the data, and the FTM mod spawns the stumps as you provide

worn oar
#

I edited an existing mods map for personal use and It hink it already has ftm

brave fable
#

i've not made an FTM mod myself, but it's very well documented, and there's plenty of mods using it if you needed working examples

winged charm
brave fable
#

that'll make it easier then, you just need to edit the FTM json file to add your new spawns

worn oar
urban patrol
#

what is the exact error you’re getting with {{ModId}}_NPCAiden being invalid

winged charm
urban patrol
#

oh i see line 345 you have a stray [

brave fable
urban patrol
#

also @winged charm where is aiden’s house located?

winged charm
urban patrol
#

no sorry not the file i mean how do you get there in the game

winged charm
#

I've been using the debug warp so far, but after making all of the fixes to content.json I get this error, [game] Failed parsing warp 'a' for location 'Aiden.Haydel_NPCAiden'. Warps must have five fields in the form 'fromX fromY toLocationName toX toY', but got insufficient fields. I would like to load into the map from BackWoods.tmx

urban patrol
#

okay, i have a few suggestions

  1. that error means what it says. check your warp and make sure it matches that format--it seems like you have less than 5 arguments
  2. if you want the house to be in the backwoods, then i recommend using EditMap instead of Load. Loading will decrease compatibility with other mods that may edit the backwoods
worn oar
vernal crest
brave fable
#

author's note: never made a custom farm map/type

#

huh, should've figured someone would have made their own greenhouse entry begone replacement in the year since 1.6 broke mine

winged charm
brave fable
#

actually I'm surprised the greenhouse hasn't moved to using draw layers for the patio and shadow. drawing tiles by index seems rather outdated

urban patrol
#

oh, if your house exterior has its own map/location that you made, ignore what i said about loading SDVpufferthumbsup

winged charm
#

I found out that in Tiled, my warp was changed to a 🤦

brave fable
#

wonder if it's worth splitting greenhouse patio remover + farm building shadow remover into 2 mods. a bit hard to search for shadow hiding when it's on the greenhouse mod

proven spindle
winged charm
tiny zealot
#

integrating with other mods for compatibility is mostly "taking different actions depending on whether X mod is also installed"

#

in content patcher, that generally means having multiple patches or extra patches and gating some of them behind When/{{HasMod}}

#

unfortunately, it's tedious work and there are few to no shortcuts

winged charm
urban patrol
urban patrol
#

you can do whatever you want. i would recommend something descriptive like AidenHouseInterior

lucid iron
tender bloom
#

@brave fable I found big tree

brave fable
#

EXCUSE ME

#

I KNOW THAT BIG TREE

tender bloom
#

😄

next plaza
tender bloom
#

There’s other cool big trees here too

hard fern
#

That's a pretty big tree

#

Wouldn't you say

next plaza
#

Then I'll get dragged into modding again when I wanna work on my game projects 😔

tender bloom
#

This one might be bigger

brave fable
#

THERE'S COOL GINKGO TALISMANS IN THE OMIKUJI SHOP NEXT TO THE MAIN SHRINE BTW

#

THEY'RE GOLD AND SHAPED LIKE A LEAF AND HAVE A SMALL BELL

uncut viper
#

perfectly average trees

tender bloom
#

Leaf! I’ll take a look SDVpuffersquee

lucid iron
hard fern
#

:( i wish i had a little leaf. (Where exactly is this giant tree)

tender bloom
#

Akasaka, Tokyo!

next plaza
hard fern
#

:o i see

lucid iron
#

unfortunate

tender bloom
#

Apparently it feels like 108F here

brave fable
#

THATS A BIG NUMBER IT WAS REALLY WET AND COLD WHEN I WENT THERE ALSO CHECK OUT THE MOSSY BIT DOWN THE STAIRS TO THE RIGHT WHEN YOU LOOK AT THE SHRINE

tender bloom
#

It’s a little more tropical than mossy looking rn

#

They also have floats on display

brave fable
#

YES

hard fern
#

I had the misfortune of experiencing summer in japan and it was so hot i thought i would die

tender bloom
#

And many many lanterns

#

We’ve been mostly up in the mountains or by the ocean, today is our last day so we’re in Tokyo

#

And man is Tokyo brutally hot

#

The mountains and the ocean up north was a bit cooler

brave fable
#

ohhhh your last day, i would've recommended you a nice bar in akasaka

#

hie jinja is maybe 15 minutes away towards akasaka station, it's a nice but modern temple but the wisteria wouldn't be flowering atm

#

enjoy akasaka hikawa! definitely my favourite shrine, if you pass by tokyo tower there's also zoujouji which is huge and very concretey but with some impressive buildings and they do sermons at 4pm

tender bloom
#

We went through a park with wisteria area but it was indeed not flowering

tropic hare
# lucid iron unfortunate

Hi, I'm back. Critter can now appear normally on the map. But I had a problem when setting up the triggers. I wanted the fireflies to appear at night on the custom map, but the "condition" didn't seem to work:

"Action": "EditData",
"Target": "Data/TriggerActions",
"Entries": {
"{{ModId}}_MapFirefly": {
"Id": "{{ModId}}_MapFirefly",
"Trigger": "DayStarted",
"Conditions": "LOCATION_NAME CustomMap, TIME 1800 2600",
"Actions": [
"mushymato.MMAP_CritterRandom 0.04 Firefly #FF99CC 1 Firefly #80C0FF 1",
"Spiderbuttons.BETAS_Message \"Fairyflies appear\"" ],
"MarkActionApplied": false
}

}
}, ```
When "Trigger" is set to "DayStarted", players will see fireflies in the waking farmhouse. When "Trigger" is set to "LocationChanged", fireflies will be triggered whenever the player enters a new map. The "condition" is merely the time, and it cannot be triggered at the normal time. I have no idea what to do now.〒▽〒
tender bloom
#

We’re probably going to hide indoors shopping ngl, 108F “feels like” is intimidating

lucid iron
#

hm are you sure your conditions do anything valid

#

its spelled Condition anyways

tender bloom
#

Patch summary should tell you if conditions are met

#

Wait nvm

#

That’s for CP

#

HMM

lucid iron
#

and the first GSQ should probably be PLAYER_LOCATION_NAME Current <the internal id of your custom location>

tropic hare
lucid iron
#

in the future you can try patch export Data/TriggerActions then you can see what data actually made it into the game

#

mushymato.MMAP_CritterRandom is designed to be used with LocationChanged hence why it is like this (one time check of spawn on every tile)

winged charm
brave fable
urban patrol
brave fable
#

some wild handwriting on the red stamps

tender bloom
brave fable
#

that's fair, i usually never collect random trinkets but this is DIFFERENT and IMPORTANT and LEAF
also HAVE FUN IN AKASAKA/TOKYO ENJOY UR HOLIDAY IT'SW GREAT THERE

winged charm
tropic hare
urban patrol
lucid iron
#

ah yea big npcs path finding is cursed rn

#

i think it's up to you what you want to do, there are frameworks like MEEP that let you have a big npc like entity

#

it's also a thing that might get fix in 1.6.16?

brave fable
#

honestly if your NPC is that big and immobile i'd make sure they're encased in invisible Buildings tiles to stop the player from walking through them

#

otherwise they'd be walking all up inside them and that's a huge invasion of personal space

urban patrol
#

i almost made a typo that would have sent me straight to bouncer hell

tropic hare
lucid iron
#

oh if they weren't supposed to move anyways just make them (animated) map tile SDVpufferthumbsup

brave fable
#

i would've recommended making them a map tile but it's easier to schedule animations if they're an npc

lucid iron
#

hm

brave fable
#

and you can fudge things like friendship and dialogue with the data

lucid iron
#

did you want to do the funny mmap thing where you have them be secretly a furniture with open anim state yggy

#

or was that something else

tropic hare
lucid iron
#

yea in that case i think i'd do something like this:

  1. big group of map tiles, tail wag animation as map tile anim
  2. map action for interaction where you can get dialogue stuff
    since you are using mmap anyways consider question dialogue
#

you can make a dialogue tree with this if u chain enough of them YuniShake

tropic hare
tender bloom
brave fable
#

CONGRATULATIONS 🥳SDVpufferparty🥳SDVpufferparty

#

(that's extra double cool & wonderful to me since there were two (2!!) shinto weddings happening when i went there the second day it's a place for MARRIED COUPLES AND TREES)

winged charm
brave fable
#

is your location named {{ModId}}_AidenMapInterior? be sure to use the exact full name as it appears in your code.

urban patrol
#

debug warp is a fuzzy search i'm pretty sure so that should work

#

but it wouldn't hurt to try the exact name

brave fable
#

maybe share your content json again?

urban patrol
#

and make sure to type out your mod id

latent mauve
#

also make sure you are using your actual UniqueID instead of {{ModId}} in the debug code

#

(nic beat me to it)

tiny zealot
#

Hey everybody, I made another niche framework. This one lets you set up sounds and music to play when the player is nearby. If you ever wanted to make your own BrookSounds but you didn't know C# or didn't want to deal with all the hardcoding, this mod could be for you!

https://www.nexusmods.com/stardewvalley/mods/37134

Nexus Mods :: Stardew Valley

A framework mod that lets mod authors define background sounds and music that play when the player is in proximity to them. Use with Content Patcher.

latent mauve
#

ooooh, I like it

brave fable
#

holy fuck thank you

brave fable
#

i'm so sick of tampering with ambient sounds

latent mauve
#

Time to scope-creep myself into making the lost woods maze with sound cues.

lucid iron
#

toot

winged charm
brave fable
#

yeah your warp is malformed

winged charm
#

Oh? :o

brave fable
#

at a glance the debug warp should still work though

#

10 18 AidenHouseInterior 12 5
see the issue?

urban patrol
#

the only thing i can see that might be an issue is maps vs Maps in the map path but i'm pretty sure it's not case-sensitive...

hard fern
#

wouldnt hurt to try capitalizing it though

winged charm
#

I do have the folder named maps. Let me try that

urban patrol
#

can you patch summary YourModIdWrittenOut and send that log

brave fable
#

(if you don't see the issue, your location is actually named {{ModId}}_AidenHouseInterior. there is no location named AidenHouseInterior in your game)

latent mauve
#

It will save bug reports on Linux/Mac if your targets and FromFiles are the correct capitalization

lucid iron
#

i think the best approach is just use all lowercase blobcatgooglyblep

brave fable
#

everybody knows targets are TitleCase and fromfiles are lowercase. it's the law

urban patrol
#

making me realize i did that and not even on purpose

winged charm
urban patrol
#

which map are you successfully visiting? interior or exterior?

brave fable
#

well that's with debug warp, which will happily use a partial match on your location name

#

your actual AddWarps patch wants the exact full name though, but you've only given it AidenHouseInterior, which isn't the full name

winged charm
urban patrol
#

then yes if you still can't debug warp to your interior map then send the log

brave fable
#

full location name, not full file name

brave fable
#

i.e. the name of the entry in your Data/Locations patch

#

quiet you

ocean sailBOT
#

Log Info: SMAPI 4.3.2 with SDV 1.6.15 build 24356 on Microsoft Windows NT 10.0.19045.0, with 3 C# mods and 1 content packs.

urban patrol
#

you need to type out your actual mod id. that log doesn't show any patch summary because it didn't match

#

whenever you're working with the SMAPI terminal or chat commands, your mod id must ALWAYS be typed out in full

#

by the time the game sees your content pack, content patcher has already converted all instances of {{ModId}} into Username.ModName

brave fable
#

(more specifically, only Content Patcher uses {{tokens}} , and only in certain contexts)

urban patrol
#

actually what's really strange is that the log says you've visited both locations lol
HasVisitedLocation | [X] Aiden.Haydel_AidenHouseInterior, Aiden.Haydel_NPCAiden

hard fern
#

sigh i feel defeated by this mod

#

this is the correct way to mark a location as a greenhouse right???

winged charm
ocean sailBOT
#

Oops, couldn't parse that file. Make sure you share a valid SMAPI log.

hard fern
#

i checked on the wiki and it matches but im still convinced i did something wrong

brave fable
#

that is indeed the only log file smapi makes, unless you have multiple instances of the game running iirc

#

in any case that isn't a full smapi log, and it's also not showing a full patch summary because there's no content pack mod loaded with the unique id {{ModID}}_NPCAiden

#

there's probably one named Siroofsalot.MyFunnyModWithAidenInIt though

urban patrol
#

patch summary Aiden.Haydel

#

i believe that's your mod id, although it seems reversed

winged charm
urban patrol
#

yes. you need to type out your full mod id, because SMAPI doesn't know what a token is

brave fable
#

nope, only Content Patcher can use {{tokens}}.

urban patrol
#

you can find your mod id in your manifest

winged charm
daring skiff
#

I was going to make an extremely jank version of this before I found out this was happening.

tiny zealot
#

(dylan, please make sure to consult the author guide before switching to the 1.0 build, as there is one (minor) breaking change)

#

(a field was renamed (LocationName -> Location). it's not a big deal but don't get caught by surprise)

daring skiff
#

Noted. Congrats on the release of this.

winged charm
urban patrol
#

yay!

winged charm
# urban patrol yay!

Now to get the warp from NPCAiden to AidenHouseInterior to work forward and backwardsSDVpufferflat . Thank y'all so much for helping me out. You have no idea how much I appreciate it :)

brave fable
#

again, use the full location name in the AddWarps entry, including the mod ID

urban patrol
#

good luck! and if it's easier, since these are both custom maps, you can just do it in tiled instead of patching it after the fact. and yes do make sure to type out the exact location name

winged charm
winged charm
urban patrol
#

except for tiled can't read that token, so you would have to type out your mod id

#

but yes map properties>Warp

brave fable
#

for that reason i prefer to just use AddWarps in my content.json, since you can use your {{ModId}} token in location names there just fine

urban patrol
#

yeah both accomplish the same thing so it's up to you really

brave fable
#

but CP can't read {{ModId}} in tiled map properties because of internal magic bullshit

winged charm
urban patrol
#

you need a comma but that looks correct to me on first glance

brave fable
#

"this is a string", so the new line you've written is an entire new string

urban patrol
#

let me look at CP docs

brave fable
#

but yes, they're in a "ListOfStrings": [ "like this one", "and that one" ] so you should add a comma between each string

hard fern
#

im not sure where it is in the wiki but for the reveal taste dialogue, is that stuff random? if anyone can point me in the right direction if it is on the wiki then that would be great (i get lost on there)

brave fable
#

it's quite hardcoded, but it's randomly picked

#

you'll want to look at Strings/StringsFromCSFiles:NPC.cs.4083-4182

#

i will tap the sign if prompted

hard fern
#

ive only seen vanilla npcs use that dialogue line very rarely... so i can't increase the chances of it appearing, since it's hardcoded?

brave fable
#

the game checks for r.NextDouble() < 0.025 && heartLevel >= 1 above all other dialogue (other than greenrain), meaning there's a 2.5% chance for a character with 1 or more hearts (250+ friendship) to use the gift taste reveal dialogue

#

the character also needs to have some FriendsAndFamily characters with defined gift tastes in their character data

uncut viper
#

why not use the %revealtaste dialogue command

brave fable
#

the what

uncut viper
#

the command that reveals a characters gift taste

#

%revealtaste:<NPC Name>:<item id>

hard fern
#

the

brave fable
#
// Content (unpacked)\Characters\Dialogue\Lewis.json:
   "summer_Sun": "Say, are you growing any blueberries on your farm?#$e#I do enjoy a fresh blueberry.%revealtaste:Lewis:258",

intriguing.........

uncut viper
#

makes it all the more shameful that you didnt know it

hard fern
#

just one singular blueberry

pallid sundial
brave fable
#

now you mention it i think i've had this explained to me once before

hard fern
#

but to be fair the blueberries in stardew are massive for some unknown, mysterious reason

brave fable
#

rude

lucid iron
#

What if u r just a tiny baby forsy

hard fern
#

:o

lucid iron
#

As in the farmer

urban patrol
#

borrower valley...

#

that would actually be fun to make

hard fern
#

so are we all arietty

brave fable
#

mod that changes the blueberry crop sprite to a melon recolour (one big bloated blue berry)

urban patrol
#

scale up the maps x4 and give the player things like dandelion seeds to fly or whatever

hard fern
#

speaking of big bloated blue berries

brave fable
#

rude

hard fern
#

what the hell is a qi crop

lucid iron
#

Let's make a 5x5 giant crop

#

Actually can u do that

brittle pasture
#

yes

hard fern
#

can you make a 1x1 giant crop though

brave fable
#

how many crops does it take to form such a large crop

hard fern
#

i do think it's kinda funny that if you break a giant cauliflower you just get normal cauliflower as opposed to being showered in cauliflower florets like you should

brave fable
#

hurts a little having to remote the 'hide farm building shadows' behaviour from 'hide greenhouse entry tiles' to go in its own mod because that's gotta be at least 90% of the code in this mod

brave fable