#making-mods-general

1 messages ยท Page 30 of 1

lone ice
#

That's so much funnier hahaha

#

your joke was good

woeful lintel
#

thanks SDVpufferheart

rancid temple
#

The prismatic effect in game is just a color tint, so the base sprites would have to be grayscale

lone ice
#

which would be fine, but I understand that it's not hardcoded to apply to anything other than like, farmer clothes or slimes

rancid temple
#

I think it's kind of considered expensive to render too

drowsy pewter
#

so you want a bug that changes colors in a rainbow

rancid temple
#

Since it requires changing the color 60 times a second

drowsy pewter
#

You can just make an animated bug with Spacecore

lone ice
#

mod?

drowsy pewter
#

spacecore provides a framework for animating any texture via the CP format

#

no need to bother with draw functions and overlays or whatever

lone ice
#

ooh

#

thanks, i'll look into that

#

that would actually be better too because I have them set as forage in the Woods but a static butterfly looks bad

queen valley
#

Is there a way to tell Lookup Anything to put machine recipe inputs in a different order (perhaps enforce Fuel being first)? Im experimenting with adding new ores and it looks pretty silly to see Chrome Ore x5 + Coal when every other recipe is Coal + Some Ore x5

velvet narwhal
#

SDVpufferflat i wish i could auto sync between translation files for any new things i've added without deleting preexisting, had to manually compare

woeful lintel
faint remnant
#

I'm getting this error when trying to add an interior to a new building MissingMethodException: Constructor on type 'StardewValley.AnimalHouse' not found. does anyone know how to fix this or what I could be doing wrong?

queen valley
grand gale
#

I'm trying to make a FTM pack, is there a file or something I can see the iridium ore spawn settings to reference?

royal nimbus
#

how would one go about loading in new textures for certain areas in the map? example, i want to edit the textures in spouse rooms but they use some shared textures from other indoor places. this here shows the spouse rooms and on the right is a house having been effected by the texture change which i dont want.

rancid temple
#

You can't patch the base sheet only for some places in the same map

royal nimbus
#

if it cant be done i will just have to sacrifice some of the changes i want. i figured with modding tho that anything is possible

rancid temple
#

You would need to make your own sheet and patch in your changes over the map you want to change in the spots you want to change

royal nimbus
#

ah okay

#

how do i go about that? is it very complicated?

rancid temple
#

No, just create a sheet with all the tiles you want. Create a copy of the spouse rooms tmx and edit it, add a tileset using that sheet, make sure to embed it

#

Make your changes and then move your tmx and tilesheet into your mods folder and create a patch that patches the base game spouse rooms and loads your tilesheet into Maps

royal nimbus
#

i think ive seen something like this done before. so like copy the entire png, and cut out everything that's not included right?

rancid temple
#

Loading your tilesheet is optional if you want it to be able to be recolored

#

Uh, I'm not sure I understand what you mean, sounds like you're talking about creating an overlay patch for a base tilesheet for recoloring

#

Which, no not that

royal nimbus
#

bare with me as i can be a bit slow with learning and understanding these things. so make the png, load it into the spouse rooms tmx and save it?

noble jolt
#

So I took care of my Robin issue with the greenhouse but just making the map space bigger lol... Now I just have to figure out how to get crops to move from the regular greenhouse to the upgraded version.

lucid iron
#

can you make the dirt tiles match in coordinates

rancid temple
#

So this is my custom tilesheet for a map I made, it's like additional tiles that have my own edits but that I don't want to overwrite the original tiles everywhere

royal nimbus
#

ah so it can just be small and simple then.

rancid temple
#

In your case, since you're editing an existing map, you wanna make a copy of it

#

Of the map I mean

#

So copy spouseRooms.tmx and name it something else, I usually still put z_ in front of all my maps so they're grouped together near the bottom

#

Then open that in Tiled

noble jolt
#

Well, I placed them in the same area, which gets larger, but that shouldn't matter since it's still dirt, i think.

royal nimbus
rancid temple
#

Yep

#

Oh right, I was thinking about making a mod to set custom locations for Robin to show up when working on a building

calm nebula
#

Good morn

noble jolt
#

hewwo

calm nebula
#

Do it

noble jolt
#

Yes, that would be nice

#

lol

#

i'll have her hanging on the wall

rancid temple
#

I was able to move her without harmony transpiling, so that was nice, just trying to decide what the best way to get her desired location would be, buildings data has a custom fields

noble jolt
#

you'd have to be able to add it in right?

rancid temple
#

Yeah, ideally I want it to be something that is just already part of the CP process

noble jolt
#

yeah, would be super nice for people like me who can't/won't learn C#

rancid temple
#

So when making your buildings data, my idea is that in the custom fields you'd put something like "rokugin.robinlocation 5 5" and my mod would look for that in the buildings data and set her position based on it

#

Though I need to make sure custom fields works like that

noble jolt
#

maybe a way to select if she's on a scaffold or not would be nice, if it isn't not too big of a pita

rancid temple
#

That's in the shed right? I don't think I've ever built one of those lmao

noble jolt
#

yeah, in the shed

#

there's like a plank held up by two ropes

rancid temple
#

Oh interesting, the Self Serve mod is broken in 1.6.9 when Robin is building something

lucid iron
#

theres an overload for point and one for vector

rancid temple
#

Hm, yeah, I could do that though I'm not sure if that's less obtuse lol

#

For the user I mean

lucid iron
#

idk i feel having map position thing associated with the tmx makes the most sense Bolb

#

plus theres cp stuff to edit this without tmx too

royal nimbus
#

im making the png and honestly these are so tricky to work with because its hard to tell a lot of the time what parts are used where.

lucid iron
#

open tiled and right click with the stamp tool

rancid temple
#

You could take your recolor set up and just copy the tiles into a new png

#

Though, I assumed you would already have something like this for doing a recolor

#

Maybe with more blank spaces or something

#

Depending on your patch mode

royal nimbus
#

this is what it looks like so far

royal nimbus
rancid temple
#

This is your new png or the recolor one you'd been using?

royal nimbus
#

thats the new one

rancid temple
#

Well, as long as you're okay with the placement of those things, I tighten my tilesheets up because I don't like a long travel time to find the tiles I want

royal nimbus
#

right yeah. well im not sure how placement and such works so thats why i just copied the original and cut out what doesnt belong.

#

im sure this needs work tho as im missing things and prob have some things that might not go there

rancid temple
#

Placement doesn't matter for a custom sheet

royal nimbus
#

its just it for now

#

oohhhh

#

good to kno

noble jolt
#

so if I have the code do this for the upgrade, the map doesn't change. JSON "NonInstancedIndoorLocation": "Greenhouse", "IndoorMap": "{{ModId}}_IGH",
If I do this JSON "NonInstancedIndoorLocation": null, "IndoorMap": "{{ModId}}_IGH",
the map applies, but the plant's don't transfer. and if I try JSON "NonInstancedIndoorLocation": "{{ModId}}_IGH", "IndoorMap": "{{ModId}}_IGH", smapi get angry.

rancid temple
#

You're basically creating your own stamp pallet

royal nimbus
#

okay

rancid temple
#

You just want to avoid making changes to a sheet you're already using

#

Unless you like redoing entire maps

royal nimbus
#

well first im gonna have to edit the original png to having the original textures back

#

nah im not gonna redo entire maps. thats too much lol. i just like to edit some textures here and there

noble jolt
#

So I'm guessing I need to make my map apply as a "NonInstancedIndoorLocation" just not sure where I should targt for that.

rancid temple
#

Yeah, I suggest always making backups of things before editing them

royal nimbus
#

im gonna have to get back to this as i need to do somethings rn

#

im just glad to kno its not too complicated of a process

rancid temple
#

So NonInstancedIndoorLocation can only be used by a single location at a time

#

Setting it to Greenhouse doesn't work because Greenhouse is already in use by a location

#

I'm not sure if you'll be able to move plants between maps with just CP

#

There's the IndoorItemMoves field, you could try that

#

You would need to set up an entry for every single tile

#

Oh wait, there's a Size field

#

Yeah, so you can try that, but if it doesn't work then I'm pretty sure you'd need C# in order to move the crops

noble jolt
#

Do crops count as items in that sense though? In the other building entries it's like the incubator in the coop.

rancid temple
#

That's why I'm not sure if it'll work, I don't really think they do

noble jolt
#

Sadly.

rancid temple
#

Only really one way to find out though

lucid iron
#

crops are terrain feature

noble jolt
#

That's what I thought, especailly the digdirt part or however it's actually called.

#

there is a "CustomFields" section, i'm just not sure how that would apply.

rancid temple
#

Custom fields doesn't do anything on its own

noble jolt
#

Right

rancid temple
#

A C# mod can read it and do something based on what it finds there

noble jolt
#

hmmm

lucid iron
#

i feel like you should just make sure the new dirt area entirely covers the old dirt area

rancid temple
#

I don't know if that'll work, upgrading is changing locations entirely isn't it?

noble jolt
#

It does

lucid iron
#

make sure u dont extend the map upwards n stuff

rancid temple
#

