#making-mods-general

1 messages · Page 57 of 1

teal bridge
#

Names are for the what, comments are for the why.

rancid temple
#

And I am for the "wtf why"

#

Mk, should be on there now

zenith robin
#

To make a custom building is it better to use Content Patcher, or just do it in C#? I cannot figure out what I am doing wrong with Content Patcher to add the building.

rancid temple
#

Depends on what you need the building to do, but if you need it to do anything that's not already in vanilla you'll need a C# component regardless

zenith robin
#

It's just an upgrade to a vanilla building. I am just increasing the map size.

rancid temple
#

Should be fine to do in CP then

zenith robin
#

I thought so.

rancid temple
#

!json if you share your files we can help troubleshoot

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.

rancid temple
#

!log also a log can be helpful

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.

zenith robin
#

I have been checking the logs and there is nothing.

rancid temple
#

The frequency those commands are together, I feel like we need a combined one

velvet narwhal
#

just name it !modmakinghelp or something if we don't have one

rancid temple
#

Yeah, bigger concern is that they're both fairly verbose commands so I wouldn't want to just mash them together and make a giant page long command lol

zenith robin
#

I may have found out what I did wrong. I was missing a brace.

rancid temple
#

Honestly, might be good to just have a wiki page explaining the sharing process too, since there's a lot of people who will follow the link and then not share anything

zenith robin
#

Only issue with using notepad for editing json files.

brave fable
rancid temple
#

!vsc was this the command

ocean sailBOT
brave fable
zenith robin
#

I have visual studio, but I am just too lazy to open it.

rancid temple
#

I would say more issues than anything

zenith robin
#

the only issue I really have with it.

velvet narwhal
#

i've transitioned out of even notepad++ for my json editing because the whitespace...... it kills the man

brave fable
#

visual studio code is way faster to launch and run than visual studio community, so it's convenient for json editing

#

comes with all the lovely bells & whistles too, like brace matching, auto indentation, syntax and error highlighting, sdv-specific schema validation, and so on

#

i just use sublime text for quick edits and visual studio community for basically everything tho

velvet narwhal
#

i'm still in awe about leroy's specific furniture framework schema that it actually previews the pngs on hover

brave fable
#

.. in a json file?

#

well now you have to share a screenshot lol

velvet narwhal
#

yeah i'm pulling up something now cause i forgot i dumped the project file immediately upon completing it SDVkrobusgiggle

rancid temple
#

That's neat

velvet narwhal
#

it might just be the format, actually

#

but still, great addition

teal bridge
#

Think that's just VSCode. It's just a JSON file after all.

brave fable
#

another great reason to move from notepad 😌

rancid temple
#

Hm, my VSC doesn't do that

teal bridge
#

If this were a campy 90s gameshow, we'd have a machine that automatically dumps a bucket of green goo on anyone who brings up using notepad to write mods.

brave fable
#

maybe we can all go to aviroen's place and use their vscode install instead

teal bridge
velvet narwhal
#

SMCKekLmaoDog my vs22? i'm pretty sure it's purely leroy's json format

#

cause none of my other jsons do that

brave fable
#

but your screenshot shows no schema selected

teal bridge
#

Yeah, JSON does not have the ability to magically to do that. It's an extension you have installed.

#

Even a schema wouldn't do that. Schemas just validate.

velvet narwhal
#

lemme see if i can replicate in a non furniture-framework json

#

nope

#

wait no, i'm stupid, yep it's an extension

#

anyway, vs22, great thing that i didn't even realize i had an extension for

rancid temple
#

Lol

velvet narwhal
#

it might've honestly been bundled together when i went to install the c++ component

#

it only works in the content.json though, so included files don't get the fun

teal bridge
#

Possibly they added something to VS, though a third-party extension wouldn't get bundled into the main install.

#

I'm fairly certain the only requirement is that the image path actually be reachable relative to the JSON file (or any other markup/code file) you have open.

proud wyvern
#

Visual Studio does that too, yeah

#

in C# code too

zenith robin
brave fable
zenith robin
#

Okay, it worked. Thank you. So that field is more or less just setting the name for the texture in Buildings then.

brave fable
#

yep, it makes use of that Load action you've got at the top of your content file to provide a file for that asset key SDVpufferthumbsup

#

given the chat about vs/c extensions, it'd be nice to know which ones people find helpful

brave fable
#

is anyone sure which of the many NPC dialogue methods you'd postfix if you wanted to maybe replace a character's dialogue stack for the day SDVpufferthinkblob

velvet narwhal
#

Uh BETAS docs has dialogue replacement

uncut viper
#

you can just call NPC.setNewDialogue

#

no harmony needed

brave fable
#

i wasn't particularly after harmony to get the behaviour right as such, just the timing

#

but if i can call it ondaystarted and use setnewdialogue that's fine by me SDVpufferthumbsup

uncut viper
#

i am unsure when the daily dialogue is chosen so im not sure if ondaystarted will work SDVpufferthinkblob but not hard to test at least

brave fable
#

unsurprisingly searching for 'stardew valley betas' gives you absolutely no results lol

uncut viper
#

searching on nexus will give you results tho at least

brave fable
#

but either way i'll just postfix currentdialogue's property getter

#

can't go wrong with that

velvet narwhal
#

Sorry I meant buttons BETAS SDVkrobusgiggle

#

I like how my autocorrect now understands my priorities

uncut viper
#

just remember to handle clearing the dialogue list first assuming you wanna completely override it

brave fable
#

yeh, setnewdialogue handles that SDVpufferthumbsup

uncut viper
#

o i thought you were postfixing the setter instead of doing anything with setnewdialogue my bad

#

er

#

i also misread it as setter

#

if that wasnt clear lmao

brave fable
#

well i'll do something either way lol

brave fable
#

hi, this doesn't actually seem to work in sdv1.6.9.24283 for the same reason as before SDVdemetriums
[19:20:01 TRACE SMAPI] Broken code in SpaceCore.dll: reference to Netcode.NetList`2<SpaceCore.Dungeons.SetPieceNetData,Netcode.NetRef`1<SpaceCore.Dungeons.SetPieceNetData>>.RemoveWhere (no such method).

zenith robin
#

Is there a way to replace the greenhouse and not have the game add a new one when you reload the save?

dusty scarab
#

hmmm, nope, I did not solve that like I thought I did. I can't seem to walk over this bridge in game, despite things otherwise looking like I should be able to. did I miss something somewhere?

unique sigil
#

unless of course the water can be entered

dusty scarab
#

the water cannot be entered, no. though, this same set up for Passable on Building layer is how it's done on the vanilla maps, so I'm confused why it's not working here. I suppose I could always wrap the river around the other way, since adding more room for crab pots was requested, but this way would give more room for crab pots

rancid temple
#

You have to name it TileData or it doesn't do anything

#

Oh wait that's on the tileset property?

#

I don't actually know if that works at all

brave fable
#

is the water beneath it passable? some water tiles have the passable property on the back layer to block you from walking into it. you have to use specific water tiles without passable.

rancid temple
#

Ah yeah, checked Farm_Ranching and it uses tileset properties for its bridge, so definitely check blueberry's suggestion

hoary lake
#

i thought of something recently....like just now.
what if your spouse could randomly decide to ||adopt a pet when it becomes a option||?

#

spouse/roommate

rancid temple
#

I guess it's a little one sided that you're the only one who gets to decide how many pets you have

velvet narwhal
#

but they get to decide when to have children SDVpufferthink

brave fable
#

there's one dog in the whole town. these guys really don't care about pets much lol

rancid temple
#

They ask about children though, it's still a group decision

#

Though if you pick at the edges of your spouse too much, you'll peel them off the 1 dimensional layer they live on

velvet narwhal
#

i have been thinking about what would even make spouses be better but it slips my mind

hoary lake
#

i love the idea of just coming home one day and abby is like "so...i did a thing" and it could be random or there could be unique pets depending on who you have as your spouse.

rancid temple
#

Truly the only issue I have with them just deciding to adopt a pet is that it's very similar to them just deciding to change decorations in my house, sometimes I'm fine with what I have going on and don't actually want the ugliest flooring to ever exist in my bedroom

#

Unique pets would be cool

woeful lintel
velvet narwhal
#

they already have the unique weapons

#

ig it's feasible, something just has to check for a watering bowl, right?

brave fable
#

every once in a while a new frog appears somewhere in the house. sebastian is keeping quiet. maybe if you keep going to the desert you won't notice

#

he slips another frog under the bed.

velvet narwhal
#

alex, the local cat dog lady man

rancid temple
#

Dusty looks on in sadness

woeful lintel
rancid temple
#

I've only seen the weapons in the backend, haven't actually gotten any

frigid hollow
#

don't they actually use the weapons if you have slimes in the house for example

velvet narwhal
#

you don't know of, la sartén? || the frying pan || ?

frigid hollow
#

or am i imagining that SDVpuffersquint

hoary lake
#

how do you have slimes in your house??

frigid hollow
#

slime incubator in house, put egg in

velvet narwhal
frigid hollow
#

you can get slimes on pretty much any map where you can put the slime incubator

hoary lake
brave fable
#

do people in town still say "Hello, Green Slime!" while being marauded by goo

velvet narwhal
#

checks the say hi method

frigid hollow
#

yeah the spouses do kill slimes in the house but i'm actually not sure if they use their weapons to do it

hoary lake
#

is there a slime pet mod?

frigid hollow
#

they just kick em i guess

hoary lake
#

but yes i am glad i have prompted discussion about spouses randomly adopting pets without you noticing. SDVpuffersquee

#

poor slime. he just wanted some chocolate cake.

velvet narwhal
frigid hollow
#

having slimes in house also has special dialogue from the spouse

calm nebula
#

You. You are the problem

hoary lake
#

does haley just say "ew" and Emily say "Hello slime friend!"

rancid temple
#

Kinda seems like they could, since Monster inherits from NPC

calm nebula
#

"Hi, it's me, I'm the problem it's me."

frigid hollow
#

they're known to greet slimes/monsters, and the monsters can even greet back iirc

brave fable
#

i'll never be able to find the screenshot someone posted here of a lovely npc meeting.. "Good morning Elliott!" -- "Hello, Rock Crab!"

hoary lake
#

where is the fancy mod ideas page?

#

turns out it has a very obvious command.

velvet narwhal
#

i always forget what it is tbh

hoary lake
#

mod ideas... mod idea... mod requests... mod brainstorming.... could have been any of these or more.

velvet narwhal
#

never disappointed by the degen suggestions

fleet crystal
#

Hey I was wondering if anyone knew how to add warps from the main map to a custom map I’ve been up all night trying to figure this out =_=

rancid temple
#

From the custom map, you can also use a map property in Tiled

fleet crystal
#

Well I’m like trying to add a custom path to my warp or my custom location how would I edit the map?

rancid temple
#

For the custom location?

fleet crystal
#

Yes

rancid temple
#

Just in Tiled would probably be easiest

fleet crystal
#

I’ve tried lol it just gives me a message like assets/farmhouse.tmx doesn’t exist

#

I don’t know what I’m doing wrong

velvet narwhal
#

what exactly are you trying to do? are you trying to go from the farm to a custom map? are you using a custom farmhouse?

fleet crystal
#

Well I was just giving an example I’m trying to make a warp from the backwoods map but every time I load it it says the file doesn’t exist

velvet narwhal
#

so you want to add a warp to the backwoods to the custom location? you'd have to use the 1st link that roku sent, the 'addwarps'

rancid temple
#

!json you can use this site to share what you've got

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.

velvet narwhal
rancid temple
#

!log and this site for sharing any errors

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.

solemn sand
#

why isn't ''apricot'' orange?

#

that is a very weird sentence

rancid temple
#

Lol

velvet narwhal
#

commas?

solemn sand
#

oh i see

rancid temple
#

Like are those commas instead of quotes?

solemn sand
#

which one do they need to be

velvet narwhal
#

i think it'll read it all as just under apricot cause your { } aren't broken up by commas

rancid temple
#

Oh, I was thinking apostraphes again lmao

#

You need commas , after each {} pair

calm nebula
#

I mean also it wouldn't do anything useful because the key needs to be the ID

#

Not the internal name

rancid temple
#

Yeah, unless you added a bunch of items named those things

solemn sand
#

oh man

velvet narwhal
#

true, they're not named in strings, they're numerical

#

oh roku we already have one apparently?

rancid temple
#

!itemid

ocean sailBOT
velvet narwhal
#

!modderhowtoask

ocean sailBOT
#