So the crops that exist in the first location won't exist in the second location

lucid iron
#

which is preferable to crops growing out of bounds at least

rancid temple
#

If it were a map patch then it would be fine

#

But it's through the building upgrade system

noble jolt
#

yeah

#

it goes from this with the highlighted corner at 29 11

#

to this with the highlighted corner at 27 9

#

so that smaller area would be entirely in the new bigger dirt area

#

making the top one the greenhouse map also made it so you don't see Robin working.

#

but yes, i think because it's an upgrade it becomes an entirely different area.

#

I may have to have the letter Robin sends just have a warning about the upgrades making the crops get removed or something

plucky reef
#

can I do a knockback effect without having it attached to a weapon?

rancid temple
#

You'll probably want the warning in a few places just so that you also still have to explain to people who won't read your warnings

noble jolt
#

Yeah, I'll put it on the mod page whenever I add that, and in the letter I have her mail after you get the greenhouse.

#

Not sure where else I could put it.

lucid iron
#

it takes a knockBackModifier param

rancid temple
noble jolt
#

true

#

I may have to give in and push myself to learn C#

plucky reef
# lucid iron u can call GameLocation.damageMonster directly

sick ok.
Funny that I started this trying to decide whether to do a damage field or a projectile, and now I'm trying to decide whether to do a damage field or a weapon swing.
I was doing art for the harpsword and can't get it look right, so a friend suggested a "play the harp and soundwaves hit the monster" and that sounded really cool.

rancid temple
#

Oh also, there's a file description you can set on the download page lol

#

Hm, if I use CustomFields I can also change her position on the outside of buildings

#

Farmhouse is separate from even all that nonsense lol

#

Same for community upgrades

heady relic
#

trying my hand at pixel art for the first time, making a mustard seed crop

#

The game is severely lacking in winter crops, especially given how many crops apparently thrive over the winter. Depending on how it looks when it's actually growing I might add some blue in there to mimic frost

pastel otter
#

Hello! I'm new to the discord and new to modding and have an 'idiot question'
If I was to replace the meadowlands map with a smaller map do I have to do anything special to ensure the coop appears? IE would I have to delve further into the game code rather than the basic map.tmx content patch that the wiki shows?

next plaza
#

Coop is hard coded to appear at the position it does on the Meadowlands

pastel otter
#

Ah, so if there was a clash or the map was too small it would explain the errors I'm getting that I don't understand?

next plaza
#

Perhaps, hard to say without seeing the error (and I'm at work so can't look into much at the moment)

#

SpaceCore lets you add a coop to new farm types (or other buildings) - there's another framework too but I'm forgetting the name at the moment

pastel otter
#

No it's fine, I think I halved the map size from default so it definitely explains it and gives me a place to re-start from ๐Ÿ™‚

rancid temple
#

My brain reading this as co-op the entire time wondering what the hell is wrong with multiplayer on a smaller map

pastel otter
#

Haha sorry! I'll re-do the map, look into spacecore for a new ๐Ÿฃ coop then have the mod switch a different map out so I don't clash with the hardcoded location in Meadowlands. Thank you so much ๐Ÿ™

rancid temple
#

Is there a reason to avoid just adding a new farm?

finite ginkgo
#

You don't have to override any of the vanilla farms, you can add your own

rancid temple
#

In fact, Meadowlands is already an entry in the additional farms data lol

pastel otter
#

I'm just making the map for me and I'm lazy/switching seems easier than writing the minimal additional lines of code

#

and I don't use the river map

#

If I was to ever put it into Nexus etc I'd abolutely learn how to do it properly

rancid temple
#

Well, as long as it's a choice and not just because you think it's the only way

plucky reef
#

Back when I did my custom map it required overwriting one of the originals, can they just be added on now?

rancid temple
#

Yep Data/AdditionalFarms

next plaza
#

You've been able to make new farm types since 1.5.5 I think

pastel otter
#

You can do a mod folder located swap, then just . out he mod when you want the original one back

plucky reef
#

I need to update that then, I should publish it.

pastel otter
#

Thank you again!

brittle pasture
queen valley
#

Thanks for the info =]

#

I guess Ill look forward to that PR, lol

torpid crystal
#

hi! does anyone know a mod that automatically craft something?

#

it would be DOPE for an Automate gameplay session, since i wanna start a resturant, but im lazy

rancid temple
#

#modded-stardew would probably be a better place to ask, this channel is generally for the creation of mods

torpid crystal
#

oh ok thank you

royal nimbus
#

hey whats the command to see ppl to commission for coding? im so iffy about looking up commission stuff with how many scammers there are

plucky reef
#

!commissions

ocean sailBOT
royal nimbus
#

tysm

brittle ledge
#

I think Kedi's the main person doing C# comms but she's well regarded in the community. Non-C#, Aster I believe is on hiatus but Ark and Thylak are also well-known.

formal crown
#

I have been summoned SDVpuffersquee

heady relic
#

I'm attempting to add a new production rule to the Preserves Jar, and it includes AdditionalConsumedItems. Does anyone know if it's possible to make this input-specific rather than machine-wide?

lucid iron
#

You need extra machine config for that

formal crown
#

Extra Machine Configs may be allowing that, but I'm sure not possible with vanilla

lucid iron
#

If vanilla then u just gotta make new machine I think bolbthinking

heady relic
#

Yeah, making a new machine would probably be easier, but it seems silly just to have a machine that only makes mustard

#

Oh my god I could add other condiments I'm so stupid. Tomatoes exist too.

lucid iron
#

Mushroom ketchup DokkanStare

heady relic
#

Looks like Extra Machine Config is exactly what I was looking for, thank you!

rancid temple
#

Trying to decide what would make more sense for a user. For buildings with an interior, Robin's position is set based on tile coordinates, so that's really straightforward. Buildings without an interior, her position is set based on pixel coordinate offsets. Currently have it so a positive X value goes right and a positive Y value goes down. This feels wrong to me, but I think it makes sense if you compare it to tile coordinates

uncut viper
rancid temple
#

Yeah it's also designed as a companion to normal building modding, so hopefully they already know what they're doing lol

#

I do wonder where 0, 0 is in pixel coordinates

lucid iron
#

Most drawing applications have 0x0 in top left corner I think

#

So positive -> go down makes a lot of sense

rancid temple
#

Yeah, the tile coordinates work like that, that's how I had the math originally because I figured it made the most sense compared to the tile coordinates

uncut viper
#

positive Y going up in a 2d game would be the weird one out for me

rancid temple
#

I just hate it when I'm thinking about the math behind the scense lol

heady relic
#

so I'm getting this, but I don't see any field labeled action on the wiki modding page for machines

[Content Patcher] Ignored Yumiko's Artisan Update > Include data/Machines.json > invalid: must set the Action field.
lucid iron
#

The Action field is content patcher

uncut viper
#

top left corner as the origin makes sense bc thats where CRTs would start their beam

plucky reef
#

Just a quick check before I get into coding to make sure I'm not wasting time on a weird solution, is there a way to turn off the animation for swinging a sword? Is that Harmony? Can I keep the damage portion as if there was a swing but not the animation of the swing? I know I will probably have to dig around in source files.

lucid iron
#

I had felt that your harp should be a subclass of meleeweapon

#

You avoid a bunch of harmony shenanigans in exchange for a spacecore dependency to register your new type

plucky reef
#

it is getting to that point

plucky reef
#

a journey of discovery

lucid iron
#

As a subtype it can just override the swing I think

#

Assuming it's not private

calm nebula
plucky reef
#

and spacecore is already a dependency

calm nebula
#

Tell the mathematician in you to shut the fuck up

uncut viper
#

i think thats always the recommended course of action

calm nebula
#

Nah

lucid iron
#

The mathematician in me never took calculus ii

calm nebula
#

The mathematician in me is needed rn for work

rancid temple
#

I'm more used to working with a grid in Unity where I don't have to start in the top left, I just go wherever I want in the x, y, or z directions

lucid iron
#

It's an abstraction but I'm psure it's still draw with 0, 0 top left

#

Monogame just makes u call the draws

uncut viper
#

unity i think does start in the bottom left from a user-facing standpoint as loing as the user doesnt care about what the GPU is doing

next plaza
#

Top left 0,0 is a standard from OpenGL I think?

rancid temple
#

Admittedly, I don't have to care what Unity does in the background lol

#

But uh, follow the rules of the house or whatever that saying is, so positive is down

uncut viper
#

you could try harmony patching monogame to draw it in a different direction if you want

lucid iron
#

In my trinket mod u put negative offset y for floating LilyDerp

rancid temple
#

I could just invert the math, but it's less about what I want and more about what makes sense for others for this project

#

The rest is my personal gripes with math

lucid iron
#

What is the Robin position relative to?

#

Top left of the building sprite?

rancid temple
#

Hm, I was gonna figure that out but I forgot to, one sec

#

(half the width of the building + the top left X, half the height of the building + top left Y) and then with a built in offset of X + 16 and Y - 32

#

So I guess it's the middle? (plus half a tile to the right and 1 tile up)

#

Farmhouse has its own different math

#

At least, it looks like 16 equals half a tile

#

Or is it 1/4 and 1/2?

#

Since the scale is 4x

#

It's funny that the outdoors position is so granular but indoors is just flat tile positions

faint remnant
#

Is there any tutorial out there/can anyone assist for making tilesheets for indoors I think I did it right but I'm getting spammed with errors about a missing animalHouse constructor and finding the file

heady relic
#

God I'm so close I can feel it. The preserve jar now makes mustard with 5 mustard seeds and 1 wine. It no longer makes anything else it should.

rancid temple
#

Sounds like you overwrote the entire outputs instead of just adding to them

heady relic
#

yup

rancid temple
#

Did you use TargetField?

heady relic
#

Nope, I did it this way (obviously wrong, but also, obviously more digging required)

lucid iron
rancid temple
faint remnant
calm nebula
#

Positive down to the right

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.

calm nebula
#

Look if my math brain can accept the damn y axis being upside down lol

rancid temple
#

I'll begrudgingly accept it eventually, it's just new to me lol

faint remnant
# calm nebula !json

Sorry should have specified I'm getting the errors once I build the building and when I attempt to enter it. New to all this

calm nebula
#

Sure! And I don't care for debugging code I cannot see

faint remnant
#

Ah I see the share link my bad brain is COOKED

uncut viper
rancid temple
#

Can animals even be this big?

faint remnant
#

Animal is working fine the buildings not

lucid iron
#

i think it might be cus you made a custom location

#

rather than simply loading the tmx as an asset

brittle pasture
#

CustomLocations is deprecated right

uncut viper
#

deprecated but still works

rancid temple
#

It should still work, but I don't know jack about it for anything outside of loading a location

faint remnant
#

I've tried it both ways but I'll try the asset way again

uncut viper
#

you should really send your error log

heady relic
#

probably shouldn't be making rapid incremental changes to my mod with the only version I have of it huh.

faint remnant
#

Not popping up with the error it spams

rancid temple
#

Like I don't know if you can use a CustomLocation to load a building location

uncut viper
#

i dont know what you mean popping up. if you're getting errors, if you're getting anything in the console, you're getting a log saved to your computer

rancid temple
#

Probably not, though CP is easier to recreate

faint remnant
ocean sailBOT
#

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

rancid temple
#

In the realm of things I wish were different, why are we still using the blueprint data page for buildings

#

Ignored Mammoth > custom location 'Jonbow.tent_indoor': the Name field must be prefixed with the mod ID (like 'Jonbow.Mammoth_') or 'Custom_' to avoid conflicting with current or future vanilla locations.

rancid temple
hallow prism
#

ah i thought you meant in game

rancid temple
#

Ah nah, that's all right and fine

wanton pebble
#

While I'm on break - in terms of Winter Star gifting, you can only give dialogue based on ID or category and not Gift taste presently, correct?

uncut viper
#

im not even sure if you can use CustomLocations for this now anyway, I think you need to load the .tmx directly to Maps/

rancid temple
#

Yeah based on the buildings data, you're not giving it a location you're giving it the map

#

It creates the location itself

lucid iron
#

i did check another animal building mod, and they did use custom location so it'd work

#

but i think u only need to load the tmx here?

uncut viper
#

seems.... stange, but i guess i know nothing about maps

lucid iron
#

location should get instanced

faint remnant
uncut viper
#

still probably easier to just load the tmx into Maps though

#

and future proof

lucid iron
#

from what i understand 1.6 custom location just makes a Data/Location in the back right think

uncut viper
#

beats me ๐Ÿคทโ€โ™€๏ธ

rancid temple
#

I mean, I think that's true

uncut viper
#

i am curious why the error itself says it cant find "Jonbow.tent_indoor.xnb" though if neither the customlocation nor the animal building entry have "Jonbow." in front of it

lucid iron
#

would try just doing

{
    "Action": "Load",
    "Target": "Maps/{{ModId}}_Tent",
    "FromFile": "assets/testing.tmx"
},
#

and "IndoorMap": "{{ModId}}_Tent"

#

remove CustomLocations

#