When asking for help debugging your mod, please:

  • Be specific on what the problem is! Consider including screenshots to show the precise problem.
  • Include your log (https://smapi.io/log) and your C#/json files (uploaded to https://hastebin.com/, https://smapi.io/json, or https://github.com/)! When in doubt, include more rather than less.
  • Please narrow your Mods directory down to only your mod and the necessary supporting mods, to exclude mod interactions.
solemn sand
#

like this?

rancid temple
#

Better, still gotta solve the item Id issue

#

Well, entry key, more so in this case

velvet narwhal
#

etc etc

rancid temple
#

You should check out the Data/Objects json to see what you're actually trying to target

solemn sand
#

yeah, that's fine

rancid temple
#

As far as the coloring goes, I'm guessing that's an issue of your editor. Is that VS22?

velvet narwhal
#

might be a schema

rancid temple
#

I tend to avoid doing my jsons in VS22 because its colors are kind of bland

solemn sand
#

idk any other software

rancid temple
#

!vsc

ocean sailBOT
rancid temple
#

I like VSCode over N++

solemn sand
#

oh wait, im looking at the sapling

#

Why are all tree fruits 634-638 but apple is 613

rancid temple
#

Probably indicative of when they were created in relation to each other

#

Seemingly nothing has ever been reorganized

solemn sand
#

apple was a tree fruit before it was cool

royal nimbus
#

hey kind of a dumb question, but im working on custom hair styles and am wondering. do they have to fit into a grid like this or can they be out of some of the squares by a few pixels?

#

im guessing they need to be fully inside the grid unless coded differently

lucid iron
#

you need framework like fashion sense for bigger hair

royal nimbus
#

whats that?

#

for now im just fitting them into the grid

#

its not so bad having to sacrifice a couple pixels.

lucid iron
royal nimbus
#

im also hoping this greyscale takes and they can all be colored properly

#

wow thats a neat mod. will def take a look, ty

brisk kraken
#

In a character mod, when creating different entries (One for forest, one for mountains, etc) How exactly would it works? Im trying to do it, and the 4 events in the same map work but when trying to do the same in others map, it wont load anyone. I will send the json code

velvet narwhal
#

if you look into the unpack, you can tell what maps already have an event .json attached to them
Data/Events -> map name
if the map you're using doesn't have one, you'll need to blank load a .json on LOW priority into it (so that way you're not eating any other mod's events)

#

but looking at what you have so far, these ones have locations

#

i think the main issue you're having is that the codeblocks aren't separated

tiny zealot
#

(it is safe to use any priority except Exclusive when loading a blank json)

velvet narwhal
#

oh SMCKekLmaoDog good to know

#

for every new "Action": "" you have to have it in it's own new { } block

brisk kraken
brisk kraken
#

hmm, now the content wont load

velvet narwhal
#

i'm assuming you're just straight loading this file from your content.json

#

since i don't see a "Changes": [ at the top

brisk kraken
#

Yes

#

Well, i can send the full file

#

give me a minute

velvet narwhal
#

oh, is this just in your content.json?

#

there could be other underlying things, yeah, i'd suggest the full thing

calm nebula
#

Using priority 1337

velvet narwhal
brisk kraken
#

Hmmm, still doesnt load

velvet narwhal
#

you'd have to fix all of them, so the line 98 needs a comma, line 113 needs a comma, and line 128 needs a comma

brisk kraken
#

Ah, I understood you wrong then

velvet narwhal
#

the json parser stops as soon as it sees one error, usually

#

i don't honestly know how it looks in notepad++, but it should verify while you're working, so that way you're not missing a comma or a brace anywhere

brisk kraken
#

Is fixed, it now loads properly but, the event still doesnt play

brisk kraken
velvet narwhal
#

none of them? or just one of them

#

oh and are you doing debug ebi on new days?

#

like a blank save, if you save, then they won't retrigger

brisk kraken
#

Hmmm I only checked the mountains one

brisk kraken
#

I simply dont save the say

velvet narwhal
#

just making sure, there's a lot of variants of people's skillsets when they come in SMCKekLmaoDog

#

hmmmmmm

#

maybe a patch summary <uniqueid> to see if you're actually editing the respective .jsons

velvet narwhal
#

yep

brisk kraken
#

Im not getting anything about the events

#

So i assume those arent loaded

#

Ah, wait

#

I think I know what is going on

#

Okay is fixed, im just dumb lol

velvet narwhal
#

my daily quote, "i am stupid"

brisk kraken
#

I must have seen the events, because they were already marked seen in the command you said

#

xD

chrome mountain
lavish bough
#

Hey where can i find a download for the sound effect when you read a book in game
I went to the XACT folder but thats just .xwb idk what to do w that

latent mauve
tiny zealot
heady crest
#

guys is there like some template for custom characters for me to work on?

#

(its my fiorst time modding stardew idk what im doing)

tiny zealot
#

!npc here's a big tutorial about it. avi was working on a template but i'm not sure if it's linked in here

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:

tiny zealot
#

(turns out: it is)

heady crest
# ocean sail

oh man ive been looking for that dispositions file for like 30 minutes now

tiny zealot
#

good luck! making an NPC for your first mod is hard mode. don't be afraid to ask questions in here

#

or in the thread, of course

heady crest
#

thanks !

#

the only thing i have for her is a rough sketch

royal nimbus
#

a friend did a video on my goth mod pre release xD
https://www.youtube.com/watch?v=V2NLHJGxX6M

► Subscribe for more! http://bit.ly/2aed4A3

RALO CH - @Ralodosmovo
RALO NEXUS MOD - https://next.nexusmods.com/profile/ralodosmovo/about-me

Honestly a really nice mod!

Support me on as well;
► Fairy Tale X - shorturl.at/eJRTU
► GG Lano - https://tinyurl.com/27e3ywn3
► Tales of... - http://bit.ly/2a8Eyrz
► Twitch - http://www.twitch.tv/lanoki...

▶ Play video
zenith robin
#

Anyone know how to replace the greenhouse without it coming back?

lucid iron
#

explain coming back?

zenith robin
#

when you remove the greenhouse, if you load the save without the greenhouse being on the farm the game places a new greenhouse at its default position.

#

I could just remove it every time the save is loaded, but I would prefer not to.

latent mauve
#

Ah, that's a built in map property

zenith robin
#

So just remove it every time the save is loaded then?

lucid iron
#

what is the goal here?

#

ban people from access to greenhouse?

zenith robin
#

I am making a mod that lets the player have upgrades to the greenhouse, but if the default greenhouse no longer exists it breaks.

#

well, it adds it

lucid iron
zenith robin
#

I looked at that, but it doesn't replace the greenhouse like an upgrade would, it is just more buildings.

latent mauve
#

Ideally you would make changes to the actual greenhouse building for what you want

zenith robin
#

I looked into that, but as far as I am aware there isn't a way to have upgrades that aren't just config options.

#

I guess I could make it so that if a trigger occurs, such as putting items in a designated chest in the building I could flip config values, but idk.

latent mauve
#

I mean, conditions don't have to be config options, you could add a flag when the building upgrade is purchased, and make the Data/Buildings entry change based on the flag.

zenith robin
#

hmm

#

I'll look at that.

latent mauve
#

That's how renovations in the farmhouse work

#

Except with the farmhouse rooms and not Buildings, of course

zenith robin
#

Okay, I'll look at how that works, and see if I can get it to do what I want.

heady crest
#

does the numbers mean the game will automatically choose one of those dialogues for the day? like if i have a "mon" and a "mon2" dialogue

latent mauve
#

Mon_2 refers to a Monday that is also the 2nd day of a season IIRC

ornate trellis
#

those are heart dialogue

latent mauve
#

Ah, I stand corrected then

tender bloom
#

2 hearts

heady crest
#

thanks

ornate trellis
#

average cheeto tab count SBVLmaoDog

ashen oak
#

Had thought about playing with something that would make "overlapping" dialogues additive but I haven't landed on a decent default behavior. It can be pretty jarring to have a dialogue from one mod and then another as it is

gaunt orbit
rancid temple
#

I've managed to shave my current count down to 15 tabs for helping and making lol

#

Now I just play a fun memory game every time and switch one of my tabs around to various wiki pages lol

heady crest
#

can i use \n for new lines on dialogue?

#

ik its common on json files but i checked the vanilla characters dialogues and not a single dialogue has made use of that

#

so idk if its supported or not

rancid temple
#

I think I've used it in dialogue boxes before, but haven't tried actual character dialogue

true coyote
#

converting sprite assets from one thing to another is... surprisingly exhausting when there are a lot of sprites

rancid temple
#

I just spent longer learning how to make a C# console app create a fully filled out texture.json with manual variations and rename all those textures for an AT content pack than it would have taken to just finish creating the content pack, would have saved time if I had made it to start with, but I guess I have it for the future lmao

#

It was at least less tedious than the AHK script garbage I was doing before

true coyote
#

also, since I'm having a hard time figuring out/finding the information for something like this: when it comes to resprite mods, like BAGI, for the asset sheets, is there a specific order the sprites might be following?

To clarify, I'm talking any mod where the folder is just:

data.json
manifest.json```
#

where data just kinda lists the names and then where it gets pulled from ie [assetname].png

latent mauve
#

\n has weird behaviors in some places

uncut viper
true coyote
#

I guess that would be... ebagi I think? but I can't find the framework info on the github

#

I am not very versed with github tbf...

#

I just gotta put some mental names to some of these sprites as a lot of them have similar colors and I need to fix the correct ones

uncut viper
#

i think ebagi just uses the same format as BAGI but ive never used it so im not 100%, but it probably does?

#

so you'd wanna look at bagi's documentation for it

true coyote
#

isnt the original bagi outdated now though?

#

guess it might not matter

#

if it just follows the old content order

uncut viper
#

yes, but if ebagi wanted to maintain compatibility with bagi mods itd need the same format

#

or do some manual conversion, but why do that when it can just use the same format

true coyote
#

hmm

uncut viper
#

and since ebagi itself doesnt mention any sort of documentation even on its github i can only assume its the bagi format

true coyote
#

ok let me just air thoughts just in case. its a conversion mod for ebagi CMC https://www.nexusmods.com/stardewvalley/mods/22377 to be compatible for ebagi fancy artisan https://www.nexusmods.com/stardewvalley/mods/23373 (ie updated sprites in fancy's style), and it looks like they use ebagi's framework, which means BAGI documentation in the end of everything, for clarifications sake

#

argh my brain 😭

uncut viper
#

sounds right to me, as far as i can tell

true coyote
#

sorry my brain is just, struggling to see if and where cornucopia ties into it for /22377, as obviously that wasnt apart of ebagi. I'm sorry I'm probably way over complicating this

#

yknow what this is probably for future me to be frustrated about cause I'm not even near done the sprites

uncut viper
#

sorry i cant be more help! im not really at all familiar with EBAGI/BAGI or anythin like that

true coyote
#

no, no worries

heady crest
true coyote
#

I just find all the new changes more difficult as a visual learner, as I cant just pop in to the files anymore and get a grasp on why x does y (all the new stuff is so vague to me now, but i understand that its overall easier and better for modders)

#

like with the old content jsons

uncut viper
#

in this case the BAGI stuff is a separate thing though, content patcher mods still use content.jsons like you are likely used to

#

BAGI/EBAGI is just its own framework so it makes its own format, completely unrelated to Content Patcher

true coyote
#

i see it here and there, but with this pack and a few other cp sprite changes, all I see are the asset pngs, a data file and a manifest file

uncut viper
#

if a mod does not include a content.json, it is not a CP mod

rancid temple
#

You gotta be careful with that, because you can make your content pack take a content.json lol

true coyote
#

and they all seem to just patch it in just fine -- I know that they are relying on the framework, as they say "download ebagi"

rancid temple
#

If you just really want to embrace insanity

true coyote
#

I just dont understand how they are connecting lol

uncut viper
#

its just important to remember the distinction between a content pack and a content patcher mod

true coyote
#

mm correct

#

double checkign this is definitely just a bagi/ebagi mod, and not cp

#

Im just alcking the in between information on how the files within them interact, cause yes the main ebagi file has content json and other data files telling the framework what to do

rancid temple
#

The add money action I put on the end of it did so I know the changes took effect

uncut viper
#

SDVpufferthinkblob the main EBAGI file has content.json?

true coyote
#

but the patch files I have just have like

"Jelly": "assets/jelly.png" ```

for the data json and a regular manifest (saying that it is for ebagi)
#

so this CMC one I'm trying to figure out how they ordered the sprites cause it doesnt seem to be alphabetical like the data file

#

my brain hurts and I am probably just confusing ourselves

true coyote
#

Ive been hoppign in an out of files all day ^^;

#

theres a dll

uncut viper
#

i think for BAGI the sprites just need to be in the same order as your Fruits list

true coyote
#

but I dont have anything to ... open...? it ?

uncut viper
#

you dont open the .dll

#

the bagi .dll is like ContentPatcher.dll, you dont do anything with it, its what loads your data.json

#

ContentPatcher.dll loads content.json content packs and all the files it needs in your mod folder
BAGI.dll (or w/e its named) loads data.json files to load the rest of your bagi content pack from your mod folder

latent mauve
uncut viper
#

(also i wish you the best of luck Shiloh i believe you'll get there SDVpufferthumbsup hopefully someone more familiar with BAGI comes along for better help since i gotta go do some more last minute hurricane prep)

true coyote
#

stay safe <3

latent mauve
#

Mail uses ^ for line breaks too, I think

true coyote
#

some are in the same order as the data, but others dont seem to be, ie for fruits it lists ancient coconut first and then in the wine png the first one is... blue and purple??? which I guess maybe they might be playing off the ancient fruit wine vibe?

#

I can only assume that that was their intention

zenith robin
latent mauve
#

Can you explain exactly what you're trying to accomplish? New additional greenhouse, replacing vanilla greenhouse upon upgrade, replacing vanilla greenhouse with new one from the start, etc.? I'm tired and have the brain fuzzies so I want to make sure I understand correctly.

zenith robin
#

I am trying to replace the vanilla greenhouse with a different map from the start, and then again on upgrading it.

#

I do not want multiple greenhouses on the farm.

latent mauve
#

Okay. So you would be changing the Data/Buildings entry from the start with no conditions for the vanilla Greenhouse, and for the upgraded Greenhouse, would likely be able to use the BuildingToUpgrade setting to make a separate Upgraded Greenhouse entry and force it to replace the non-upgraded Greenhouse building.

zenith robin
#

yes, but if you don't have the base greenhouse on the farm the game adds a new greenhouse. So I can't mae them multiple buildings instead I have to overrite the origional greenhouse multple times based on a flag check.

lucid iron
#

well u can use mailflags

latent mauve
#

ok, so having the upgraded one still forces the game to respawn the Greenhouse, I am getting a clearer understanding now.

lucid iron
#

thats what fireredlily was getting at earlier

latent mauve
#

Yes, you'd use mailflags to get around that.

dusty scarab
lucid iron
#

iirc u can do trigger action on shop purchase

#

so add thing to robin shop to add flag on buy (while u dont have the flag)

zenith robin
#

So I would do it similarrly to how recipes are bought correct?

lucid iron
#

it can also be a special order

#

think sve grandpa shed questline

latent mauve
#

And then you'd do what I mentioned earlier to change the vanilla Greenhouse entry contents instead if the mailflag is found.

#

Which would prevent the respawns because it'd still be the right building ID

zenith robin
#

Okay, I think I am understanding it now. I just have to find out how to do the special order questline thing now.

#

Ty

latent mauve
#

Apologies for getting confused for a bit there! I got my flu shot yesterday so I'm a bit off my game today.

zenith robin
#

You're good. Without you I would still be trying to make it work with building upgrades.

calm nebula
#

Hi blueberry!

#

Bye, blueberry!

brave fable
#

works perfectly! thanks

#

i don't respond to 'hello', only to 'here is your new alpha build, my liege'

next plaza
#

Hmm, former junimo vs current "1.6 developer" role, who ranks higher on the totem pole (ie. would I really call you "my liege")

brave fable
#

it's not about the power, it's about the prestige

lucid iron
#

how come u r just no longer green instead of forest spirit

#

i wasnt sure about nuance of that role

hoary lake
#

the person with the most amount of chocolate cake...and is willing to share that chocolate cake should be called my liege.

calm nebula
#

Also Casey is more than 1.6 developer

lucid iron
#

pathos never gave himself the 1.6 developer role blobcatgooglyblep

calm nebula
#

She also wrote the splitscreen code, right?

hardy ridge
#

👋 very random question, I'm new to mods and looking up tutorials. How difficult is it as a beginner (without c++ knowledge) to make a mod that duplicates the magic rock candy and includes fishing and farming stats to it?

astral prism
#

how on earth can i draw animated stuff in a menu without having to do it manually ?

lucid iron
#

you can add fishing and farming to magic rock candy without C#

hardy ridge
#

I like the sound of that

lucid iron
#

just need content patcher

#

!startmodding

ocean sailBOT
#

Making mods can be broadly divided into two categories:

Usually it’s easier to start with making content packs, since you don't need to learn programming.

hardy ridge
#

thanks

lucid iron
#

unpack your game content

#

!unpack

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!

calm nebula
next plaza
astral prism
#

i will take a look

lavish bough
frozen field
#

anyone know why planting a sapling would result in the sapling item just being placed on the ground and can't be moved? am trying to fix a mod

brave fable
# next plaza ???

here is your new alpha bug, my liege

SContentLoadException: Failed loading asset 'assets/sprites.png' from SMAPI\spacechase0.spacecore: the specified path doesn't exist.```
#

wonderful how my spacecore merge can come back years later to fill my console with errors

#

it remembers me....

calm nebula
#

Pathos sez vanilla should deal with it

#

I'm quite confident in my diagnosis of the issue. But incredibly unconfident about, well, the solution proposed

astral prism
# astral prism so i thought that but i thought those were for inside maps

kay so i've done this

for (int i = 0; i < amountOfStardrops; i++)
{
    var tas = new TemporaryAnimatedSprite("", new Rectangle(0, 0, 16, 16), 70f, 3, 9999999, new Vector2((int)BatPositions[i].X, (int)BatPositions[i].Y), flicker: false, flipped: false, 1f, 0f, Color.White, 4f, 0f, 0f, 0f, true)
    {
        texture = Helper.ModContent.Load<Texture2D>("assets/bats.png"),
        pingPong = true
    };
}```
 but i see nothing on the screen. is the Position 'screen position' or world position??
#

i do it the same way other UI menus are doing it

brave fable
#

have you assigned tas to anything yet?

astral prism
#

...

#

yesp

#

thanks 🤣

brave fable
#

i have to ask lol

#

share the full code, wherever it comes up

teal bridge
#

When did "desperado" change to "despacito"?

brave fable
#

so for example, stardewvalley.menus.junimonotemenu.cs adds to a list and calls draw from override void draw:

foreach (TemporaryAnimatedSprite tempSprite in tempSprites)
{
  tempSprite.draw(b, localPosition: true);
}

which also neatly answers the question of whether it's screen position or world position

astral prism
#

i did not have it showing up anywhere, i forgot to even render it or anything, i just have it create the tas and then do nothing like a dumbass

astral prism
#

is localPosition screen pos ?

humble timber
brave fable
#

yesterday, i think SDVdemetriums

brave fable
uncut viper
#

(i know smapi does come caching, but is the difference still significant enough to recommend not calling Load for the same texture inside a loop, i imagine?)

teal bridge
#

Pathos said yes, the other day.

brave fable
#

localposition would be screen position, yes -- tas.draw() simply checks local ? position : globaltolocal(position), which subtracts viewport position from position

teal bridge
#

i.e. SMAPI's Load isn't just a cache lookup, it's a bunch of farbibulation of the arguments and then a cache lookup.

brave fable
#

alternatively you can use new TemporaryAnimatedSprite() { local = true } to force local regardless of draw params

astral prism
#

now i need to try to figure out how to draw the things to where they need to go

astral prism
#

so got this UI, need the bats to draw inside the slots. also they're not animating 😭

#

gosh darn it]

next plaza
#

It feels like it should, at least for maps, because of... well, what you discovered

bright panther
#

I think the way stardew does splitscreen is a bit crazy anyways 😂

#

and... multiplayers another story LogiNervous

atomic vale
#

!start

next plaza
#

I had an alternative way it would work in my prototype mod (not using networked MP internally), but it would have invovled changing a lot more code. (Still used the instanced statics stuff for a bunch of things though)

#

"Normal" splitscreen support would need to have the game designed with it in mind from the start

bright panther
#

Yeah

next plaza
bright panther
#

Stardew just went uhh let's just run another game instance 👍

brave fable
astral prism
#

alright thank you thank you

astral prism
#

now to hardcode the bats positions through bruteforce...

brave fable
#

i couldn't tell you were using a local overload for the ctor until i pasted your code into vs, so don't worry about { local = true }

#

ctrl+. -> add argument name (and all following arguments) my beloved

next plaza
brave fable
#

i'm also never sure whether we should use TemporaryAnimatedSprite.GetTemporaryAnimatedSprite() whenever possible since the game sure doesn't half the time

#

i'm sure it's using the sprite pool i've seen around but also the game dgaf

astral prism
#

okay so ive got no flippin idea how to place these positions without abusing hot reload

#

but that's gonna like

#

mess stuff up if the window is a diff size

brave fable
#

simply abuse hot reload. you're making a ui hahah

astral prism
#

perfect!

bright panther
#

I think I'll cold reload

astral prism
#

not perfect.

brave fable
#

merely refer to junimonotemenu.cs 😌

bright panther
#

close enough

astral prism
#

wait what does that mean

heady crest
brave fable
#

you can just recreate or reposition them after the window is resized

astral prism
#

try to comprehend the positions challenge:

BatPositions = new List<Vector2> { new Vector2(BoxBounds.Left + 32 + 41, BoxBounds.Top + 32 + 30), new Vector2(BoxBounds.Left + 32 + 41 + 101 + 16, BoxBounds.Top + 32 + 30), new Vector2(BoxBounds.Left + 32 + 41 + 32 + 4, BoxBounds.Top + 32 + 30), new Vector2(BoxBounds.Left + 32 + 41 + 48 + 4, BoxBounds.Top + 32 + 30),
new Vector2(BoxBounds.Left + 32 + 41, BoxBounds.Top + 32 + 30 + 16), new Vector2(BoxBounds.Left + 32 + 41 + 16 + 4, BoxBounds.Top + 32 + 30 + 16), new Vector2(BoxBounds.Left + 32 + 41 + 32 + 4, BoxBounds.Top + 32 + 30 + 16) };```
astral prism
brave fable
#

hi have you considered a nested for-loop with x-y coordinates for (x < numWide) and (y < numHigh) with position = x * width, y * height

heady crest
bright panther
heady crest
#

at least 40% of my accessories has that symbol on it

astral prism
bright panther
astral prism
#

it's too late for this

#

my bedtime and im doing this shizzle

atomic vale
#

Avg hobby coder

brave fable
#

code takes 5x longer and looks 2x worse when made at night

#

it's not worth it

atomic vale
#

Sadly

bright panther
#

Yup

#

you spend hours at night coding

#

then just basically redo all of it in the morning

#

so you wasted hours you could of been sleeping

astral prism
#

somet like this

for (int i = 0; i < 4; i++)
{
    BatPositions.Add(new Vector2(startPosition.X + i * xOffset, startPosition.Y));
}

for (int i = 0; i < 3; i++)
{
    BatPositions.Add(new Vector2(startPosition.X + 3 * xOffset, startPosition.Y + (i + 1) * yOffset));
}```
#

so now i need to figure out the exact value of xOffset and startPosition

brave fable
#

last night i tried working out how to get the smapi nuget package to bundle a csproj content pack without the obj/bin/csproj files and gave up when it wouldn't behave

lucid iron
#

oh did u pick up the thing to replace stardrops with bats

astral prism
#

$50 in the bank for a mind-fucking UI SCpray

#

too nice for my own good

brave fable
#
for (int x = 0; x < 4; ++x) {
  for (int y = 0; y < 3; ++y) {
    BatPositions.Add(new Vector2(
      x: start.X + x * spriteWidth,
      y: start.Y + y * spriteHeight)
  }
}
bright panther
#

I wonder how many things CA wishes he could redo or make way cleaner but can't because he needs to make sure that anything he does now doesnt break any mods that much

brave fable
#

i broke my ass falling from heaven

astral prism
#

🤣

bright panther
#

At least the code in stardew is readable, then theres the people in the monogame discord using the most weird C# stuff to get the most performant code, im like 👀 the heck is that

lucid iron
#

when it was brought up initially i think i just suggested them to replace the SDViconstardrop x 4 texture and call it a day blobcatgooglyblep

next plaza
#

(I don't mean that mean, just that atra's code is largely above me)

hardy ridge
#

@lucid iron thanks for the tip!

calm nebula
#

My insanity is not a good thing

lucid iron
next plaza
teal bridge
#

Profiling stuff in Stardew isn't exactly trivially easy, either.

brave fable
#

performance is important, but putting things on one line is importanter

calm nebula
#

I'm at work so do I need to pull in Desty as backup.

teal bridge
#

Well, .sml will let you write your entire UI on one line, if that's important to you.

next plaza
#

Desty might agree right now considering I'm behind on S&S stuff 😓

next plaza
astral prism
#

it appears ' start '

Vector2 start = new Vector2(BoxBounds.Left + 256, BoxBounds.Top + 128);

for (int x = 0; x < 4; ++x)
{
    for (int y = 0; y < 3; ++y)
    {
        BatPositions.Add(new Vector2(
          x: start.X + (x * 16),
          y: start.Y + (y * 16)));
    }
}```
 is not functioning as expected... the first one should be like 256 over but it.. is not
brave fable
#

ah yes, this must be content code

astral prism
#

this is not midnight activity

lucid iron
#

is there some border/margin stuff

brave fable
#

yah you should get back to it tomorrow

astral prism
#

my brain does not WORK

bright panther
#

I want to write a C# stardew mod sometime I just have no ideas, about a year ago when I made my first mods with just content patcher I wanted to make C# mods but knew absolutely NOTHING but now I've been making my own games so I would say I know a decent amount now 😂

astral prism
#

on a drawBox

brave fable
#

i'd only say to check boxbounds is created and using the xpos/ypos of the menu

astral prism
#

hold on

#

1 sec

#
BoxBounds = new Rectangle(Game1.safeAreaBounds.Left + 320, Game1.safeAreaBounds.Top + 128, Game1.game1.screen.Width - 580,
Game1.game1.screen.Height - 256); // define the box boundaries```
 ?
#

is that just as valid... ?

brave fable
#

where did you find this field lol

astral prism
#

i do not know

teal bridge
#

I think uiViewport is more traditional.

astral prism
#

probably another 2am session

#

thanks

brave fable
#

i've literally never seen this in my life

astral prism
#

apparently me neither

brave fable
#

consider: Utility.getTopLeftPositionForCenteringOnScreen(width, height)

astral prism
#

blueberry how do you know everything

#

CA must be terrified of you

brave fable
#

i make ui 😌

bright panther
#

I wonder what the longest one is

astral prism
#

im sure i used it in one mod

lucid iron
#

is there a cap in C#

astral prism
#

can't remember exactly what it is

astral prism
teal bridge
#

Or Utility.doesMasterPlayerHaveMailReceivedButNotMailForTomorrow

bright panther
#

😭

#

I think my longest is literally just CheckIfObjectExist

patent atlas
#

crazy how raccoon seed methods and mail methods are all in the same Utility class

bright panther
#

gotta love that

#

just slap everything in the utils class

brave fable
#

utility has my favourite methods like makeTemporarySpriteJuicier and playersCanGetPregnantHere

bright panther
#

😭

#

wtfff

teal bridge
#

Yes well... I was always a hardass at work when someone tried to name something Util or Utility or Helper or Common, because they always turn out like that.

lucid iron
#

is it bad that i think racoons was all CA bc of how hardcoded it is LilyDerp

patent atlas
#

oh wait a second

uncut viper
patent atlas
#

I noticed that new version features are coded better than older features duh obviously

teal bridge
#

Utility.isThereAnObjectHereWhichAcceptsThisItem

patent atlas
#

but is that because they arent CA?

lucid iron
#

like imagine a mod doing racoon bundles, they'd prob go with a racoon_seed_spring context tag

bright panther
patent atlas
#

i hope so

#

it was genuinelly surprising to see trinket follower pet code actually use decent object oriented programing

#

after going through marriage code

brave fable
#

if it's complicated but makes sense, pathos wrote it. if it's complicated and doesn't make sense, ca wrote it. if it's written in snake_case, podunk wrote it

bright panther
#

I mean hey, isnt the best code but he didnt care and just made a game, But im stuck where I look for HOURS on the many ways other people have done what I want to figure out how I should do it well

calm nebula
brave fable
patent atlas
#

and I'm the one with dozens of unfinished projects spread around my unity godot and monogame folders

bright panther
#

random mongame projects

#

for testing like very specific things

#

and random demos of stuff

patent atlas
#

maybe that's the secret

#

just let go. feel the flow. code with the mind eyes

bright panther
#

> puts every single line of code in game1.cs

teal bridge
lucid iron
#

players dont see the spaget anyways

rancid temple
#

I think people prefer art over good code

bright panther
#

Yeah, if the code can run at 60fps, then you're good, the art is what makes the game feel and look professional

acoustic summit
#

A lot of indie games are on a smaller scale, so the impact of imperfect code is less noticable

rancid temple
#

If your game feels bad to play, then they'll complain, but if it feels good to play, that's the baseline and you did exactly what was expected

patent atlas
bright panther
teal bridge
patent atlas
#

gameplay mechanics? barely know her

next plaza
patent atlas
#

modders will mod anyways, and the dev usually just flows with his own creation

#

specially single dev projects like stardew

#

(originally)

teal bridge
#

I think people prefer games that are fun over games with good art. But I suppose we can all agree that code quality comes in approximately dead last.

calm nebula
#

I don't think it is possible for games with good code to come out tbh

#

By the time you've made things nice and pretty someone else beat you to market

patent atlas
brave fable
#

that does explain a lot about my mods tho

calm nebula
#

And yes, I'm saying "you" as "you guys"

bright panther
#

terraria makes my eyes want to bleed

patent atlas
#

waaaa

#

terraria is pretty!!!

calm nebula
#

I want no part of any of it.

bright panther
#

*the code

acoustic summit
teal bridge
#

That's patently untrue, and we've had the conversation before. Lots of massively popular, first-mover games had brilliant code, like Doom.

patent atlas
#

oh rimworld has some good code!!!

#

there's like some stuff that's not >great< but overall I'd say it's very welkl constructed

calm nebula
#

Hey, I just had to put my work laptop into the work fridge because fucking [redacted], man

#

I'm going thr fuck home and the fuck to sleep

#

Fuck today

patent atlas
bright panther
#

but who knows

teal bridge
#

Game code quality runs the gamut from John Carmack to Todd Howard.

patent atlas
#

nowadays you can push out a fully functional game without any code

#

is it hollow knight?

#

that's done in some sort of visual scripting tool

#

i dont remember !!

next plaza
#

My game WIPs are fairly clean (for the most part)

#

But they're also not very far along

patent atlas
#

I usually spend less time making the game do game stuff and more time overengineering expandable systems I'll never actually use for anything else anyways

acoustic summit
next plaza
#

Mods? Most of the time I don't put much effort into good organization looks at S&S

teal bridge
#

You can push a fully functional cookie-cutter game without any code. And if you find just the right niche, it might even be a hit, despite being derivative. But nothing truly innovative comes from that.

calm nebula
#

And you can make boatloads of money without being innovative

#

(I'm a cynic.)

teal bridge
#

Yes, you can. If money is your sole objective, then go for it.

patent atlas
#

For modding I like to pretend there's a bunch of popular great modders who will absolutely open my 200 downloads mod no one cares about look at my code and send me DMs making fun of me

#

so I try to make my code pretty

vernal crest
#

I think there are other things than money or innovation you can aim for.

uncut viper
#

(i have no lofty aspirations ill take the money please)

rancid temple
#

I would like to make some money so I can survive

teal bridge
#

I mean, you guys say that, but I don't think making Stardew mods is a very profitable avenue.

patent atlas
#

what? then why am I installing cryptominers in my mods for?

brave fable
#

you'd be surprised how many people look at the code. for some reason love of cooking has 18 forks

rancid temple
#

Not at all, I'm just disabled and putting off other things I should be doing

brave fable
#

maybe it's appropriate for a cooking mod to have forks tho

patent atlas
uncut viper
#

(also if anyone ever comes in here with a bug related to your mod there will be like 3 people who WILL go look at your code to pick out whats wrong wiht it so—)

patent atlas
#

18 people is like

#

some fraction of it.

lucid iron
#

my code quality pursuits are more like

bright panther
#

the only thing in stardew I really dont understand how CA setup right is depth, like every class i look in has what looks like keyboard smash in the depth value

#

😭

lucid iron
#

transpiler scary hope next version doesnt explode these

teal bridge
next plaza
#

It's divided by a value in the original source

patent atlas
calm nebula
#

Ngl, after what I have to do for day job, I don't want to think about code quality

uncut viper
calm nebula
#

Like actually

bright panther
patent atlas
#

consts are optimized by the compiler

brave fable
#

1f / 10000f my beloved

teal bridge
#

Better yet, write a mod that uses ILGenerator to write the IL that does what the mod really does.

patent atlas
#

into just values

teal bridge
#

The entire mod is created at runtime.

acoustic summit
#

Oh shoot

patent atlas
#

write a source generator

acoustic summit
#

thats a strat

uncut viper
#

then you can turn the runtime-mod-creator into an asset so people with Content Patcher can—

teal bridge
#

"It's not my problem, some other mod must be messing with the IL that my mod generated"

patent atlas
#

use a source generator which interfaces with GPT to create a mod the user asked for and iterates 100 times until it actually compiles

acoustic summit
#

ILGenerator generating ILGenerator generating mod

#

It goes deeper

teal bridge
#

There's a lot to be said for defense in depth, but I think one level is enough. If you're still worried about it being too readable, you can always encrypt it.

#

(and I think I just described Denuvo)

calm nebula
#

Nah

#

Just code in an ecosystem where you have to count your clocks

gaunt orbit
patent atlas
#

Its interesting that via reflection you can still access the consts as if they were fields

#

But the compiler replaces every usage with the value itself

fiery cobalt
#

This was too much power

patent atlas
#

Been useful for custom unity editors

fiery cobalt
#

yes I am a horse girl at heart

gaunt orbit
#

Maybe only if they're public so other assemblies can reference them?

#

I've never used private consts so I don't know if they get included or not but I would imagine not

teal bridge
#

Inline replacement is the definition of a const.

gaunt orbit
next plaza
#

Nor in C++

patent atlas
teal bridge
#

Haha, ok, if const is a declaration keyword that can be used in place of var then it means something different.

patent atlas
#

Like it is a compile time thing. But it is also stored in the class declaration

#

I fully expected consts to just not exist in runtime

teal bridge
#

I'm pretty sure const does behave as an inline replacement in C++? It just has other uses on top of that.

next plaza
#

Isn't that constexpr?

lucid iron
#

in C++ dont u just #define

teal bridge
gaunt orbit
#

Const is the js equivalent to c#'s readonly

lucid iron
#

and then it gets preprocessor'd into stuff

gaunt orbit
#

Js is weird

next plaza
teal bridge
#

If the C# compiler only cared about your assembly, it could optimize away the constant completely, but because it's a DLL and other DLLs are supposed to be able to reference that constant at runtime, it has to be kept.

true coyote
lucid iron
#

well that's good reason to have alternate for C++ i guess blobcatgooglyblep

teal bridge
#

(And yes, regarding JS, const in JS is the equivalent to let in normal languages.)

#

JS also doesn't have const fields, only const variables. I think if you define a const variable in C# (i.e. inside a method), it will get totally optimized out.

#

Haven't looked at a decompile to prove it, but it's a logical assumption given a method-scoped const has no other purpose.

calm nebula
#

Consts are boring

#

Give me const folding or give me death

#

dies

calm nebula
brave fable
# brave fable where did you find this field lol

@ivory plume morning, unused field found in the wild 🌄

-- i also couldn't seem to get IgnoreModFilePatterns working with ContentPacks using ModBuildConfig 4.3.0 when rebuilding my C# project independently of a CP project in the same solution. it's deploying the CP project csproj file as well as the bin and obj folders whenever the C# project is built.

is this the correct format for the ItemGroup in the C# mod project file?

<ItemGroup>
  <ContentPacks Include="..\[CP] MyMod" Version="$(Version)">
    <IgnoreModFilePatterns>\.dll$, \.pdb$, \.csproj$, ^bin, ^obj</IgnoreModFilePatterns>
  </ContentPacks>
</ItemGroup>

i can remove the CP project and just have it as a folder without any csproj if it's needed, but it's nice having the assets in the solution explorer

-- is this the cause?
#making-mods-general message

zenith robin
#

Is there a way to make a special order be given to the player upon seeing an event rather than getting it from the board?

calm nebula
#

Sure! There is an event command for that

zenith robin
#

do you know where I could find any documentation on that? I have been looking around for a bit now.

gaunt orbit
#

[[Modding:Event_data]] iirc

uncut viper
#

i was gonna link the event data page but its not actually on there it seems?

rancid temple
#

It's on the migration page still

gaunt orbit
#

Oh weird

uncut viper
#

but its addSpecialOrder <special order id>

rancid temple
#

Looks like all the event changes haven't been moved yet

uncut viper
#

i forgot there was still stuff on the migration page tbh

calm nebula
#

Your time to be a hero :p and fix the wiki

gaunt orbit
#

It seems like some of the new commands are there and others are missing

uncut viper
#

probably from people noticing things are missing like this same situation and just adding them without realizin they were on the migration page

rancid temple
#

Yeah, I definitely forget to check the migration page whenever I'm adding something missing

velvet narwhal
fiery cobalt
brave fable
#

(well i can't say whether you're supposed to do things this way, but i like having c# and cp as projects in a solution, other than having to rebuild solution to deploy both)

lucid iron
#

i had my 1 cp + c# project like this

CoolMod
  [CP] CoolMod
  whatever.cs
#

but i thought the point of ContentPacks was that you don't put the CP mod as it's own thing in the sln

#

it just gets copied too whenever u build the C# mod

next plaza
velvet narwhal
#

SDVpufferthinkblob i like to switch back and forth between the c# and cp component cause i'm stupid and forget what my own assets are named

brave fable
#

it doesn't say that's the point of the contentpacks itemgroup, just that i can bundle any folder with my main c# mod, and that i can ignore files by pattern

next plaza
#

Oh, I see

brave fable
next plaza
#

I read your message but not the code

brave fable
#

but the message said i'm using 4.3.0 and it's deploying unwanted files :(

next plaza
#

Yeah well I should read closer

calm nebula
#

Just debug modbuildconfig yourself lol blubs

#

Meanwhile, I sock

lucid iron
true coyote
humble timber
#

(%&@*"&#?,"?#

#

incredible

brave fable
#

.. is this right?

// parse ignore patterns
string[] ignoreFilePaths = this.GetCustomIgnoreFilePaths(this.IgnoreModFilePatterns).ToArray();
Regex[] ignoreFilePatterns = this.GetCustomIgnorePatterns(this.IgnoreModFilePaths).ToArray();

https://github.com/Pathoschild/SMAPI/blob/66d9e82fffb61c6cf3347c9f7278bc56b0687aae/src/SMAPI.ModBuildConfig/DeployModTask.cs#L126-L127
and
https://github.com/Pathoschild/SMAPI/blob/66d9e82fffb61c6cf3347c9f7278bc56b0687aae/src/SMAPI.ModBuildConfig/DeployModTask.cs#L152-L153

fiery cobalt
#

Oh it's not being released it is for my own use only. The mod uses different assets from others it would not be right to release.

The Hereford Cow (brown and white cow) does make manure lol. It was a fight to get it working though, The horses will be dropping horseshoes

ivory plume
next plaza
lucid iron
#

say wouldnt IgnoreModFilePatterns apply for both the C# mod and the content mod

ivory plume
#

They're set separately for the C# mod and each content pack, so you can have different values.

true coyote
#

ok so one of these crops has a random chance to be different colors but the mod I'm referencing for it only has the 1 color. should I add the other colors in the data sheet as such:

"Cornucopia_BellPepperColor" (essentially whatever its called in the main file's json?)

brave fable
lucid iron
#

can i make a location like FarmCave decoratable

dusty scarab
#

I thought farm caves are decoratable by default, are they not?

lucid iron
#

no u cant put stuff on walls

brave fable
#

maybe also an optional param to set the parent folder name would be nice

#

(✨)

ivory plume
#

Can you post a bug report in the SMAPI repo? I'll probably take a look after 1.6.9 is released and the dust settles at this point.

brave fable
#

will do, thank you SDVpufferthumbsup

brave fable
#

good luck with 1.6.9 🥳

ivory plume
#

Thanks!

zenith robin
tender bloom
#

"HasFlag|contains=GreenhouseV2": "false", though please name the flags something more unique if possible

#

CP doesn't do negations like that, I think only GSQs do off the top of my head

zenith robin
#

Okay, and I was going to, but I am in the early stages of what I want to make so I wasn't too bothered rn.

tender bloom
#

to be clear, a GSQ is a game internal thing you would be using in a somewhat different way

#

just trying to give context about why you might have seen ! other places

zenith robin
#

I have used it when doing some C# and that worked, so I just made an assumption.

tender bloom
#

ah... yeah C# is not going to have a ton of overlap with CP, really the main thing they overlap in is both being somewhat structured

#

CP format is more of a data structure that gets processed by CP into game data, which C# is full on programming

zenith robin
#

okay. thanks for the info

knotty phoenix
#

Alright, so I'm finally working on updating my pre-1.6 mod to 1.6! I have a handful of dependencies it used that I'm wanting to know if they either have been updated or have been replaced so I can learn how to use what I need to to make it work similarly to how it did before.

JSON Assets
Mail Framework Mod
Quest Framework
SAAT
Shop Tile Framework

zenith robin
#

how would I go about checking if a flag was false for an event trigger then?

uncut viper
lucid iron
#

Something you can do for a quick start is to load the mod in with 1.6 json assets (and maybe mail framework mod?), then do patch export Data/Objects

#

Should be able to see how json assets did your objects

knotty phoenix
#

this is cool news

fleet crystal
#

Does anyone know how to make an entrance from the main map to a custom map?

lucid iron
#

Can you define what is main map

fleet crystal
#

Backwoods

latent mauve
#

You just need to add a warp to your location on the vanilla map after you'd defined the custom map. Please be aware the backwoods is excluded from NPC pathing.

fleet crystal
#

Oh damn

latent mauve
#

So NPCs won't travel through it and will need a separate warp that goes to a different map.

fleet crystal
#

What’s the best place to put a warp then?

latent mauve
#

I think most people make an NPC Warp to/from the Mountains to get around that?

rancid temple
#

Railroad is fine too, as long as you don't care about being SVE compatible lol

latent mauve
#

LOL

rancid temple
#

Most maps are gonna be hard to find room for if you want to support SVE

latent mauve
#

Yeahhhh, SVE makes a mess of the map for warps

#

Probably better off going straight for the Bus or Train Station approach if you want SVE compat

tender bloom
#

People find all kinds of wacky nooks

latent mauve
#

Less of a headache

fleet crystal
#

I really don’t use it so I’ll be fine

tender bloom
#

It's probably best to pick something and post a screenshot here to see if anyone has good suggestions

rancid temple
#

Just put a ladder slightly off the path

#

Easy 1 tile warp lmao

fleet crystal
#

I might make the path at the bus stop actually

rancid temple
#

SVE does mess with south of the bus stop right?

latent mauve
#

Just be careful because of the shortcut to Backwoods added in late-game for Bus Stop

#

So you don't use the same space

rancid temple
#

That's in the actual backwoods isn't it?

tender bloom
#

yeah

#

it's in the actual backwoods

latent mauve
#

It's not a two-way?

tender bloom
#

and iirc is why pathfinding is banned

rancid temple
#

Like it goes down to the road and you have to play in the road to reach it and the bus stop

tender bloom
#

it would create a loop

#

in the graph of which maps are connected

latent mauve
#

I haven't built the shortcuts in so long, I just remembered there was one between Bus Stop and Backwoods

tender bloom
#

or maybe it's just the general loopiness

rancid temple
#

SpaceCore resolves that doesn't it?

tender bloom
#

but the shortcut is a stairs going up

latent mauve
#

Right, so my thought was not messing up the stairs.

tender bloom
#

spacecore might does, i haven't kept track

rancid temple
#

Should be fine, as the stairs are on backwoods

latent mauve
#

good to know

tiny zealot
rancid temple
#

It leads to the road and all you have to do is run right and you're at the bus stop

tender bloom
calm nebula
#

Ichor is correct

tender bloom
calm nebula
#

The vanilla pathfinder is pathological for loops

latent mauve
#

yep, that looks right, roku

#

I just couldn't quite remember where it was

fleet crystal
#

Does anyone know I would merge a map like add a building into town?

calm nebula
#

But will generate a valid (if probably too long) path

tiny zealot
#

lmao i live to summon atra into the modding channels by mentioning the pathfinder

calm nebula
#

Hi

#

Bye

rancid temple
#

Create the building in it's own tmx and EditMap patch it onto the other map

calm nebula
#

angry cat hissing noise

fleet crystal
rancid temple
#

Hm, I never got around to putting my CP examples back on git

fleet crystal
#

Ripp I’m honestly struggling lmao

velvet narwhal
rancid temple
#

I would start by copying the map you want to put the building on, creating your building on it and then stripping out the original map so that you have a tmx that's just your building

#

You can either make the map the right size for your building or leave it the size of the whole map, just changes how you have to set the size of the patch area

#

I usually put down some Path layer tiles to mark the major bounds of my stuff while I'm working so I don't forget where I need to delete

rancid temple
velvet narwhal
#

no i definitely left an image of like, "this is how you warp to the map, touch it"

rancid temple
#

Oh I see, it being a warp definitely changes things lol

#

Still, I've definitely come back to a few of my mods months later and just been like "Oh, this major feature has just been broken this entire time and nobody said anything, cool I guess"

velvet narwhal
#

although, looking at my screenshot, this might be my SVE save SDVpufferthink and i don't think ichor made lacey's house bigger ...unless

rancid temple
#

I forgot to set a description for a big craftable I made and so it doesn't have any info when you hover over it in game, nobody has said anything

lucid iron
#

Ichor made the door but it's same size iirc

lucid iron
rancid temple
#

I only just noticed it was broken a few days ago, still haven't gotten around to actually fixing it

#

If it was just a blank box with the name that would be one thing, but it's like literally nothing pops up if you're missing some of the required fields

velvet narwhal
#

the only thing that wasn't brought to my attention was my some odd 300 lines of gifted dialogue weren't being used

#

it was during my debugging that i realized the patch wasn't being applied, ever

vernal crest
# fleet crystal Ripp I’m honestly struggling lmao

Example of the json needed to edit a custom map patch onto a vanilla one. You may not want to use "PatchMode": "Replace", depending on how you make your custom map.

        {
            "LogName": "Edit National Park entry into Forest - Lite",
            "Action": "EditMap",
            "Target": "Maps/Forest",
            "FromFile": "assets/maps/Aba_Forest_Lite.tmx",
            "PatchMode": "Replace",
            "FromArea": {
                "X": 0,
                "Y": 0,
                "Width": 15,
                "Height": 11
            },
            "ToArea": {
                "X": 0,
                "Y": 41,
                "Width": 15,
                "Height": 11
            },
            "AddWarps": [
                "-1 48 {{ModID}}_NationalPark 59 31",
                "-1 49 {{ModID}}_NationalPark 59 31"
            ],
        },
uncut viper
rancid temple
#

That's true I guess lol, required enough to break the rest of the "required" fields but not enough to break the whole item

#

A soft requirement, as a treat

fleet crystal
#

Omg you’re a life saver 😁

rancid temple
#

Now that I'm more familiar with editing the pipeline in SMAPI, I could get rid of the CP element of this mod

tiny zealot
lucid iron
#

Naw just slap a ContentPacks on it

velvet narwhal
#

i have yet to make progress on that crow-scaring building, my brain has not wanted to read or even think

rancid temple
#

I tried to inherit off Building but for some reason I couldn't get the custom building to accept the type

lucid iron
#

More seriously I don't want to change the folder structure of any published mods

rancid temple
#

I wasn't even sure if I was registering with SpaceCore correctly because it wouldn't change it to my type

lucid iron
#

So I don't think I would change it (to smapi content)

uncut viper
#

changing the folder structure of a mod with any significant number of downloads is just asking for users to end up with the leftover folder alongside the new stuff

rancid temple
#

Well it would just be the removal of the CP mod I bundled with it lmao

uncut viper
#

bc they will just drag and drop

rancid temple
#

But yeah, that's fair

#

Also it would be work, and that sounds like work

lucid iron
#

Wait no u r speak of buildings oops

rancid temple
#

Oh ok, I was gonna say that didn't sound like an option I remember lmao

lucid iron
#

Are u make a new building

rancid temple
#

Was trying to find someone else who had made fully custom buildings with their own class type, but couldn't really find any that were going that far

#

Yeah, I was building a new building each time

velvet narwhal
#

and i'm dumb and i couldn't get the GetData off of BuildingData, so my brain flatlined

lucid iron
#

Wait aviroen I told u about that

velvet narwhal
#

yeah it didn't like it SMCPensiveMove

#

Building buildingData = new Building.GetData();

rancid temple
#

The mod or your brain? /lh

velvet narwhal
#

both

uncut viper
#

you need to call GetData on an instance of a building

#

it will also return a BuildingData object not a Building object

lucid iron
#

yea dont do new there

#

iirc you needed to iterate all the farm buildings right

velvet narwhal
#

yeah SDVpufferweary we were gonna do the skip crime

rancid temple
#

Skipping the add crows?

velvet narwhal
#

if any building on the farm has specific customfield, skip addCrows, yeah

lucid iron
#
foreach (Building building in __instance.buildings)
{
    BuildingData data = building.GetData();
    data.CustomFields.TryGetValue(...)
}
#

__instance should be Farm which inherits from GameLocation

velvet narwhal
#

oh instance.buildings SDVpufferpain

rancid temple
#

I wanted to make my own custom building so I could still use the add crow section to create a dialogue that says how many crows were fed lol

#

But I'm really unsure how to make the custom bulding accept my custom type

velvet narwhal
#

well mine i didn't want to activate at all unless it had the custom field, so i mean, sort of two cakes but also crimes

lucid iron
#

oh u know i think i got it

rancid temple
#

I eventually gave up and just changed the deluxe scarecrow to protect the whole farm and get all the credit

lucid iron
#

need the whole class name

#

typeof(TrinketTinkerEffect).AssemblyQualifiedName

#

like this

rancid temple
#

Huh, uh, would that not work in the building data then?

velvet narwhal
#

if i'm gonna commit the skip crime is it (i am testing just the false and moving the true out of the loop we'll see if i break anything aSDVpufferrise )

    return false;
}
else
{
    return true;
}```
lucid iron
#

this string is like
TrinketTinker.Effects.TrinketTinkerEffect, TrinketTinker, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null

rancid temple
#

Oh wow, that's way more than I was putting, okay lol

lucid iron
#

i think the minimum required, while i was testing my trinket stuff, is this

TrinketTinker.Effects.TrinketTinkerEffect, TrinketTinker
#

but im in C# anyways so i just made it a CP token and not have to think about it

fleet crystal
#

I have another question when ever I try to load the mod for the custom location it says my map doesn’t have the required layer buildings when it does

rancid temple
#

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

vernal crest
velvet narwhal
#

(well. it showed up in the harmony summary, now i gotta edit a vanilla building ig)

ocean sailBOT
#

Log Info: SMAPI 4.0.8 with SDV 1.6.8 build 24119 on Microsoft Windows 10 Pro, with 17 C# mods and 50 content packs.
Suggested fixes: One or more mods are out of date, consider updating them

lucid iron
vernal crest
rancid temple
#

I could, would just need to store the number of crows somewhere

lucid iron
#

still need to make crows go away tho, maybe u just do custom tile action for that

#

no class

rancid temple
#

Well, getting them to not appear is the easy part lol

#

Just a prefix to addCrow

lucid iron
#

building's got mod data so u good there

velvet narwhal
#

yours can take priority, i have to go back and look at that harmony annotation thing SMCKekLmaoDog

lucid iron
#

and yea prob need to a tile action for custom dialog like that

velvet narwhal
#

SDVpufferthinkblob well, i am stuck in the void

lucid iron
#

there's a smol mod i wanted to make

#

add interiors to well

velvet narwhal
#

i can't even tab out of sdv SMCKekLmaoDog

lucid iron
#

but i am stuck on what that'd do

rancid temple
#

Ultimately I'm not sure I'll end up finishing the entirety of this mod because I don't know what to do about the building art lol

#

I tried to make a little box with seeds in it and did actually delete that

vernal crest
#

Offer to do some coding for Pau and get her to do some art for you?

lucid iron
#

tbh i thought like

#

the corncrow as meant to be this mod (big building sized scarecrow)

#

but then it got released and was just big craftable scarecrow blobcatgooglyblep

vernal crest
#

Yeah because Sekundes wanted to do the building idea but didn't feel confident in the C# required

#

Having no C# experience

velvet narwhal
#

yeah i think sekun just got impatient with roku and i fiddling

#

which is a-ok

lucid iron
rancid temple
#

I thought they were just fine with the regular scarecrow functionality

#

Especially after Pathos said it would be faster than Harmony

velvet narwhal
#

i think they also realized that a building would mean larger scale art SMCKekLmaoDog

lucid iron
#

just slap a high res stock image scarecrow in there no one would ever know

fleet crystal
rancid temple
#

I am technically still in the midst of making a mod for Pau lmao

vernal crest
vernal crest
#

Minigames?

fleet crystal
#

oh fiddle sticks