(maybe name the tmx something other tan testing kyuuchan_run

faint remnant
uncut viper
#

ah, well, thatd explain it lol

rancid temple
#

It is funny that CustomLocations ignores when you try to load in a location without proper protection against conflicts but Data/Locations will just let you do whatever you want

uncut viper
#

i assumed the game itself would throw some sort of error or warning if you tried to load two locations with the same name, right? whereas CustomLocations was all Content Patcher

faint remnant
ocean sailBOT
#

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

uncut viper
#

are you sure your file is named tentMap.tmx in your assets folder (which should be in the same folder as your content.json)?

#

you should really turn on file extensions, cause that might be the other kind of Tiled map extension im not remembering atm

rancid temple
#

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

uncut viper
#

.tml? I cant remember

rancid temple
#

Seeing them off gives me big anxiety lmao

uncut viper
#

.tbin thats the one

faint remnant
rancid temple
#

Even if it's all working right, my first instinct is that something could be wrong

uncut viper
#

oh, wait

lucid iron
#

your tent map has xml errors

uncut viper
#

are you using a tilesheet from a different mod?

#

did you also make the Reptile Hut mod and are trying to use the same .tsx?

faint remnant
#

was testing one out from a different mod to try to get it to work

lucid iron
#

it died on load think

Can't apply patch Mammoth > Load Maps/{{ModId}}_Tent to Maps/Jonbow.Mammoth_Tent:
StardewModdingAPI.Framework.Exceptions.SContentLoadException: Failed loading asset 'assets/tentMap.tmx' from SMAPI\jonbow.mammoth: an unexpected error occurred.
uncut viper
#

when you load a file from a different path like that in tiled, it will try to look for the tilesheet like "i want the one thats two folders up and then inside this other foldeR"

#

But when the game loads it, the game cant look "two folders up"

#

So it breaks

lucid iron
#

maybe start with the coop.tmx file first

#

from unpack

faint remnant
#

ty will give that a go!

lucid iron
#

btw u can test with a much smaller set o mods

uncut viper
#

the problem isnt with what tilesheet you used just that the way the info is saved in your .tmx the information about where to find the tilesheet is in a format the game cant understand

lucid iron
#

to load faster

#

!modgroups

ocean sailBOT
uncut viper
#

it wont work if you just load the tilesheet from the unpack directly either

#

because it will still be relative to your .tmx

#

unless you put your .tmx IN the unpacked maps folder, then open it and load the tilesheet from that same maps folder, and then move it back into your mod folder when you're done

#

basically when you're making a .tmx map f ile the easiest way to prevent that sort of error is to only load tilesheets that are in the same folder as the .tmx you're working on

#

so you could also do the reverse and copy a sheet from the unpacked Maps folder into your mods folder and then delete it before release

rancid temple
#

I thought we had a command for that but I can't remember what it would be

uncut viper
#

!tilesheetclimbing

ocean sailBOT
#

When creating or editing maps in Tiled, one common error is tilesheet climbing, marked by red text containing "invalid tilesheet path '../../..'. This is caused by SMAPI not being able to find the tilesheets needed by the map file. To prevent this error, make sure that you have a copy of all necessary tilesheets in the folder containing your WIP tmx file. Copies of vanilla tilesheets can later be deleted, but must be present while working on your map.

If you get this error with a completed map, an easy way to fix it is to open your tmx file in VS Code or a similar text editor, find all of the places with <image source=, and remove the filepaths to so that only the tilesheet names remain. For example, if the code says <image source="Content (unpacked)/Maps/townInterior_2" width="512" height="64"/>, change it to just <image source="townInterior_2" width="512" height="64"/>.

uncut viper
#

thats for a similar error and explains how to fix it manually after the fact though, idk if theres another one

rancid temple
#

Probably what I was thinking of, the bit about having a copy of all the tilesheets in the folder containing your tmx

uncut viper
#

pretty sure this is the same genre of error just in this case it cant find the .tsx (Which would then not be able to find the tilesheet)

rancid temple
#

Failing just before the tilesheet climbing lol

uncut viper
#

better to fall at the bottom than during the climb i guess

#

!mapmaking maybe?

ocean sailBOT
#

If you want to make mods that add or edit maps:

  1. Use Tiled (https://www.mapeditor.org) to edit .tmx or .tbin files.
  2. Refer to the Maps wiki page (https://stardewvalleywiki.com/Modding:Maps) for details on how maps work in Stardew Valley.
  3. Use Content Patcher to load in new locations (https://github.com/Pathoschild/StardewMods/blob/stable/ContentPatcher/docs/author-guide/custom-locations.md) or make specific map edits (https://github.com/Pathoschild/StardewMods/blob/stable/ContentPatcher/docs/author-guide/action-editmap.md).
rancid temple
#

I mean, the maps page has a lot of useful info on it

#

That's where I got most of my info about how to do map stuff

old edge
#

I added logging to help me write some code and debug everything but now I guess it's flooding the console. hmm.. by default does smapi hide Trace logs?

uncut viper
#

one day when i get back to making my NPCs map ill start remembering the relevant commands but that aint today

#

SMAPI does hide Trace logs by default

rancid temple
#

Though I think you can see them in a log?

#

Just not the console

uncut viper
#

in the log file you can see everything

faint remnant
#

This all is so helpful thank you everyone!!! Makes way more sense now

uncut viper
#

(though really you should remove unnecessary debug logging before release anyway)

rancid temple
#

If I have something I need to debug that's gonna spam, I usually set up a config setting for it in GMCM

#

But anything informational I generally keep in trace or if I think it would help me debug an issue later I also will strap to a GMCM option

old edge
#

oh you mean the log in the errorlogs folder?

rancid temple
#

Yeah

uncut viper
#

yeah that saves everything

old edge
#

hmm so I just need to remove all the logging stuff once I'm done?

uncut viper
#

like Roku there are some things I keep in Trace even on release if I think it would be useful to debug someone elses error log later if they report a bug

#

but generally I remove most logs that arent errors/warnings

old edge
#

I'm getting this but I'm not sure still very new to C#. [19:18:51 TRACE CapeStardewCode] Player state - Swimming: False, Health: 154, Stamina: 276.4502

rancid temple
#

I probably leave too much in trace, but if it's gotten to the point that I'm trying to figure out why my mod isn't working in trace I really have fucked up

uncut viper
#

if its not gonna provide any useful information and is just for you to debug to make sure the mod works then it's just gonna make log files unnecessarily larger, but also, its usually a moot point most of the time, just kinda good practice to not leave debug code in release

old edge
#

how do I post code here?

rancid temple
#

I've seen pastebin, uh

uncut viper
#

if its a big chunk of code then maybe pastebin i guess

#

there was one other i saw recently but i forget it but it was just for code

rancid temple
#

There was one Pathos was denoted as using

calm nebula
#

Gonna spin up a second thread for it

rancid temple
#

I think I saw one of your commits was just "meeeooow"

old edge
#

can we embed scripts here?

rancid temple
#

Made me laugh

#

If they're not too big

#

!codeblock

ocean sailBOT
#

You can embed code in Discord using a series of three ` :
```
Your code can go here
Even if not a haiku
Just an example
```

For syntax highlighting, add the language code on the same line as the first
``` (with no space, like ```json).
The usual codes are cs (C#) and json.

rancid temple
#

I should probably add that "not too big" caveat to this

uncut viper
#

i dont know if that command is meant to explain how you should send code here though

#

just explaining the discord syntax

rancid temple
#

Yeah, I guess that's true

uncut viper
#

i think if you said "not too big" in it people would assume that it just literally wouldnt work over a vaguely defined size limiut

heady relic
#

Hmm. Well my mustard crop grows... but it seems to be using the parsnip texture.

rancid temple
#

Don't know how I could have forgotten it

old edge
#

hmm

rancid temple
#

Looks more for uploading files in general though

uncut viper
#

box

#

but

#

i cant type right now lmao

rancid temple
#

Ah, there's also litterbox.catbox.moe, that's what I was originally thinking of

uncut viper
#

but thats for sending files, i coulda sworn there was- oh yeah

rancid temple
#

Still for sending files

uncut viper
#

thats also the one i was thinking of but i was misremembering it

rancid temple
#

Just temporary storage and much bigger allowed

uncut viper
#

i thought it was just text

#

but i remember that link bc i got timed out for trying to put it in a markdown link in here

#

bc i saw pathos do it once

#

and i didnt know better

rancid temple
#

Mods are bad influences

uncut viper
#

theres also github gists

rancid temple
#

For some reason I do remember a somewhat recent link to a different code sharing site

old edge
rancid temple
#

But my stupid lizard brain won't shut up with pastebin

heady relic
#

well that's not right

rancid temple
#

Spooky

#

Too long I guess, got converted to a text document lol

#

Generally code embedding is more for snippets of code

old edge
#

I see

faint remnant
#

Yep it was the tile set thank you all!!!

rancid temple
#

Are you using the dev version of SMAPI?

#

My console doesn't log trace, so I'm wondering if you've either got that or have a setting changed somewhere

old edge
#
using StardewModdingAPI.Events;
using StardewValley;
using System;

namespace CapeStardewCode
{
    public class CustomEventHandler
    {
        private readonly IMonitor monitor;
        private readonly IModHelper helper;
        private bool passoutTriggered = false; // Flag to prevent repeated execution

        public CustomEventHandler(IMonitor monitor, IModHelper helper)
        {
            this.monitor = monitor;
            this.helper = helper;
        }

        public void OnUpdateTicked(object? sender, UpdateTickedEventArgs e)
        {
            // Ensure the game is ready and the player exists
            if (!Context.IsWorldReady || Game1.player == null)
                return;

            // Prevent further execution if the passout event has already been triggered
            if (passoutTriggered)
                return;

            Farmer who = Game1.player;

            // Hide this trace log by default
            monitor.Log($"Player state - Swimming: {who.swimming.Value}, Health: {who.health}, Stamina: {who.Stamina}", LogLevel.Trace);

            // Check for swimming and health/stamina conditions
            if (who.swimming.Value && (who.health <= 0 || who.Stamina < 0))
            {
                // Keep important log at Info level
                monitor.Log("Player needs to pass out or be rescued due to swimming exhaustion or defeat.", LogLevel.Info);
                passoutTriggered = true; // Set flag to true to prevent further execution
                PerformCapeStardewPassoutEvent(who);
            }
        }```
#

here's a snippet of the file. I haven't been getting the log flooding it's another player

uncut viper
#

they probably have the dev smapi installed then, or turned on verbose logging

rancid temple
#

```cs
<code here>
```
(FYI)

#

smapi-internal has a config.json, you could check if you have anything in the VerboseLogging field in there

#

Also DeveloperMode literally says it enables trace logging visibility lol

uncut viper
#

PEBKAC error

old edge
#

ok the player did say they are also a developer.

#

so they might have unknowingly enabled trace logging?

rancid temple
#

I mean, if they downloaded the dev version of SMAPI these things are probably already on

old edge
#

so is it necessary for me to make any changes to the code?

uncut viper
#

nope

lucid iron
#

iirc you can setup macros in C#

rancid temple
#

It would be wild to unknowingly go into the config json and change these settings but people do be wild

uncut viper
#

entirely their problem, though you can let them know

lucid iron
#

to build with and without logging statements for debug vs release

next plaza
#

C# doesn't have preprocessor macros

#

(Assuming you mean like C++ does with #define )

rancid temple
#

You can do those #if directives

lucid iron
#

its got simple ones i think

rancid temple
#

I ran into one with AchtuurCore the other day

lucid iron
#

cant put a whole mini func but can do yay nay

next plaza
#

Ah, by macros I assumed you meant the functions since that's what I normally hear for that

#

I use #if DEBUG in some of my stuff

lucid iron
#

yea idk the c# specific name for these blobcatgooglyblep

next plaza
#

The page you linked calls them symbols

#

Under "Defining symbols"

rancid temple
#

I think this is one of those things that people call a bunch of different things

next plaza
#

Yeah I've never heard them called symbols

#

Just preprocessor defines... though those work differently in C++ since you can actually use them in code

lucid iron
#

i do wish for c/cpp style #define so that i can stop writing whatever * 64

rancid temple
#

In Unity I've seen people call them directives

rancid temple
#

The questions until OP gave up lol

lone ice
#

hi all, anyone know, can you not mod bundles in content patcher?

rancid temple
#

Data/Bundles?

lone ice
#
  "Action": "EditData",
  "Target": "Data/Bundles",
  "Entries": {
    "Bulletin Board/34": "Bug Catcher's/BO 25 1/{{ModId}}_Dragonfly 1 0 {{ModId}}_Butterfly 1 0 {{ModId}}_StagBeetle 1 0 {{ModId}}_AtlasBeetle 1 0 {{ModId}}_RhinocerosBeetle 1 0 {{ModId}}_HeraclesBeetle 1 0 /6///Bug Catcher's'"
  }
}``` modifies the dye bundle entry but doesn't reflect a change in the game
rancid temple
#

New save? Existing save?

lone ice
#

existing save but I could try making a new game

uncut viper
#

bundles are created on save creation

#

they dont get affected afterwards

rancid temple
#

That explains everything

next plaza
# old edge preprocessor directives?

Yeah, you can set certain builds of your mod (like Debug or Release, or for different platforms for other types of C# projects, etc.) to have certain symbols defines. Then use #if to do things based on it. For example, one that VS has by default is DEBUG for Debug builds only, which I'm using here:

        if (Content == null)
        {
            if (cp.IsConditionsApiReady)
            {
                Content = new PatchContentEngine(ModManifest, Helper, "assets/content.spacecore");
#if DEBUG
                Content.OnReloadMonitorInstead("assets");
#endif
                Content.Reload();
            }
            else return;
        }
old edge
#

should I change all of the LogLevel.Info to LogLevel.Trace?

next plaza
#

Then the line between #if DEBUG and #endif gets excluded in Release mode

uncut viper
#

#if stuff also handy for making dotnet templates SDVpufferthumbsup

rancid temple
#

Only if you don't want to see those logs in the console but still want them to show up in the error log

#

(still won't solve that users issue, that's still on them)

#

Though if those logs are only to determine if your mod is working and serve no function of debugging your mod, you could just remove them

#

I keep forgetting to switch my mods to release mode

#

I think all my mods on Nexus are still compiled from debug lmao

old edge
#

yes I just needed them to help me check if it's working

uncut viper
#

pretty sure all of mine are too

rancid temple
#

I think it's fine unless someone tries to use reflection on it

uncut viper
#

what does debug vs release mode do for reflection?

next plaza
rancid temple
#

Not sure if it actually does anything, just saw someone mention they were asked to switch to release for that once I think?

old edge
#

Oh that's cool

rancid temple
#

There's a lot I could be doing to make my mod releases better/less work

next plaza
#

I need to get that automated build upload stuff working again

rancid temple
#

Currently still just zipping up my mod in the Mods folder and deleting the config lmao

rancid musk
#

At the risk of blatant decision to advertise my own stuff: If you use ModManifestBuilder, it will append -Debug to your version automatically when building a debug release, which also makes it very obvious that you didn't use Release mode. https://github.com/KhloeLeclair/Stardew-ModManifestBuilder

#

I use both that, and disabling .zip for non-release builds.

next plaza
#

Probably from switching to release to build, then switching back to debug and not immediately incrementing the version

rancid musk
#

Yeah, it can be a detriment when developing multiple mods simultaneously

#

And when not incrementing your version, as you said

#

It's not necessarily the wrong behavior, but it does make it harder to be lazy which is its own problem sometimes ๐Ÿ˜„

heady relic
#

Final question for the day. Do you think the sprites for these should be wider/taller to seem more full when planted in a field?

rancid temple
#

Size is probably fine, but I think there's something off about the color?

heady relic
#

Yeah, I think I'm going to darken the base a bit, and add some frost/snow to the flowers themselves to make it blend in more. Maybe some more texture to make it seem like a bunch of small flowers instead of one weird shaped one.

rancid temple
#

Vanilla has plenty of weird sprites, I think it's just the lack of very specific shading that makes it stand out

heady relic
#

Yeah, that makes sense. I'll go through and try and modify them more based on vanilla flowers

rancid temple
#

Learning and using CA's shading is its own trial

brittle ledge
#

Yeah, I think it could use some darker colors in your palette

old edge
#

what plant is that?

heady relic
#

Mustard!

old edge
#

oh ok well it has the mustard color

brittle ledge
#

If you wanted to make them wider, I'd do it more at the base and make it a bit triangular shaped?

rancid temple
#

FWIW, I'm no artist but I think the sprite looks good, just the colors stand out a lot to me

old edge
#

yes because it seems to have a tint of green no?

heady relic
#

Oh I'm definitely no artist either. This is my first attempt at making any pixel art, and I figured people here would have plenty of opinions on it

rancid temple
#

That might be fine, if that's what you're going for

brittle ledge
#

Actually I take that back, I'd make the top wider if anything, looking at pictures of the actual plant

heady relic
#

Yeah, that makes sense. I think the monitor I made the art on was a bit darker looking than the one I play on

hollow nest
#

any tips for npc programming/creating in stardew? iโ€™m making mods to add some characters i like but i only know basic python :(

old edge
#

I would add some lighter yellow shades?

uncut viper
#

well, python specifically is not really going to help you here, but not being totally new to programming will help make concepts easier

tiny zealot
#

!npc

ocean sailBOT
#
Creating a Custom NPC

Keep in mind that making NPCs is a complex process that requires learning many different aspects of Stardew modding.
Here are a few links that can help get you started on all that you need to know:

  1. Tiakall has a great tutorial on making a custom NPC for 1.6:
    https://stardewmodding.wiki.gg/wiki/Tutorial:_Making_a_Custom_NPC

  2. Custom NPCs received many improvements with 1.6. For changes made, see the migration guide:
    https://stardewvalleywiki.com/Modding:Migrate_to_Stardew_Valley_1.6#Custom_NPCs

  3. Some information on the NPC wiki page is still relevant:
    https://stardewvalleywiki.com/Modding:NPC_data
    Just make sure you're checking the migration page and tutorial first as this page still has outdated information on it as well.

  4. Aviroen has put together a template that will allow you to easily create a romanceable NPC:
    https://stardewmodding.wiki.gg/wiki/Npc_template

uncut viper
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.

hollow nest
#

ohhhh omg thank u!

brittle ledge
#

(I couldn't remember if it was just !NPC or like !npcmodding SDVkrobusgiggle )

tiny zealot
#

tee hee

uncut viper
#

(i just saw ichor typing and figured i had a 50/50 chance that it was either gonna be the startmodding command or the npc command. i guessed correctly SDVpuffersquee)

brittle ledge
#

A programming background will definitely benefit even with CP (which is just JSON formatting) cause you'll take to the harder stuff like queries and dynamic tokens easier

hollow nest
#

awesome!!

#

i have 2 yrs of comp science experience + currently in college for cybersecurity so hopefully it pays off ๐Ÿคž

#

using my 3 years of knowledge so far for stardew mods is the best lol

tiny zealot
#

it will definitely help. you will be able to understand instructions like "add an item to this array" without just blindly guessing the syntax

hollow nest
#

tysm!!!!

brittle ledge
#

I mean my 2 years of compsci went to webpage making, Stardew mods, and Excel spreadsheets so SDVkrobusgiggle

old edge
#

I started modding but knowing absolutely nothing about programming or modding in general. I mainly have a background in illustration. Though I started tinkering with Linux and studying python and at the same time getting into stardew valley. Now I create my mods on my linux machine only.

rancid temple
#

Didn't someone use python to actually mod here though? lol

velvet narwhal
#

pytk is lua, so i mean

wanton pebble
patent atlas
uncut viper
#

someone was working on a pytocp converter I think but I don't know if it was finished

old edge
#

I was using python to automate some portions of mod making at a certain point. but for content patcher code

brittle ledge
#

That was pillow too, I think SDVpuffersquee

uncut viper
#

(it was aloe)

rancid temple
#

Ah aloe, I don't hear from Pillow much, so I was certain it was someone else

calm nebula
#

Technically I've taking at least one coding class eh

velvet narwhal
hollow nest
rancid temple
#

Ya'll making me second guess wanting to go to college

next plaza
#

grumpy voice Back in my day, we didn't have a non-programming option for making mods. It was C# or nothing!

#

(Let's ignore XNB mods, shall we?)

rancid temple
#

(Happily)

hollow nest
lucid iron
#

Enroll in SDV108 at ur local colleg today

hollow nest
#

there should be an sdv class at every college

next plaza
#

I was programming for 7 years when I started modding the game 8 years ago

velvet narwhal
hollow nest
#

yeeeeeep

lucid iron
#

Modding amrite

#

I wonder if I should make a tool just for ppl to open menu with

rancid temple
#

I assumed it was the classes specifically designed to be hard just to make people quit

lucid iron
#

Instead of key bind

hollow nest
#

comp sci college is a fun loop of hard topic going too fast > โ€œwhy do you not understand? itโ€™s gonna get harderโ€ > harder topic going too fast

lucid iron
#

Alternatively I figure out how to put a button in gmcm blobcatgooglyblep

rancid temple
#

Hack GMCM SDVkrobusnaughty

lucid iron
#

To open unrelated menu rather than page

velvet narwhal
#

i think i'll have an easier time doing that karaoke minigame now, i'm quite literally fed up with this assignment

rancid temple
#

Become another casualty of the inevitable GMCM update

calm nebula
#

Technically I've taking at least one coding class eh

calm nebula
#

My understanding is that these are rarer now

rancid temple
#

Thats the phrase I was looking for

#

Hm, they were still a thing a few years ago when my brother was going through, I guess that was about 5 years now though

brittle pasture
next plaza
#

Discrete math was fun!

calm nebula
#

I can't really speak for the normal college experience

tiny zealot
patent atlas
#

Thankfully my specific professor was like a father to the class

tiny zealot
#

both of these things can be true. i loved discrete 1 and also the attrition rate was huge

patent atlas
#

And happened to also be in bjj so we became grappling buddies

rancid temple
patent atlas
#

But he purposefuly went lighter on the harder part od the discipline

tiny zealot
#

we lost about 20% of the class by the early drop deadline, and another 30% or so by withdrawal time

#

maybe more. it was brutal

velvet narwhal
patent atlas
#

Decrypting messages by hand

uncut viper
#

so someone's gonna make a mod to teach discrete math via stardew, right. to make learning fun or whatever

rancid temple
calm nebula
#

I didn't mean to

velvet narwhal
#

i'd much rather make a GUI in stardew for a matrix than do this class

hallow prism
#

where can i find the item fields thing when you can see the minstack quality and such?

old edge
#

I definitely think C# makes more sense to me now just by learning this modding

patent atlas
patent atlas
#

Just make a videoplayer and play an actual lecture

rancid temple
#

I think Dr. Elizabeth MathPerson was interested in a university mod for SDV lol

velvet narwhal
#

there's already a videoplayer mod iirc

lucid iron
#

frog fractions with sebastian

hallow prism
#

thanks, i had objects AND gsq and what i needed was the overlap of them obviously

tiny zealot
#

i still have my discrete math textbook, although i only saved it for the single paragraph in it that explained quicksort. (in a previous CS class, a not-so-effective teacher spent a whole week trying to teach us quicksort and i think we all left more confused than we came in)

rancid temple
#

I think you mean, monitor riser /j

velvet narwhal
#

the desk stabilizer /j

tiny zealot
#

then in this book it was like "here's how it works, done" and my face was SDVpuffereyes

#

(it had also been a few years since the debacle, so)

rancid temple
#

Sometimes I think it's amazing we have any competent people anywhere with how many bad teachers we have

calm nebula
#

Hey

velvet narwhal
#

yeah they quite literally got a guy off the street for my husband's ODE class SDVpufferclueless

calm nebula
#

I've always had great professors

#

Or at least half decent ones

#

The worst just read off his paragraph long slides tbh

uncut viper
#

(though, the uni talk is probably off topic at this point)

rancid temple
#

Only at this point? :P

uncut viper
#

hey I tried to salvage it with the Stardew discrete math joke

velvet narwhal
#

yeah-- now i interrupt this scheduled programming to go, "what the hell do i do with modentry" i am lost in the wiki sauce

uncut viper
#

modentry just has your entry function and whatever else you want in it

#

doesn't even need to be called modentry it just needs to extend mod

#

(and obv have the entry function)

lucid iron
#

AviorenVeryAwesomeMod : Mod

velvet narwhal
#

IAmSuffering : Mod

next plaza
#

I call mine Mod

#

Mod : StardewModdingAPI.Mod

lucid iron
#

no I indicates interface

velvet narwhal
#

f

rancid temple
#

HelloIAmSuffering : Mod

next plaza
#

To the one who reacted with SDVPufferpain - how often do you really need SMAPI's Mod class instead of your own?

lucid iron
#

i like the IHaveModData interface from the game

next plaza
#

Yeah, that's a fun name, I've done similar stuff before

rancid temple
#

Only the once I suppose, fair enough

#

I still haven't moved away from naming mine ModEntry, feels right

next plaza
#

I feel like it doesn't make sense with how I organize my mods to call it ModEntry

#

Since I do more than just set up - a lot of the mod lives there too

uncut viper
#

mine just gets renamed to the mod name

next plaza
#

(Don't look at what I did for S&S though, it's dumb)

#

So poorly organized

rancid temple
#

Lol, I have way too many mods where I'm doing everything in ModEntry SDVpufferpain

lucid iron
#

me too, i should really name it something else

#

and do new class for encapsulation or whatever

velvet narwhal
#

inb4 modding will help me understand this damn encapsulation and inheritance lecture because my brain is smooth

next plaza
#

I mean, you could do what some people do and do multiple files, but all of them are partial class ModEntry

tiny zealot
#

sufficiently small mods i just put in the one class/file. i have moved away from calling them ModEntry though

uncut viper
#

i turn everything into a new class for my two main mods cause then I can use reflection to iterate over every class to do things automagically for me

lucid iron
#

that seems like chaotic evil yggy

next plaza
#

I've been meaning to make myself an abstract base class for my mod to do magical things

tiny zealot
#

it's not chaotic evil until you're using reflection to iterate over your harmony patches

next plaza
#

Like being able to subscribe to events like from MC Forge rather than the C# way

next plaza
next plaza
#

Use the old pointer math overriding method of patching

tiny zealot
next plaza
#

I think that's mostly legacy from the days of separate assembly names for Windows and Mac/Linux

uncut viper
#

i read that same advice and said "ok but it's so much easier"

rancid temple
#

Will it not be true when Android updates?

tiny zealot
#

(my patches were also set up in a different class structure than PatchAll expects and i didn't want to reorg them)

rancid musk
#

As someone with a magical abstract base class, it's nice.

next plaza
#

I like to pretend Android modding won't exist until it actually does

uncut viper
#

is Android getting a smapi update?

#

i thought it was in a weird limbo

next plaza
#

It sorta is, there's nobody maintaining the 1.5 version right now

lucid iron
#

what does the magical abstract base class do

calm nebula
#

Magic

#

The entire mod

#

Just magically

#

No, it's a way to have code reuse

#

Look at stardew hack

lucid iron
#

oh like one of those common things Bolb

#

i think i been doing this mono repo thing entirely wrong by not having one blobcatgooglyblep

calm nebula
#

Nah

#

Do what you want lol

lucid iron
#

it is a psychology thing i feel

#

making a whole new git repo feels like higher amount of commitment and vision

velvet narwhal
#

SDVpufferyikes i contemplate throwing in the language change for the karaoke mod but i don't know if i care to have text on screen of lyrics

latent mauve
#

so, I have a general question about how spouses work as far as the outdoor areas and scheduling them to use it. Is that just a built-in behavior that happens when they are given the appropriate status for CanBeRomanced, or is there more to it?

I peeked at a few custom NPC tutorials and didn't see any mention of scheduling them to use outdoor areas, so I was curious.

rancid temple
#

I think that's just one of the hardcoded spouse specific schedules that can be chosen

#

There's actually a lot about spouses that are hardcoded as hell

velvet narwhal
#

engagement dialogue eats everything and i'm too lazy to do input separators SDVpufferclueless

#
{
    this.setUpForOutdoorPatioActivity();
    return;
}```
yeaaaaaah
rancid temple
#

Oh, Saturday only huh

#

Kinda rude they only get one day to enjoy their outside area

velvet narwhal
#

one day, can't be rainin, can't be winter, can't be krobus
can't be happy /j

tiny zealot
#

yep. hardcoded. paturday saturday

calm nebula
#

Poor krobus

shadow vortex
#

I was considering working on a mod to make spouses interact with the farm more, but spouse behavior on the farm is a hard-coded mess.

velvet narwhal
#

button has the machine activator and i was contemplating it SDVpufferthinkblob

#

1 keg, randomly, just to put everything off sync

rancid temple
#

I wouldn't want them to wander around

#

I don't need my fucking chests scooted about willy nilly

velvet narwhal
#

it's bad enough some of them plaster wallpaper/flooring

rancid temple
#

"You have bad taste, here's a random choice from this list that I think is better"

#

Or a hard set choice I guess, I can't remember

velvet narwhal
#

you can set a list

rancid temple
#

Or a random chair, blocking the path of travel through the house

#

Because why not

velvet narwhal
#

i think the only less annoying feature i'd do is making tappers ready at random

#

i have a feeling people would get mad if i did only like, a handful of kegs/casks just because they kept their spouse happy

calm nebula
#

Day 1 of thr season

#

More immersion

#

Always more immersion

uncut viper
#

reskin a junimo to use the spouse sprite

calm nebula
#

drowns in immersion

rancid temple
#

Would be great to have them run around if they didn't collide or if the pathing system was redone to actually fully avoid running into things

#

If I play with another person and they walk in straight lines everywhere, using their tools to knock my chests out of the way, I'm going to prison the next day

calm nebula
#

Bathing system lol

#

God I'm so tired

rancid temple
#

sleeep

#

I don't remember setting these, and some of my mods don't have it, some of them are opposite values

rancid temple
brittle pasture
#

make it just their head sprite but with tiny arms and legs attached

lucid iron
uncut viper
#

can i report chu for making people look at me weird for suddenly laughing at that

heady relic
#

Alright. Now I just need to extract mustard from the mess of all the other random crap I've added so I can upload it as an actual mod

#

Which I'm now realizing means I'm going to need to test everything again

heady relic
#

Thank you everyone that helped! Couldn't possibly have done this without you!

hallow prism
#

sometimes i wish i would eat more mustard, i love flavored mustard but it's so sad to never finish a jar

heady relic
#

Honestly I mostly use it to season burgers before I cook them. Sometimes steak too.

hallow prism
#

i use them mostly in hot dog, which i don't do that often

#

anyway, you made a crop AND it has french reference, so, good work

heady relic
#

I think it might need some balance changes, but I'm pretty proud of it for now. Specifically, requiring a whole bottle of wine for a single jar of mustard seems excessive.

hallow prism
#

switching for vinegar?

#

but it's not the same balance of course

heady relic
#

I'm not gonna lie, I totally forgot vinegar was even in the game.

hallow prism
#

ok! i wasn't sure if it was that or wanting something the player can produce (lot of people don't know you can make vinegar with rice now)

heady relic
#

I just saw that Dijon is often made with wine and jumped on that. My biggest issue with the whole bottle of wine is that with the same amount of crop space, you can produce way more mustard seed than wine.

#

Even buying vinegar for 200 though, you're still making solid returns.

#

Something for 1.1 I guess.

#

Could probably just add a second Preserve Jar recipe that uses vinegar instead for a cheaper mustard type.

hallow prism
#

you should possibly be able to require one wine and several seeds

#

and give several jars

#

and that sounds fair too

heady relic
#

Ultimately the simplest solution is to reduce the number of seeds that drop per crop

#

Not gonna lie, making stardew mods is not what I thought I would be doing with a premium Jetbrains subscription

hallow prism
#

you'll have time to consider your option anyway

velvet narwhal
#

(devilled eggs??)

heady relic
#

added to the notpad of future ideas

#

Thinking 3 eggs, 1 mayo, 1 mustard makes 6 deviled eggs.

#

maybe vinegar too. Include another use for that.

silver snow
#

alright, finished up the readme in stuff for my lil project. i also like this thing i added

#

and tbh im liking it more as an external utility, strictly a me thing but having a CLI feels nicer than wiki-ing everything

heady relic
drowsy pewter
shadow vortex
#

Mmmm deviled eggs

heady relic
#

Now the real question is what the stats should be for it

patent lanceBOT
#

@next plaza: do this (24h ago)

next plaza
#

Remind me in 24 hours to look into marriage schedules with my 0 schedule fix

patent lanceBOT
#

You're a meanie...but okay, kittycatcasey (#6238409) (24h | <t:1726270536>)

plucky reef
#

I am getting confused at the custom object stuff in spacecore... for making a custom weapon type like chu/e was saying to try, do I make it an object so I can use UseForTriggerAction, or do I make it a weapon using weapon data?
Right now both are in C#, would I need to export them to JSON/CP and then add CustomFields?

#

Is there maybe a mod that has used this I can crib off of?

calm nebula
#

I would inheritance meleeweapon

#

If you are gonna inheritance at all

lucid iron
#

the api you need is RegisterSerializerType

calm nebula
#

Hey guys

#

How are things

#

This piffle is exhausted

#

If you want a 1.5.6 example, shovel

lucid iron
#

which let you properly save your new MeleeWeapon subclass

plucky reef
#

alright

lucid iron
#

u also need to do stuff to make ur harp actually take on the subclass ofc

#

not sure where is best place for this bolbthinking

calm nebula
#

In n Out

#

Clearly. Best place for everything

frail plank
#

Anyone know where to find the list of possible sounds?

frail plank
#

Thank you!

teal bridge
#

tfw you not only can't remember why you wrote that code, but can't even figure it out after an hour of staring and stepping.

#

Past me was far too clever for present me. Or present me is too daft for past me. One of the two. I hate that guy.

next plaza
#

Me trying to remember why I have two different simplify functions in my content engine stuff that're almost identical

rancid temple
#

Guessing one's not an overload

plucky reef
# calm nebula I would inheritance meleeweapon

The current iteration does, and then I got the bright idea to make it not swing anymore but do a quasi equivalent, and the special action is getting overwritten as well, so the only thing left of it is that it isn't held over your head, and the special attack cooldown that does nothing.

teal bridge
#

The thing is, the entire code is maybe 30 lines, and I had the foresight to write a 20 line comment explaining it to future me. And it still MAKES NO SENSE FFFEHJWRHJN

#

Don't drink and code, kids.

rancid temple
#

I don't think I could stand to read my own 20 line comment, that sounds like something I should have made a fully formatted documentation page for lol

teal bridge
#

Well it was supposed to be an implementation detail... I don't normally write full documentation pages for my own self.

lucid iron
#

if it runs then just ship it

#

what could go wrong bolbsunglasses

sudden pilot
#

did I mess this up somehow? Everything except for the beach sprites work.

rancid temple
teal bridge
#

I think what's happening here is that the fundamental assumption was just wrong, so very wrong. Like reading a physics proof that starts with "Step 1: Assume the speed of light is 38 feet per second." In what freaking universe?

uncut viper
sudden pilot
#

OHHHH

#

THANK YOU

calm nebula
tiny zealot
calm nebula
#

Doing something at work today where my coworker was giving me measurements in um and vendor was giving me measurements in inches

#

Inches

#

I'm a fucking engineer why am I dealing with inches

shadow vortex
#

Ooh fun

plucky reef
#

Ok looking at the shovel this is making sense, was in the general range of what I was getting towards. Lots more reading of base game stuff to do to put in my desired changes but it'll look way cleaner at the end.

#

My modentry was getting very sloppy.

silver snow
#

im confused -- is carp supposed to have the season_winter context tag twice? I thought these corresponded to seasons they can be caught in

rancid temple
#

Got any mods that are patching fish?

uncut viper
#

thats from the unpacked folder, carp just has that

silver snow
#

I made that ran stardewxnbhack before installing mods

#

and even then, no

teal bridge
#

Pretty sure we got the "life-terminating, multi-billion dollar disasters" lesson in like, week 1 of year 1 of engineering school, if my foggy old memory is correct.

silver snow
#

so close yet so far

uncut viper
#

what do you mean? why does having it twice prevent that?

silver snow
#

it also doesnt have season_summer

#

er

#

yea

#

I want to get the seasons a fish is catchable, I have a method for doing that but its kind of a minor refactor to use, so i figured i may as well just nab contexttags

uncut viper
#

i think the actual spawn conditions are handled in the location data anyway but i doint look at fish stuff too much

teal bridge
#

Yeah, you have to look at location data not fish data, I think the context tags are used more for quests, like when Willy wants you to catch a particular fish.

silver snow
#

yeah, just going to have to go loc by loc and get whether the fish name is a key in the composition with how i do things

uncut viper
#

it is an odd bug that it has a duplicate winter instead of a summer though still

silver snow
#

not too much of an issue and probably the inevitable thing anywho but like. idk. path of least resistance

#

yeah

teal bridge
#

Then again, maybe one of the season_winters was really supposed to be season_summer and no one's ever noticed it til now.

silver snow
#

if im the first one to notice this im honored, but surely not? SDVpufferfish it would have been in here for a while

#

in any case, ill just stick to adding a little blurb for the fish with catchable/freq per location it appears in

fiery cobalt
#

I did this and can still make the juices?

drowsy pewter
#

are you sure you dont have other mods interfering--and are you also sure this code is being loaded/included

#

and 2) ancient fiber isnt from us

brittle pasture
#

yeah I just tested in game and it works?

#

run patch export Data/Machines to see whether your changes are applied correctly

drowsy pewter
#

haha i was just about to ask if you meant patch export

brittle pasture
#

You saw nothing

brittle pasture
#

/s

drowsy pewter
#

there truly are many many mods which add new rules for juice/wine/etc or fully replace the rules to make one small change

fiery cobalt
#

I think I just didn't have extra machine config (forgot to put in the folder)

brittle pasture
#

I don't think that matters in this case

fiery cobalt
#

It seems to be working!

#

Sorry to keep bug you guys

golden basin
#

I just posted additional silly content for my mod ๐ŸŽ‰

lapis creek
#

I just need to ask, because I'm a little confused in my testing. are there different conditons for weather on and off ginger island I need to be aware of? Or will when I make my fish show up with rainy weather will it automatically detect that it is on the island but isnt in the valley?

teal bridge
#

Doesn't weather query take a location param?

uncut viper
#

it does yes

teal bridge
#

It's just what you put in the param. "WEATHER Here" is the current location.

lapis creek
#

that answers the general question thank you, which I just realised is not actually my confusion

#

but rather the weather entry in the fish data specifically

teal bridge
#

I think the fish conditions are just normal GSQs.

lapis creek
#

which means its at least "fixable" if the fish data weather only takes into account the valley because I could use a condition instead.

teal bridge
#

It's not only in the valley, it's in whatever location the condition specifies.

#

"Here" is wherever you are right now.

lapis creek
#

specifically the sunny/rainy here

#

I know the seasons dont work in this bit, but the weather does.

teal bridge
#

I see, but I think the answer is still the same.

uncut viper
#

it just checks wherever "Here" happens to be

teal bridge
#

Checked what the fish spawner does and it checks location.IsRainingHere()

#

So it's equivalent to a "Here" GSQ in the fish spawn data.

lapis creek
#

thank you!

teal bridge
#

(note that those particular weather conditions are ignored with magic bait)

lapis creek
#

So I didnt do anything wrong, thats a relief. still need to figure out why the fish in particular isnt showing up tho but I can look into it myself

teal bridge
#

Did you add the fish to spawn data? To locations?

lapis creek
#

yeah

#

only idea is I might have typed the IslandSouthEast location wrong or that that doesnt point where I think it does

teal bridge
#

Not sure if this is an issue, or maybe qualified IDs aren't used in CP, but normally those fish IDs should be qualified with "(O)"

#

Weird things can happen when trying to spawn items without a qualifier.

lapis creek
#

theres qualifiers in the right locations

uncut viper
#

i dont think it can be Fall on the island

lapis creek
#

and rsv doesnt add an 9O) to the fist one which is the stylkeguide I am referencing

lapis creek
teal bridge
#

There are seasonal island fish?

uncut viper
#

i might be wrong though i might be confusing it with a season context thing

teal bridge
#

Island has no seasons at all, at least in vanilla, unless there are mods that add seasons somehow.

uncut viper
#

oh no yeah, Island has a SeasonOverride set to Summer

#

so it's always summer there

lapis creek
uncut viper
#

you want just SEASON

#

not LOCATION_SEASON

teal bridge
#

Ah, yeah, I was going to say, you could implement "seasonal" island fish by querying the season in a different location.

#

(or the entire game's "season")

uncut viper
#

LOCATION_SEASON specifically takes into account things like the island having permanent summer

lapis creek
#

just SEASON checks the valley then?

teal bridge
#

I think SEASON is attached to the save data itself, it's a global.

lapis creek
#

thanks

teal bridge
#

Like what shows on your calendar HUD.

uncut viper
#

SEASON checks the games overall season, which could be the valley or a modded location context

teal bridge
#

WorldDate

lapis creek
#

I'll use that then

uncut viper
#

(for future reference the Desert also has its own season override too, also set to summer)

lapis creek
#

I was going to ask if theres any other vanilla locations like that thanks

lucid iron
#

is it a good idea to make a local in il LilyDerp

uncut viper
#

why not

lucid iron
#

im unsure of the best way to determine the number

uncut viper
#

i dont think you need to

#

you just declare a local and pass that localbuilder as an operand to stloc_s (or stloc? one of the two. cant remember which is better. ive used both i think)

lucid iron
#

the use case is that i need index to a foreach emumeration

#

i wonder if i should bother keeping track of a local or just do a find index in the C# func that i patched in LilyDerp

uncut viper
#

what do you mean, like, you need to store an enumerator?

lucid iron
#

no there's a foreach like this

foreach (MachineOutputTriggerRule trigger2 in rule.Triggers)
{
    // call to my func patched somewhere inside
}

i need to know index of trigger2 as it loops

#

rule.Triggers is on average 1 item, maybe 2-3 if a modder was feeling lucky

#

so not huge cost to just go index for blobcatgooglyblep

uncut viper
#

you could do that. it wouldnt be hard to declare a local, but i guess its probably better not to if you dont have to in case someone else codes a transpiler that expects a local with a specific index. i dont know if declaring a new one would possibly reorder the others

lucid iron
#

i wonder how content patcher handles that

#

yea the reordering is what im worried about, which is why i was thinking of somehow determining the last local index used blobcatgooglyblep

calm nebula
#

My god

#

You're doing python loops

#

I know this scoping rule

lucid iron
#

yea wheres my enumerate(arr) i miss it

calm nebula
#

I abuse this scoping rule

#

I'm a bad person

#

I admit it

#

Anyways yeah you can declare locals

uncut viper
#

i dont know how you would determine the last local index that was used or how it would help

calm nebula
#

Button will supply an example

uncut viper
#

unless i misunderstand what you mean

#

uhh uhh

#

here

#

bad example

#

but its an example

lucid iron
#

why did you call instructionsToAdd.Add 3000 times

uncut viper
#

i know ive declared a local other times too i just remember this one (un)fondly bc its hard to forget stupidly writing an entire foreach loop with IL

#

this was like, my first transpiler

#

before i realized i didnt need to loop over every farmer in the IL and that i can just call a function to do it for me

#

this was also before i used codematcher so i was adding an array of instructions to the original instructions list

#

so instructionsToAdd is a list i created that i was adding instructions to

#

and laying it out line by line made it more readable for me

lucid iron
#

fair nuff

#

this is putting me off the idea though AnnelieStare

#

the other annoying thing about this partcular foreach is that theres 4 continues in it

lucid iron
#

ill give it a shot tho DokkanStare

uncut viper
#

its also fun to see how much you can avoid declaring a local by just making sure what you want stays on the stack and is at the top when you expect it to be

#

not as fun when theres like 500 lines of code between when the value is made and when you need it though so locals are better there

#

probably

brave fable
#

that sounds perilous lol

lucid iron
#

but is there really other way to know where you are in the list think

uncut viper
#

not in a foreach loop i think

lucid iron
#

this is not a thing the original function cares about

tiny zealot
lucid iron
#

hmm i also have to deal with people adding mods in middle of save that patches in new trigger rule think

uncut viper
brave fable
#

a good programming rule of thumb is probably not to try and make your transpilers cute

heady relic
#

All my code must be adorable, that's non-negotiable

uncut viper
#

my better rule of thumb for myself is that if coding something one way makes it more enjoyable to me (within reason. no breaking things!) then i should do it that way

#

besides, if they work, it doesnt matter if theyre also cute

calm nebula
brave fable
#

on the other hand, prettying-up a transpiler is like putting a ribbon on a forklift

#

the forklift just needs to work and also the safety of everyone else in my work environment (read: other mod authors) depends on it

glad zenith
#

what is a transpiler? and what is a assembly?

calm nebula
#

A transpiler is when you do it for fun

uncut viper
#

assembly is when you do it for rollercoasters

brave fable
#

assembly is when you do it for honour

calm nebula
#

Or money

glad zenith
#

uh what?

uncut viper
#

for a more real answer: assembly code is basically writing computer instructions at the byte level. transpilers use an intermediate language code thats a little bit more abstracted out than that but not by too much

glad zenith
#

ohhh

#

i uh already know this just my brain turned off ig

#

thx for the reminder (?)

heady relic
#

In college I took an assembly course, which convinced me to only use the highest level languages I can.

brave fable
#

in uni i took two years of c++ and java, which convinced me to only use c#

#

valuable life lessons learned

heady relic
#

lol. I learned Java as a Junior in high school, where all of our tests were handwritten. I learned Java on hard mode.

glad zenith
#

compliers and transpilers

uncut viper
#

in any case i also think any forklift is better than a bool false prefix, bow or no bow

#

so as long as those still exist i will never feel bad about my transpilers

#

i will feel bad about the one bool false prefix i have instead

glad zenith
#

"omg mr. insert name writes assembly on paper1!1!1"

heady relic
#

Pretty sure I'm the youngest person at my office that uses paper for anything. Things just make more sense when you write them down sometimes. Especially if I'm pre-planning some wierd logic.

glad zenith
#

office?

brave fable
#

for a genuine answer, an office is a sort of building where idiots go to push buttons on a keyboard and push paper

glad zenith
#

ah thanks i didnt know that

#

also like how do you push paper?

heady relic
#

You write what you're supposed to on it, and you push it to the next guy for him to sign it

glad zenith
#

tysm!! you guys are so helpful SDVpufferwow

uncut viper
#
"{{ModId}}_AlwaysPettableAnimals": {
  "Id": "{{ModId}}_AlwaysPettableAnimals",
  "Target": {
    "Type": "StardewValley.GameLocation",
    "Method": "CheckPetAnimal",
    "Parameters": [ "Microsoft.Xna.Framework.Vector2", "Farmer" ],
    "IsGetter": false, // Optional, only needed if it's a property getter
    "IsSetter": false, // Optional, only needed if it's a property setter
    "Assembly": "Stardew Valley" // Optional, defaults to "Stardew Valley"
  },
  "PatchType": "Postfix",
  "Condition": "SEASON winter", // Optional
  "ChangeResult": { // ChangeResult is entirely optional
    "Operation": "Assign",
    "Value": "true"
  },
  "Action": "spacechase0.SpaceCore_PlaySound crystal local", // Optional
  "Actions": [ "spacechase0.SpaceCore_PlaySound breakingGlass local" ], // Optional
}

not to interrupt the office talk but this isnt too bad of a model, right... obviously ignoring the fact that "a CP only mod maker probably isnt gonna know what method to target or what the types of things are" because thats irrelevant. if i cared about that this feature wouldnt exist. i dunno if i should keep the IsSetter/IsGetter fields or combine them into one field somehow (i separated them bc i figured it made it more clear what you wanted)

glad zenith
brave fable
#

what if you want to patch a constructor SDVpufferthinkblob

uncut viper
#

ngl i did not think of those at all

nocturne field
#

Quick question, what looks more uhm, normal here. This (let's call it 18,) or this other one, (we'll dub it 19, i gotta take a screenshot of 19 just gimme a second)

glad zenith
#

18

brave fable
#

why does he sit on the chair arms like a cat SDVpufferfush

calm nebula
#

Normal goth behavior

glad zenith
#

seriously though 19

nocturne field
#

Yeah, i'm gonna go with 19.

#

Now i just gotta ask the dev of this mod if i'm allowed to upload this...

#

off to the nexus

glad zenith
#

im a total idiot so i though the difference between the images was the brightness

gilded comet
#

... you should ask permission for a mod before making it

nocturne field
#

i'll delete this if so

#

wasn't my intention

brave fable
#

the police have already been notified SDVpufferpensive

gilded comet
#

oh no you're fine? i'm not sure what this is based off of etc.

nocturne field
#

regardless, i'm not planning to upload this until i get approval

#

and if i don't i will NOT upload it

brave fable
#

you can do whatever you like for personal use, it really is just uploading and sharing you need permission for

gilded comet
#

there's just been issues recently with like, people basically reuploading assets without permission

nocturne field
#

Really? damn.

gilded comet
#

you're alright!! good on you for asking first :)

nocturne field
#

NP, thank you.

vernal crest
#

I'm orange!

uncut viper
#

rip blue name

#

(grats tho!)

vernal crest
#

Sorry Button