#making-mods-general

1 messages · Page 542 of 1

uncut viper
#

What do you mean by "the default"? You're not extending springobjects you mean, right?

brave fable
#

is now 🎋💒🪑🎐🏮🔥🍡 mod

torpid sparrow
#

which is fine it works

uncut viper
#

Ah, okay. Well, maybe don't quite go to a billion, as there is still a de facto upper limit SDVpuffersquee

torpid sparrow
#

i must.....

hard fern
torpid sparrow
#

mm dango is delicious

#

mitarashi yumy

uncut viper
#

You can go higher than the de facto limit if you're fine with your mod breaking depending on the person's GPU SDVpuffersmile

torpid sparrow
#

player beware

uncut viper
#

Mod requirements: RTX 5090

gaunt orbit
#

All modern gpus support more or less arbitrary texture sizes

#

The size limitations only apply to really ancient architectures

#

(memory limits aside)

uncut viper
#

I mean I've had issues myself with very large textures, and others have reported getting bug reports as well

gaunt orbit
#

Really? That's odd. Maybe it's an opengl driver thing

uncut viper
#

We're talking like upwards of 10k pixels or more in one direction though

brave fable
#

but what were the issues

uncut viper
#

But that's very easy to reach with hd portraits

#

For me, the texture just straight up didn't load

gaunt orbit
#

Wild

brave fable
#

wild

uncut viper
#

Thornberry?

slow basin
#

does anyone know offhand a mod that uses unique pet sounds, i dont quite know what im doing and would like to look at an example wormnod1

gaunt orbit
#

And you're sure it's not just running out of vram

uncut viper
#

Yep

#

I've got plenty of that

#

Can't speak for anyone else with issues

#

Android is something to be worried about too

brave fable
#

i do not worry about android

half tangle
#

I think the how to train your dragon pet mod has new sounds... Cannot remember that dragon's name rn (edit: randomly remembered it's Toothless)

gaunt orbit
#

Ah, apparently it is something to do with the monogame graphics pipeline. Internet says the limit is 4096

slow basin
uncut viper
#

The safe limit is 4096 yeah. The game defines that somewhere itself too but doesn't use it

lucid iron
#

hmm if its a npc sprite and its ur npc

#

can u go wider than the default 64

#

then u get to use 32768 frames in 4096x4096 which is surely enough

slow basin
#

I think i forgor to load the audio

urban patrol
#

i want to request a tile property that lets you define what its night/day tile partner is but before i do is that something that’s even possible

urban patrol
#

actually perhaps that’s a request for iro

urban patrol
lucid iron
#

as in, spacecore time changed trigger on host -> time is later than night -> apply the night tile override(s)

#

it'd be better than EditMap OnTimeChange i think

torpid sparrow
#

I like that my throwaway line prompted a discussion about sheet sizes SDVkrobusgiggle

lucid iron
#

u can also make it location changed + time is later than night cond

uncut viper
urban patrol
#

basically i just want a way to reduce repetitive work if i have 3577525 windows in a map

#

but i don’t necessarily need a nuclear bomb for it

lucid iron
#

maybe time to make simple C# console command for urself bolbsun

#

to just format the nighttile map prop based on the tile indexes

urban patrol
#

remind me in 1 month to make a day night tile program or beg iro for it in tilesheetinator if it’s too hard

patent lanceBOT
#

i've waited my whole LIFE for you to ask, handwrittenhello. so yes, the answer is yes I'll remind you!! (#7080650) (1mo | <t:1774222788>)

lucid iron
#

tho hm i wonder why i used coords instead of just Array yggy

#

maybe bc i wanted the x,y?

brave fable
#

i remember there being some gotcha about iterating a multidimensional array

lucid iron
#

ill trust chu circa 2025 april to know what's goin on

elfin parrot
#

Hi! Does anyone know how to get around this error within a harmony patch? Game1.multiplayer is protected internal static

lucid iron
#

use Game1.Multiplayer

#

more generally if u need to get past access modifiers, use reflection

brave fable
#

(you can get by with reflection for harmony patches using AccessTools from HarmonyLib, or for general-purpose naughtiness with ModEntry.Helper.Reflection)

elfin parrot
#

Thank you!! Still learning a lot

uncut viper
brave fable
#

(a very specific kind of naughtiness)

uncut viper
#

Reflecting into SMAPI itself is the most common reflection I do outside of Harmony patches

slow basin
#

im looking through strings but does anyone know what the json for pets r so i can look at the cat bahviors?

#

like the name

scenic ferry
#

its just pets.json if you're talking about unpacked

slow basin
#

aah ok thanks!!

scenic ferry
#

Question !! am i doing this condition thing wrong? they're purchase able even though vael is not infact at 2 hearts

Everything else seems to be working though so thats a huge plus!

slow basin
#

i never knew pets were so complicated i really phoned it in in comparison to my pillbug pet

scenic ferry
#

i feel you man

slow basin
#

GAH i still did it wrong sobs uncontrollably

#

oh well back to the drawing board

scenic ferry
#

my json for one single pet is longer than like any other json ive got I think

#

whats goin wrong ? 👀

slow basin
#

im trying to add my ferret as a pet similar to how the toothless pet was added so that i can do custom sounds but now i can't get the icon to show up or get custom sounds to work

#

once i get one added i can easily do the other 2 color variants though

scenic ferry
#

I can maybe help with the icon! I havent dabbled in custom sounds yet though

slow basin
#

lemme tru launchng again so i can get the exact error

#

ok now i can probably sparse a error log one sec

ocean sailBOT
#

Log Info: SMAPI 4.5.1 with SDV 1.6.15 build 24356 on Windows 11 (10.0.26200.0), with 3 C# mods and 1 content packs.
Suggested fixes: One or more mods are out of date, consider updating them

slow basin
#

and i can provide the files as well

#

if anyone needs to help me further using them wormnod1

#

im 1:1 using the cat behavior rn because my heard hurt and i also did all the animations in the expectation that it would be used similarly to the cats

scenic ferry
#

To get your Icon to load you need two parts:

  • Something to load the png
    (Mine is:
    -# "LogName": "Load Spirithound Icon",
    -# "Action": "Load",
    -# "Target": "Mods/{{ModId}}/assets/familiars/SpiritHound_1_Icon",
    -# "FromFile": "assets/familiars/SpiritHound_1_Icon.png"
    Because Im a noob and dont know how {{targetwithoutpath}} works )

And

  • texture section that tells the game where your icon is on your spritesheet
    (Mine is:
    -# "IconTexture": "Mods/{{ModId}}/assets/familiars/SpiritHound_1_Icon",
    -# "IconSourceRect": {
    -# "X": 0,
    -# "Y": 0,
    -# "Width": 16,
    -# "Height": 16
    -# },
    Because i have it on its own png, in the first 16x16 tile)
#

The "IconTexture": section is kept in the "breeds" areas, so you need an icon for each breed - but in the vanilla json, its named something like "Loosesprites//cursors" because its just one icon in a massive spritesheet instead of its own png

slow basin
#

OOOHHH thats what that was ferretfacepalm

#

i think i forgot to reput it in when i deleted the breeds section

scenic ferry
#

That makes sense, took me a hot minute to figure out what it was talking about too lol

slow basin
#

which i did because i didnt wanna fuss with it because i was like "eh ill add in breeds later"

#

lemme correct that and relaunch take each issue one step at a tiem :3

scenic ferry
#

you got this 💪

slow basin
#

it worked yippee!!

#

let me make sure it loads in nicely and then ill crack at the custom sounds again

#

marnie is not showing up with my ferret 😭 but no error on that lol

#

maybe i forgot something imma check

near island
#

Anyone else entering the modding contest and are more worried about making the mod page/screenshots than they are the actual mod? 😭

vale stream
#

It doesn't, when I buy the recipe it doesn't even appear in my inventory SDVpufferchicksweatsip :

#

The data exists, both for the original recipe and the spacecore one, so that's a bit confusing

slow basin
#

man

#

do i need a unique adoption event id for marnie to show up?

mortal blade
uncut viper
#

I think reflection is perfectly fine and has its usecases (I mean obviously, else it wouldn't exist, but yknow what I mean) but nowadays I don't actually even reflect I just toss everything into a publicizer.

mortal blade
#

Usually, if you have a decent use-case, and gently mention it within Pathoschild's hearing... an API magically appears in the next SMAPI. SDVkrobusgiggle

slow basin
#

soo close to fixing my issue with my mod i can feel it in ma bonez

#

after i fix my issues with it with one animal im going to edit the icon for it and then add in the color variations (yippee)

elfin parrot
#

another dumb question.. can my mod that is not a content pack still use content patcher to add custom object entries/textures?

I'm getting The mod's manifest.json is invalid: manifest sets both EntryDll and ContentPackFor, which are mutually exclusive. If I remove ContentPackFor, will it still work? I'm not seeing any of my object being loaded, so I can't tell.

uncut viper
#

No. You must make a separate mod that is a content patcher content pack

mortal blade
#

What's the difference between Data/Shirts and Data/Farmer/Shirts ??

uncut viper
#

You can package them both in the same overall parent folder when you publish it, but from SMAPI's perspective, they must be two different mods

elfin parrot
uncut viper
#

If you have a C# portion, the mod package builder whatever thingy can also include your CP portion in automatically for you when you build it

mortal blade
uncut viper
#

I do not remember how to do this though so you'll need to look at the nuget page for it

#

Or somewhere in the smapi docs

slow basin
#

when doing the adoption event id do i need to make an events.json for that or am i just confusing myself further

scenic ferry
#

If you're just trying to get your pet purchaseable from marnie you dont need an event

uncut viper
#

I'm not sure I understand the question. What do you mean "doing the adoption event id"?

mortal blade
#

I knew that name was familiar! Polyamory Sweet mod author! ❤️

scenic ferry
calm nebula
#

<ContentPacks Include="content-packs/[CP] More Fertilizers" Version="$(Version)" />

slow basin
#

i want them to be choosable from the start but marnie won't show up so in assume i need to make an adoptioneventID but idk if i need to make an event.json basically

uncut viper
#

You won't be able to have them chooseable from the start with Content Patcher alone

slow basin
#

ooohhh

uncut viper
#

Unless it's specifically a new breed of cat or dog and not a new animal

slow basin
#

OOOHHH

#

ok im crazy

uncut viper
#

(And even then I can't actually confirm or deny that the list of choices at character creation is hardcoded or not)

slow basin
#

👍

#

i see i was doing it wrong from the start

#

ty!!

scenic ferry
slow basin
#

hm

#

do u think people will mind terribly if they cant choose a pet from the start and have to buy from marnie?

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.

uncut viper
slow basin
#

is there a way to cheat pets/animals to full hearts

#

so i can test my mod without sleeping a thousand years

lucid iron
#
"{{ModId}}_VaelShop": {
          "ShopID": "{{ModId}}_VaelShop",
          "PetShopId": "{{ModId}}_VaelShop"
}
scenic ferry
#

im going to be so for real i dont know if I did the whole livestock bazaar thing right at all I sort of zoned out and just kept writing halfway through

uncut viper
#

debug befriendpets

lucid iron
#

you need to use different Data/Shops keys

slow basin
#

thanks button!

scenic ferry
#

ahhhh that makes sense

slow basin
#

ill be so releived when i can get this to work properly LMAO

scenic ferry
#

They can still be triggered by the same tile though?

lucid iron
#

that said livestock bazaar doesn't have feature to restrict the shop's presence because it just uses vanilla logic here

slow basin
#

people in ferret discord r counting on me /hj

lucid iron
#

which is "get pet 1 to max heart, or be in year 2"

#

ill add it in the future but for now u can do something like

{
    "Id": "PetAdoption",
    "ItemId": "mushymato.LivestockBazaar_PET_ADOPTION {{ModId}}_SpiritHound T false true",
    "Condition": "Some GSQ here"
}
#

PLAYER_FRIENDSHIP_POINTS Current [vael internal id] 750 for example

scenic ferry
lucid iron
#

yea

scenic ferry
#

ah man

lucid iron
#

the value is the key so u need 2 shops Bolb

scenic ferry
#

makes sense
At least most the data I can copy paste, other than the items sold

lucid iron
#

its like how marnie has PetAdoption and AnimalShop

scenic ferry
#

in my head I guess I always assumed they counted as the same "shop" lol

#

just different, idk, catalogues?

lucid iron
#

well it is what it is in the data PecoWant

scenic ferry
#

yeah all good haha
Tysm for the explanation!

#

All works now! WOOOO!

#

This is the scary part though

The next part of my Familiars mod is that I want to rework them to be able to follow the player, hunt enemies, fish... all that "gameplay" stuff
I'm contemplating if I should even make it or if I should just be like "Go download Pets Enhanced it already exists"
Plus thats probably a lot of C# that I have no idea how to do

urban patrol
#

most if not all of this is doable with trinket tinker

scenic ferry
#

Trinket Tinker looks awesome, but not being able to have them walk around the farm or exist without being equiped was sort of a drawback, not being able to name them, or raise friendship either

urban patrol
#

can you fake it by manually equipping the trinket on leaving the farm and unequipping it on coming home

slow basin
#

everytime i try to use debug befriend pets concernedape says nice try so ig i gotta sleep everyday for 5ever instead 😔

calm nebula
#

(Type it into the console)

scenic ferry
calm nebula
#

Or that

slow basin
#

OOOHH

scenic ferry
#

thats not a bad idea im down for that

urban patrol
#

that's how i make an NPC follow you but only in a dungeon

scenic ferry
#

Do you know if I can make it usable before the mastery cave trinket slot unlock?

urban patrol
#

he exists outside of that still

#

you can equip it manually however you choose

#

it's just an Action

scenic ferry
#

ah right! I remember reading that now

urban patrol
#

i would do a trigger action with OnLocationChange, condition location here is not farm

#

or location target is not farm, i forget which

slow basin
#

hm ok i made my pet love me but now how do i get marnie to let me buy a new pet XD tie to google

scenic ferry
#

Once your pet loves you the option opens up in her shop!

slow basin
#

it did not

#

i even built a pet bowl

#

hm

#

nvm had to check mail\

scenic ferry
urban patrol
scenic ferry
#

ah fair ! Still enough to help convince me though haha

urban patrol
#

lol but yeah i don't mind but it's very likely my answer will be "idk" or "the docs say"

slow basin
#

i have met a new issue called "its looking for an xnb file for some reason"

#

=_=

tiny zealot
#

that probably just means an asset the mod called for wasn't loaded

slow basin
#

ooohhh ok

#

i think i found it!

#

fixed it :3

#

ok now i just gotta get those soundz workin yippee

#

=_=

elfin parrot
#

Can I use Game1.content.Load to load custom textures added through the SMAPI content api?

lucid mulch
#

yes

#

Game1.content.Load<> would load anything that ContentPatcher for example can touch

slow basin
#

BAH

#

im taking a break

#

ive been doing this all day

sleek flint
#

Is it possible to have multiple items sent in a single letter?

urban patrol
#

can i use a gender switch block in an edit to StringsFromMaps?

tiny zealot
#

depends on context when used rather than which asset it's in

urban patrol
#

context is i'm overwriting an Action Message tile data added by SVE

tiny zealot
#

i'd have to try it and see. i know message doesn't support all the same stuff as a full dialoguebox but it's the same class

urban patrol
#

hmm okay i'll toss it in there and report back when i test SVE stuff eventually

#

begone, robert and alice. idek who you are but this is my grave now

calm nebula
#

The ${}$?

#

Those should be pretty universal

old edge
#

Where do we go to see the teams for the mod contest?

calm nebula
lucid iron
#

after i do a Game1.changeMusicTrack how do i return to whatever default musiks is?

#

GameLocation.HandleMusicChange(null, location); perhaps bolbwut

uncut viper
#

Do events that change the music automatically restart the pre-event music when they end? If so you can try looking at what events do

lucid iron
#

ah i need Game1.stopMusicTrack(MusicContext.MiniGame);

uncut viper
#

Oh you shoulda said you were using a different context from the getgo thats ezpz

calm nebula
#

Are event also different music context

uncut viper
#

I do not recall

#

I've only ever used Default but that's cuz I don't write events 🙂‍↕️

#

A quick check says yes Events have a different context, however Event.endBehaviours does stopMusicTrack(MusicContext.Default) so... shrugs.

lucid iron
#

btw what is this

hard fern
#

Long hand short hand the thing in the middle

sleek flint
#

Where is the background for the letters located?

round timber
#

yup community center clock

#

letters are in LooseSprites/letterBG.png

clear sedge
#

Hey I should really be on here more lol.

Those windows are 2 Width 3 Height.

The loading of the custom window isn’t handled my mod what so ever. It’s strictly Content Patcher and how I load a custom ‘Painting’ object under the registry for Data/Furniture.

The wall is a max height of 3 tiles (3x16px). I left some blank space between the top and bottom of the actual png so that it fits correctly.

lucid iron
#

then people can use all the typical content patcher nicities and only need 1 content.json

clear sedge
# lucid iron if u want u could get your custom data from content patcher too

Content Patcher doesn’t have data for what my mod handles.

You wouldn’t load the window animation via content patcher for example. You wouldn’t have the defined entry zones for particles and critters.

The dw-content.json is essentially a JSON version of an API so that you don’t need to write C# to talk to my mod

lucid iron
uncut viper
#

(Content Patcher's own schema does exactly this, too, that is how Content Patcher works)

lucid iron
#

The public stuff come from json and the internal stuff doesn't

brave fable
#

yep, it's incredibly simple. with some data model```cs
public sealed record class MyModel {
public string Egg;
public int Bacon;
}

you can load the data directly with c#```cs
var model = Game1.content.Load<MyModel>("asset key");

with some data file in a separate content patcher mod at assets/model.json```json
{
"Egg": "Not bacon",
"Bacon": 366
}

loaded from a content.json```json
"Changes": [
  {
    "Action": "Load",
    "Target": "asset key",
    "FromFile": "assets/model.json"
  }
]
clear sedge
#

Well. A firm FML.

lucid iron
#

its not too late to change

brave fable
#

good life advice

lucid iron
#

u can have both content pack for and also source stuff from content

#

ideally u just take the content pack for bits and load it into content pipeline so that the logic is same for both

uncut viper
#

Blueberry! Have you ever drawn primitives with monogame

lucid iron
#

the main thing u cant do is read the folder of a content pack, so for stuff like textures you'd require people to do their own Load and then just give u the asset name

brave fable
#

surprisingly yes, though i didn't put much thought into learning how, i just went with the simplest possible approach (draw two triangles at variable points with gradient colour)

#

since that's all i really needed

uncut viper
#

Do you have that code up somewhere that I could take a look at to see how to do it

clear sedge
brave fable
uncut viper
#

(Personally I actually find refactoring more enjoyable than initial creation... gives me the same satisfied feelings as neatly organizing a room anew)

brave fable
#

basicEffect was only used for gradient colour and otherwise the primitive is drawn with solid colour for all vertices

uncut viper
#

Oh I should've guessed it was Desert Bus

#

Do you mind if I take/heavily reference some of this

#

It's remarkably similar to what I am trying to do

brave fable
#

all the vertex coordinates are also run through some ridiculous perspective function to affect x scale depending on distance

#

for sure, consider this WTFPL licensed SDVpufferthumbsup

lucid iron
#

i look forward to Button's OceanHovercraft

uncut viper
#

What does that mean

#

Whatever the fuck pleases you?

lucid iron
brave fable
#

The name is an abbreviation of Do What The Fuck You Want To Public License.

uncut viper
#

I was close

#

I will indeed then do what the fuck i want thank you SDVpuffersmile

lucid iron
#

there r so many bus

brave fable
#

VertexPositionColor[] triangles is pretty much the crux of it

#

you might also have a time getting the primitives to actually appear, since they're positioned onscreen based on a -1 to 1 space, and might (?) only draw on one side

#

or it was invisible because two of my vertices were on the same position, i forget

#

if you build desert bus from source and attach a debugger you can see the values of the vertices before they're drawn

#

if you do, you can quickstart the desert bus game with bbdb in the smapi terminal

uncut viper
#

that's far too much work I'd rather just copy paste this all in, fix all the red, and then fuck with it a bunch with hot reload

brave fable
#

godspeed SDVpufferthumbsup

lucid iron
#

if u sell something to a store is it considered shipped

uncut viper
#

i wouldnt call that shipped

brave fable
#

i wouldnt say squid kid can be datable but we're working with sdv

lucid iron
#

yea i was ask if it counted for collection blobcatgooglyblep

uncut viper
#

oh

#

I thought you were talking about like. real life.

brave fable
uncut viper
#

seems to only count things in ShippingMenu

#

so, not sold

#

wow its beautiful

brave fable
#

i didn't put in the effort to learn any further than triangles in screenspace so you're on your own from here hahah

uncut viper
#

I find it wonderful that even with just this piece of code and reading everything in it, I don't really understand how the road stripes are being drawn

brave fable
#

yep

uncut viper
#

Luckily I just need triangles. I think

#

I just wanted to make a triangle fan circle...

#

My first attempt didn't even draw things on the screen though so this is a nice upgrade

brave fable
#

first parameter to DrawUserPrimitives lets you use fan circle iirc

uncut viper
#

It's TriangleStrip i believe

brave fable
#

the initial triangles = [...] set is the road fill, and the following loop for num is the road stripes

uncut viper
#

Despite this though your code is still better than what I was previously doing, which was needing to go to wayback machine to get some old XNA docs that I found a dead link for in a stackoverflow post

#

That didn't even really tell me how to do what I wanted to do

brave fable
#

yeah there was a fair bit of trial and error with this, i found a couple of blogs/stackoverflow questions/old xna docs with a mix of information each and sort of mashed them together

#

extremely simple when you know what to write though

uncut viper
#

Congratulations you are the docs now

brave fable
#

oh no

patent lanceBOT
lucid iron
#

what does setRichPresence do bolbsun

uncut viper
#

Discord RPC I assume

#

Or anything else that might have hooked up RPC

#

Like steam

lucid iron
#

i thought thats a mod

uncut viper
#

I don't know I'm just guessing I assume you have the function open

#

I just know what Rich Presence is

calm nebula
lucid iron
#

yea idk it seems to just set a static string and nothing else

calm nebula
#

It might be used for steam or console or smth?

uncut viper
#

I assume whatever RPC stuff steam uses, uses that string for display? Shrugs.

#

Like when you look at your friends list to see what theyre doing

#

Try prefixing it to something wild and seeing if your steam friends ask you why you're Drawing Primitives at Town

#

prefix skipping it*

calm nebula
#

dancing among the tulips

uncut viper
#

I have succeeded in making my triangles disappear again

#

Unfortunately this was not my intended metric for success

brave fable
#

this happens a lot 🙂‍↕️

urban patrol
brave fable
#

again doublecheck your vertices are actually within the screen space and if it's to do with triangle fans i don't wanna hear about it

calm nebula
#

Go triangles!

brave fable
#

since you're not working with triangle lists you probably won't be dealing with same-coordinate vertices, since you're just appending another vertex to join to the previous two iirc

#

consider positioning it on the opposite 'side' of your previous vertices as a given line

uncut viper
#

-1 to 1 for screenspace, right? Is 0 just the center

brave fable
#

i believe so yeah

#

i trust the comment on desertbus.cs:520

uncut viper
#

I'm fond of the comment that says "fill colour" directly above the line that sets the width of the triangle

brave fable
#

you should also read the comment on line 1356

uncut viper
#

Oh I do like that one

#

Gonna steal that one too since its WTFPL

brave fable
#

yeah apparently i forgot to write one for the road stripes so it's all // fill colour

#

but yes everything up to num = 12 is the fill colour since that's the road fill triangle

#

i can only imagine from here you're just making star fox

clear sedge
#

@lucid iron @brave fable thank you btw, I was too shocked at the oversight to say thanks. lol.

brave fable
#

no problem! you can of course make your model whatever you want, such as Game1.content.Load<Dictionary<string, MyModel> for some model containing other primitive or complex data types

uncut viper
#

Update: Undid a bunch of my work to get back to Desert Bus code, and now I have none triangles, all road stripes. Which I understand are triangles. But not my triangles. Maybe midnight is a bad time to be trying this and maybe modfest with a deadline is a bad time to be trying this.

#

I could get by just fine with just a white circle png I colour whatever I want when drawn but noooo I wanted to try and do ~fancy stuff~

brave fable
#

there were a few triangle appears commits in desertbus

#

if it helps at all, the lerp and perspective methods are purely for visual effect of passing-by roadstripes and a moving vanishing point on the horizon line

uncut viper
#

Those were yeeted basically immediately

brave fable
#

perfect

#

same goes for ratio. really just delete the entire for i < num loop if you haven't done so

uncut viper
#

Oh I found the issue this time. That fill colour width was load bearing 😌

#

I removed it without realizing that it meant the further down width bits were grabbing the width of my IClickableMenu

brave fable
#

that do be the length of the line

uncut viper
#

Actually it's for the triangles, which are famously not lines

brave fable
#

the line of course being left and right

uncut viper
#

There is a 75% chance I don't even bother with triangle fan and instead just manually create 6 triangles

brave fable
#

i could've used 4 instead of 6 vectors for each road stripe by using fans, but presumably would've needed a separate DrawUserPrimitives call for each

#

so it was simpler just to assemble them with duplicate vertices and draw as a triangle list

uncut viper
#

Yeah you can't combine em

#

This is a more genuine question, but if your Vector2 top for instance already seems to be quite small and within -1 to 1, what is viewToVertex doing to it when you make the triangle array

#

Or rather why is it doing it, since I can of course see what it is doing to it

bold cairn
#

When doing a Harmony postfix for a method, is there a simple way to do a check for what class is calling the method in question?

E.G. I'm looking for a simple way to double the farming XP gained from the Farmer.gainExperience method, but only when petting/milking/shearing animals or harvesting coop animal products (IE, all animal-based sources of Farming XP).

If I can somehow do a check for whether gainExperience was being called from within Crop.harvest, I could do something like check if the XP type is Farming, the amount is 5, and it's not being called from within Crop.harvest as a way to encompass all the situations I'm wanting to target.

Which seems simpler than having to make harmony patches for the various places where animal-related experience is gained, like FarmAnimal.pet & Tools.Shears.DoFunction & GameLocation.checkAction, etc.

lucid iron
#

is there a random thing to pick 5 different values yggy

brave fable
uncut viper
#

*You can get the stacktrace but like please don't resort to that

#

*It's not even 100% reliable I think

bold cairn
#

OK, thanks for the heads up!

uncut viper
#

I did actually do that for edom rorriM but it's horrendous and only suitable in joke mods

lucid iron
#

well i need to choose without putting things back in the bag

uncut viper
lucid iron
#

the dreadful alloc alas

uncut viper
#

Or generate indices and blacklist indices from future rng calls

#

Or shuffle them and take the first 5

brave fable
# uncut viper This is a more genuine question, but if your `Vector2 top` for instance already ...

so i'm drawing my vector triangles alongside pixel sprites, which are drawn at a set scale of 400% regardless of screen size.
the vector triangles are drawn at a position (and therefore also scale) relative to screen size, at whatever pixel coordinates along the -1 to 1 screen space.
in the data file there's a set 320x240 or so 'desert bus game viewport size' (this.View) for the game, as well as a 'stardew valley game viewport size' (this.Window aka view), and the idea of viewToVertex is to 1) scale the vectors to the desert bus viewport according to viewRatio, and 2) apply an extremely simplistic depth calculation from 1 to 0 because, i forgot to mention, there is an actual camera view with depth when drawing primitives and it so happens that z=1 is visible, and gradually decrementing z by fractions allows me to draw more triangles on top

#

you may or may not be able to change the position of the 'camera'. i looked at it briefly with some vector matrix transform methods in Game1.graphics.GraphicsDevice and my triangles disappeared so i quickly did not do that

#

'bad' z values can and will make your triangles disappear

#

i made no effort to graph valid ranges of z values

uncut viper
#

This is all very valuable information, thank you very much /gen

brave fable
#

there may or may not be near-far clipping for triangles relative to the camera

uncut viper
#

Don't like that

brave fable
#

iirc i also did this at pretty much midnight a year ago so it's not exactly fresh in my mind

#

*may have been 6 months ago, exaggeration for dramatic effect/legal admission

uncut viper
#

Desert Bus feels like it was only yesterday to me

brave fable
#

i don't exactly remember the reason for ... * 2f - Vector2.One in viewToVertex, i was going to say it's to transform -1~1 to 0~1 but that'd be * 0.5f + new Vector2(0.5f)

#

could just be that i'd already written some unusual values to account for that and this happened to work for the results

uncut viper
#

SpriteBatch.draw() can take a transformation matrix argument, interesting

#

Wonder if that's useful at all

brave fable
#

i dropped in a few 'matrix identity. transform. vector three one one.' words into it and it stopped working even with my hacker text so i didn't think about it any further

uncut viper
#

I actually only found that out because the game uses it, in the Intro minigame

#

To what effect though, I do not know

#

For panning it seems?

brave fable
#

oh as in for the jojaoffice scene with the computers?

uncut viper
#

Yeah that one

#

And the road

brave fable
#

ca sure was feeling brave starting the intro with a matrix transform, and then apparently very quickly decided not to think about it any further

#

was sprout valley originally a 3d game????

uncut viper
#

1.7 leak material

#

"a set of near and far planes to render the geometry within in view of the camera"
SDVpufferpensive

#

thanks monogame docs for confirming worst fears. also i love rendering within in view of things

#

I love how little these docs explain things

brave fable
#

yea so the camera has a limited range. this is the main game mechanic in this horror game

#

your z for today is 1

elfin parrot
#

Is anyone familiar with drawing TemporaryAnimatedSprite? I'm creating a "Grass Bomb" object. To place it, I'm using a prefix on Object.placementAction, if it's my item, I broadcast a new TAS mimicking the way vanilla bombs are created.

But, the issue is that my bomb TAS is never displayed. I've put a prefix within location.draw and the Texture2D is non-null and it has the correct name. Not sure what I'm doing wrong. Appreciate any tips!

lucid iron
#

Did u use the end behavior stuff

elfin parrot
#

From what I can tell, the vanilla bomb endBehavior just cleans up the fuse sprites

#

Which mine still does

lucid iron
#

Yeah having such a thing still matters since you want to have 2 phases right

#

One where bomb TAS is placed and then it blows up

elfin parrot
#

This is vanillla bomb placementAction

lucid iron
#

Bombs use a special TAS constructor that sets this stuff up you should check what's going on there

elfin parrot
#

That's the constructor I'm using, I just set my bomb radius manually

lucid iron
#

(screenshots are kinda hard to read)

elfin parrot
#

my theme is gross ill fix

#
    public TemporaryAnimatedSprite(int initialParentTileIndex, float animationInterval, int animationLength, int numberOfLoops, Vector2 position, bool flicker, bool flipped, GameLocation parent, Farmer owner)
        : this(initialParentTileIndex, animationInterval, animationLength, numberOfLoops, position, flicker, flipped)
    {
        this.position.X = (int)this.position.X;
        this.position.Y = (int)this.position.Y;
        this.parent = parent;
        switch (initialParentTileIndex)
        {
            case 286:
                bombRadius = 3;
                break;
            case 287:
                bombRadius = 5;
                break;
            case 288:
                bombRadius = 7;
                break;
        }
        this.owner = owner;
    }```
#

And this is what I'm calling in my mod, which is the same constructor

                Game1.Multiplayer.broadcastSprites(location, new TemporaryAnimatedSprite(0, 100f, 1, 24, vector * 64f, flicker: true, flipped: false, location, who)
                {
                    shakeIntensity = 0.5f,
                    shakeIntensityChange = 0.002f,
                    extraInfoForEndBehavior = num,
                    bombRadius = 2,
                    textureName = grassBombTexture,
                    texture = texture,
                    endFunction = location.removeTemporarySpritesWithID
                });```
lucid iron
#

I can tell u that Game1.Multiplayer.broadcastSprites is definitely the correct thing to use bc I used it before

#

The thing I'm less sure about is whether bombs are hardcoded for the vanilla indices beyond just the explode radius

#

Also double check the source rect it's drawing

lucid iron
#

Maybe see if there's shenanigans related to that yggy

elfin parrot
elfin parrot
lucid iron
#

Well source rect is just where on the source texture to draw

#

If you are out of bounds it might look like it's drawing nothing

lucid iron
#

Worst case just use TemporaryAnimatedSprite.GetTemporaryAnimatedSprite and set all the fields yourself

#

Game might not use it for explode but u certainly can use endFunction for whatever

elfin parrot
#

Thanks! I'll spend some time setting these fields and see what I can figure it out.

#

Appreciate the help

#

If anyone has anyone examples of them creating a TemporaryAnimatedSprite using a modded texture I'd appreciate it

#

i'll go digging through nexus and see if i can find somethin

#

oh wait

#

i got something

#

progress

#

i set sourceRect

               {
                   shakeIntensity = 0.5f,
                   shakeIntensityChange = 0.002f,
                   extraInfoForEndBehavior = num,
                   bombRadius = 2,
                   textureName = grassBombTexture,
                   texture = texture,
                   endFunction = location.removeTemporarySpritesWithID,
                   sourceRect = new Microsoft.Xna.Framework.Rectangle(0,0,64,64),
               });```
#

gonna try scaling it

lucid iron
#

Now u need scale=4 then it gud

elfin parrot
old edge
#

Where is the code for the prairie king shooting game? I want to try and design a top down mini game rpg

elfin parrot
#

needs a few tweaks haha

uncut viper
#

I love when my triangles don't just disappear when I try to draw them, but instead stop being updated when I hot reload with new values. But only sometimes. This is very fun to debug.

#

Oh even better: I restarted the game and now the triangles are drawing in an entirely new different way even though the values in the code did not change. Did I just fuck up my GraphicsDevice along the way somehow and that's why I was having issues...

uncut viper
elfin parrot
uncut viper
#

A modfest mod that I will not be going into detail about to not spoil it!

slow basin
#

ok i took a nap and i will figure out this sound dilemma for my ferrets

#

quick question for the cue id for contentsound/barksound if i had a wav file named "dook" for example would the id be similar to modid in that it's be GubbisWeb.FerretPet_dook? or something like that

#

welp that was wrong

slow basin
#

_<

dawn ore
#

hello, for a CP Condition, if i want it to overwrite the festival maps and have them be differnt for the odd years and even years, do i just have to do this:

brave fable
brave fable
slow basin
#

ight i forfeit for the night

#

hopefully theres someone who knows a bit about custom pet sounds in the morrow 😔

#

i still understand not what i do wrong :/

#

nd id really prefer my ferrets not to make cat or dog noises 😭

uncut viper
vernal crest
#

And yes, it should have your mod id in it so it's unique

serene moat
#

Hello! I'm hoping someone might be able to help me with some recolour mod compatibility, specifically with Earthy Recolours mods.
I'm using a custom tilesheet for a lot of my interior, but I'm also pulling from the vanilla tilesheets using z_tilesheetname. I use the vanilla panels and a few other tiles, which are not showing up with the modded recolours. I'm attaching some screenshots sent to me. Is this an instance of when mods are loaded in? Or am I maybe doing something wrong when using the vanilla tilesheets? I would like the vanilla assets used in my maps to be compatible with recolouring mods. ❤️

vernal crest
#

Oh hey, Levi's creator! I've been doing some compat edits to Levi myself just in the past few days haha

#

Let me check my notes

vernal crest
#

Okay so the problem is that you should not be including the vanilla tilesheets in the published mod

serene moat
#

Ah! So if I get rid of them in the folder, that should do I?

vernal crest
#

Because your maps are finding those tilesheets in the map folder and then are not getting the Earthy-coloured ones from a user's game

serene moat
#

Also, please feel free to send the compatibility notes or what needs fixing on my end, so I can incorporate it ❤️

serene moat
vernal crest
# serene moat Ah, I thought the z_ made it know not to

No, that's for another issue, which is that vanilla maps need tilesets (not tilesheets) to be listed in a specific order in the map data. If you add new tilesheets to the map, you need them to have z_ so they don't interrupt the existing order. If you're using the same tilesets that are already present in the map, you should actually make sure that their tileset name matches what it is in the original map. That stops the tilesheet from being unnecessarily added a second time with the other tileset name.

But none of that has anything to do with whether the tilesheet will be grabbed from the map folder or the game's map folder. A map will always use the tilesheet found in the map folder regardless of tileset name.

#

Your furniture tilesheet image sources will need changing so they are like this:
<image source="../TileSheets/furniture.png" trans="ff00ff" width="512" height="1488"/>

with the ../ in front of the TileSheets part. That tells SMAPI to go into the TileSheets folder to find the furniture tilesheet. Without the two dots and forward slash, it will try to find the TileSheets folder inside the Maps folder and fail.

#

That's all in terms of vanilla tilesheets. For your own custom tilesheets, if you want them to be able to be recoloured as well (whether by giving permission to others to release a recolour of them or by you including a recolour option in the mod yourself) you will need to move those out of the map folder as well.

For those, instead of deleting them entirely from your mod, you'd move them to a separate folder and then use a Load patch in your json to Load them into Maps/. That will then let you (and others, if they have your permission) use CP to edit them.

#

I've done a personal recolour of some of your assets because I use Seaside Interiors. It's a bit messy right now because it's only partly done, but if you would like to include it in your mod I'd be happy to send it to you when I'm done (only I can't give any promises on when that might be haha)

I've also done a personal map edit to move the stairs to a little corridor off the right-hand wall of the Adventurer Guild to make Levi compatible with LUTI. That's something I'd also be happy to share with you if you wanted to include it, but no pressure :)

#

(Sorry for a rather large dump of info there lol)

serene moat
#

Oh, I wasn't looking to having my custom tilesheet recoloured. I've used colours from the anime when creating it.

You are welcome to send the edit to me of the staircase, but I will be revamping all of the Adventurer's Guild in upcoming updates, so it won't be using a lot from the vanilla assets. ❤️

vernal crest
#

That's all good! I know that sometimes mod authors want to keep their custom areas completely custom and sometimes they're just making extra beams and floors etc to match vanilla so they want them to be able to change along with the vanilla tilesheets when a person has a recolour mod. My offer was in case you were doing the latter and wanted to know how.

#

I'm not sure I read your second paragraph correctly. You're planning to edit the vanilla Adventurer Guild more? So it will be (more) incompatible with other mods?

#

(Also, I thought your first screenshot was of SurveyCorps so I thought that there might be some amount of recolouring of it that you were okay with, like the floor to match the vanilla floor etc. Sorry for the incorrect assumption!)

serene moat
#

The first screenshot is the Survey Corps. The wallpaper and floors used are recolours of the vanilla versions with a palette from the anime.

I was asking for help to make sure the vanilla assets used worked with Recolouring Mods, I'll edit my message to make it more clear Levi

vernal crest
#

Yes, I did understand that part and that was what my reply was about.

serene moat
#

I am sorry, but I am misunderstanding you completely 😅

vernal crest
#

That's ok I think we are just missing each other slightly, not helped out by me just sending a whole bunch of info about slightly different topics. I will try to clarify!

#

Everything I said before this message in my screenshot was just about what you need to do in order to let the vanilla tilesheets used in your maps be recoloured according to a user's recolour mod.

serene moat
#

That I did get! Currently editing it with your guide. Thank you ❤️

vernal crest
#

The reason I brought up recolouring your tilesheet is because when players are using a recolour mod, this is what is going to happen to their SurveyCorps because you have used a mix of vanilla and custom assets for the map. The vanilla assets will be recoloured, while those you made to match the vanilla ones will now look strange.

#

I am not talking about the furniture in this case, just the flooring tiles (not including rugs, but only the floor under the rugs).

#

This image is with me using Seaside Interiors to recolour vanilla, while your tilesheet is not edited in any way from how you made it.

serene moat
#

How is your bunkbeds working if I'm not getting the vanilla assets in?

vernal crest
#

All you need to do to fix the vanilla assets not being taken from the game's version of them is to delete the vanilla tilesheets from the map folder, like I have done

#

Other than the image source for the furniture tilesheets, you don't actually have to edit the maps at all

serene moat
#

Oh, so this is with you deleting those sheets yourself?

vernal crest
#

Yeah

serene moat
#

Okay, that makes more sense. Because this is not what it looks like to a player who hasn't edited my mod and removed them. They will just not get any recolouring in the Survey Corps.

vernal crest
#

Yep, I know. That is why I removed them haha

#

This is my warning about what it will look like once you do remove them, for any player who is playing with a recolour mod. You'll get new bug reports about mismatching textures.

serene moat
#

Got it. I'll make sure that doesn't happen

vernal crest
#

If you would like to ensure that none of SurveyCorps gets recoloured at all, no matter what recolour mod someone has, while still allowing the Adventurer Guild edit to be recoloured according to their recolour mod, I can give you advice for how to achieve that.

serene moat
#

I appreciate it, but I already got my question answered from you and know where to go from there. ❤️

vernal crest
#

Okay, good luck!

misty lintel
#

ouu

#

survey corps

#

do I smell a pokemon arceus mod 🥹

spice bear
#

Hi I figured I'd throw this mod idea out there to any modders out there because I was thinking about this for a while and haven't seen any mods on it yet.

I was wondering if pelican town could have its own little post office! We always get letters in the mail but I've always wonder who is the one who delivers it? Since it's a small town, it could literally just be one guy and a small building. However if u got expansions like RS and ES, then it will prob need like 3-4 ppl in the post office!

If anyone does it, all I ask is for some credit for the creation 😆

misty lintel
spice bear
#

Exactly- Lewis can't handle all of that plus he's got mayor duties. So wouldn't it make more sense that there's some post office somewhere that does all the moving around of items?!

#

With how long stardew valley modding has been going, I'm just a bit surprised no one has made a post office yet 😮

fallow musk
#

is there any framework which could help me create an invisible chest, also limit what items codes can be put inside it

hollow hatch
#

stupid question but .ogg is better than .wav in basically everything right?

proud wyvern
#

no

#

.ogg files generally store Vorbis sound data, which is lossy compression - much smaller, but needs to be decoded (an extra operation for the CPU), and you're losing some minimal data

.wav files generally store PCM sound data, which is uncompressed - full huge size, but it's data you just shove into the audio device, no other operations needed

hollow hatch
#

so for music i should do .wav and sfx i should do .ogg?

proud wyvern
#

i'd probably recommend .ogg for music and .wav for sound effects

hollow hatch
#

i see i see

misty lintel
#

im not 100% sure

fallow musk
#

ok ill check it out, thnx

misty lintel
fallow musk
#

yeah, only certain types of items can be placed inside the chest, no count limit though

misty lintel
#

guys, should I use vanilla maps as a base for my custom maps?

gentle rose
#

!modideas

ocean sailBOT
#

If you have a mod idea that you aren't planning to make yourself, you can put it in the mod ideas github: https://github.com/StardewModders/mod-ideas

However, this does not mean anyone is guaranteed to work on your idea—modders who are looking for ideas sometimes go through and work on what they find interesting off this list. If you want to pay someone to make your mod idea, there are a few people who do commissions (mostly art, sometimes code); you can ask around, search usernames for the word comms, or see !commissions.

gentle rose
#

make sure to either work in the unpacked maps folder or to use my extension

#

!tilesheetinator

ocean sailBOT
#

You can use the Tilesheetinator tiled extension to create Stardew Valley maps that work in-game without having to copy vanilla and modded tilesheets back-and-forth, rename files with a . in front of their name, edit maps only in the unpacked content folder or make symlink workarounds.

See the mod page for full installation and use instructions.

misty lintel
hard fern
#

what i tend to do is just use a vanilla map that has rougly the same size as the map i want to make

#

and then delete all the tiles on it lol

brave fable
#

imo it's better to pick a map with the right tilesets and tile properties, resizing the map is 𝓯𝓻𝓮𝓮

round dock
#

Hi @gentle rose

brave fable
#

but also even better if it has all the tile patterns you need, like some easy-to-copy tree foliage or grass gradients

void aspen
#

quite interesting

void aspen
#

Is there any faster way to put tiles 😭

torpid sparrow
#

Yes you can copy paste from what you’ve already put down

void aspen
#

No I mean automapping rules so I don't have to manually pick the needed angle of tile

#

or something like this

torpid sparrow
#

oh no clue :3

calm nebula
#

There is a way

#

I dont know how to do it

spice inlet
#

afaik Tiled does have automapping functionality, but no one here actually uses it (including vanilla), so you'd need to create the rules yourself

#

and unless you're creating a lot of similar maps I am not sure it's worth it

#

.. for sure would have saved modders thouands of hours cumulatively if stardew came with automapping rules SDVpufferdizzy

blissful panther
void aspen
hard fern
#

SDVpufferlurk hello.... i wanted to know if it was possible to deduct friedship from gifting like a regular hated gift, but with the rejectitem so the item wont be consumed. i figure i'd need a trigger action or something? no clue how to go about it thouh

void aspen
#

I think this is not that hard to swap tiles for the rules

#

im currently trying to mess with it

torpid sparrow
blissful panther
hard fern
torpid sparrow
#

although i dont know how that would work with specific fish types

torpid sparrow
void aspen
#

I can still try doing so

hard fern
#

reject item doesn't consume the thing at all so no item or quality will be wasted there

void aspen
#

do you have the rules.txt thing or what way does it work

blissful panther
#

So that there isn't even the auto mapping, it's just the terrains.

torpid sparrow
#

i forgot

blissful panther
#

Auto mapping is definitely more forgiving than the terrain system. I... haven't really touched on the auto mapping much at all.

void aspen
#

oh so its just a terrain feature

#

I can try doing it instead then

#

wiki also suggests using it

blissful panther
#

Not perfectly... lemme tweak some more.

void aspen
#

yeah this is silly

void aspen
#

for some reason this deep water doesnt have left side and its top side is looking differently

#

just have to get used to the way this corner setting works

blissful panther
#

Even if it will need some finishing touches done manually.

void aspen
#

dam you did it fast

#

so corner type is more than enough

blissful panther
#

Those are the autotile rules for those. Sorry for the big red arrows, but some of them are kinda out of the way so I had to zoom out a bunch. SDVkrobusgiggle

#

And it looks like this tileset I'm using doesn't have the animations applied, so you should definitely put the rules on the specific tiles that have animations for those to apply, too.

void aspen
#

yeah it took me a while to find these

void aspen
#

I wonder if I can apply different rules to same tiles if for example I dont have some sides

void aspen
#

Guess it kinda works

#

water lacks so much L patters

hard fern
#

water cursed

#

specifically the ocean water

#

it made me Unhappy

#

the last time i tried to make like, a beachy area

void aspen
#

theres no left side deep water too

#

ugh

hard fern
#

i had to flip the tiles

void aspen
#

and what about anims?

hard fern
#

i never got that far XD

void aspen
#

I see

hard fern
#

i had the map in tiled and not in-game

void aspen
#

Will anything bad happen if I add more Back layers to my map?

#

or like any layer in general

#

as long as I keep the names right

#

Like will Back3 do anything bad in game

gaunt orbit
#

no

void aspen
#

Oh okay ty

gaunt orbit
#

you'll see it but it won't have any effect other than visual

void aspen
#

So I dont have to add the object layer to it

lucid iron
#

Object layer does nothing for Back2 and such

void aspen
#

Oh

#

I see

#

thank you

golden basin
#

what was selph custim buiders mod renamed to again

#

selphs* Custom builders*

void aspen
#

oh I just noticed that

unborn shadow
#

a quick question, is it possible to schedule a letter to arrive a few days (e.g. 14 days) after an event using the conversation topic command? I saw on the wiki that the conversation topic can act as a timer for triggering events but I am not sure if it works for mail as well.

lucid iron
#

Yeah u just use the ct gsq

#

Have you made a trigger action mail send yet

void aspen
#

are those cords making rectangles or something else? Looks too confusing compared to spouse area and bowl location

#

also its like several pairs of the same warps

tawdry hazel
calm nebula
#

Trivial within c#

hard fern
tawdry hazel
gentle rose
tawdry hazel
#

:v

torpid sparrow
#

iro published it for bragging only

tawdry hazel
#

which would make sense since it's a great tool

#

:v

#

thank you for your generosity oh great one

#

i'll go do my stuff then

elfin parrot
#

Is it still valid to use the SMAPI content api to edit data like this or do I need to use Content Patcher / JSONAssets ?

                e.Edit((IAssetData data) => {
                    var dict = data.GetData<Dictionary<string, ShopData>>();
                    dict["Dwarf"].Items.Add( new ShopItemData() {
                        Id = grassBombName,
                           ItemId = grassBombName,
                        Price = 1500,
                    });    
                });
            }
lucid iron
#

FromX FromY location ToX ToY

lucid iron
#

Don't use json assets

elfin parrot
#

Thanks!

jaunty shuttle
#

On a scale of 1-10 (ten being calculus) how hard is it to learn C#?

elfin parrot
#

Depends if you've worked with object oriented languages before i suppose

#

I came from Java and I'm doing ok

lucid iron
#

I think it's a different skillset than calculus this is more logics

calm nebula
#

I think both calculus and c# are easy

lucid iron
#

no one can rly put a number on it since some ppl ease into the kind of thinking programming needs faster

jaunty shuttle
#

That’s fair lol

#

Better phrasing would be “how hard was it for you to learn”

lucid iron
#

I am terrible snob who thinks a good chunk of C# mods out there have bad coding

calm nebula
#

I do not have a degree in compsci and I am pretty dumb and it took me two hours to learn c#

#

(Don't ask me what my degrees are in.)

lucid iron
#

Even for "needs C#" situations there's a difference between "needs some simple smapi event thing" and "needs a big terrible transpiler and if u do skip prefix I'll murder"

jaunty shuttle
#

True, but I mean if I was gonna learn it I’d wanna learn the whole language so I can make it right because ✨ perfectionism ✨

#

But there are 2 specific ideas i’d really love to make that need C#

#

Lemme find the thingy where I explained them-

scenic ferry
#

@lucid iron Could I get a peek at my TrinketTinker? No smapi errors, but I think ive loaded the texture wrong

Icon is functional, but actual companion doesnt show up

Also, I want to use the tinker actions (EquipHiddenTrinket and ToggleCompanion) To make them equip after adopting a certain pet, and "hide" when on the farm - but I'm not sure how to set that up

https://smapi.io/json/content-patcher/04aebbdacb074fc596d2d5b4a42feedc

#

(Also i hope the ping is okay im sorry if it isnt SDVpufferwaaah )

ocean sailBOT
#

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

scenic ferry
#

oop

#

thanks govna

jaunty shuttle
#

Ooo congrats!!

gaunt orbit
#

hmmm I'm having trouble with contravariance and event handlers

torpid sparrow
#

i can't remember what reaction_ID means in movie reactions, does anyone know

#

i read the wiki but im still a little confused

lucid iron
scenic ferry
#

consider it done o7

lucid iron
#

Also you don't need to use VariantsBase

#

The base thing is for when you have a lot of variants

#

If it still no work give me a log

scenic ferry
#

I plan on adding variants later, so I wanted to set it up from the start so its easier to add to

#

will do

lucid iron
#

Extra },

scenic ferry
#

AH ty

#

It lives!! Wooo!!
The buff from their ability isnt being applied now though

#

still im thrilled to see em walking around at all

lucid iron
#

Your Abilities block is inside Motion

scenic ferry
#

WHOOPS

lucid iron
#

It's a very nested model so be mindful

scenic ferry
#

That would do it haha
I'll see if I can re organize it to be clearer to me whats inside where

jaunty shuttle
# jaunty shuttle Lemme find the thingy where I explained them-

Ok so one is a stop neglecting your children-overhaul, where they have needs that your spouse/roommate and you take care of, like reading bedtime stories and eating dino nuggets. I’d want it to be configurable with like options of how much you participate in raising them vs your spouse. (OMG I really need to try the children mods already ffs)

And a mod where the farmers children grow into young adults, and start living their own lives. Like one (configurable) goes off and starts a family/career, while the other stays and helps out on the farm... and once that's out i'd love to give them HMK compat up to idk at least 4 unique kids, plus poooossibly do Jas and Vincent too? (I think MM isn't making it anymore - but i'd still ask permission ofc)

#

I’m told both of those would require C# and sound potentially difficult AMsadpusheen

lucid iron
#

No i don't think the 2nd one needs any new C#

#

It's doable with hmk

jaunty shuttle
#

Wait really omg SDVpufferwow

lucid iron
#

This is because you are allowed to change the Home of hmk kids, they can just go live somewhere else if you want

#

Don't have to start in farmhouse

jaunty shuttle
#

Oh so I could start them in the farmhouse and then move them elsewhere?

lucid iron
#

The first one could be done as events perhaps

lucid iron
jaunty shuttle
#

Rn i’m working on a shadow people village expansion but I will 1000% keep this in mind for a future project, ty ty chu AG_BongoHeart

inner harbor
#

Could you use Have More Kids to make two NPCs have a child? Or would it be easier just to make a new NPC?

calm nebula
#

Okay. This is completely off topic to thr usual running of this thread BUT

#

Pathos uses a specific software for screenshots

#

What was it again?

latent mauve
#

Greenshot?

calm nebula
#

Greenshot was it, thanks!

#

(Snipping tool seems to be a bit....inconsistent on windows 11 for me now)

#

I be mad

pale river
pale river
#

it's like knowledge vs experience; probably just needs practice

red basalt
#

Yeah, I truly feel it's just a matter of practice. It was pretty overwhelming at first because things aren't always as straightforward as the Content Patcher documentation, but that's simply because C# gives you much more direct control over everything.

pale river
#

for me it was like a slope of: wow I can do everything, what do I do?; I can't figure out how to do anything; to acceptance of I'll do things when I only really need to

finite topaz
#

I’m thinking about making an npc mod for stardew. Does anyone know how many lines of dialogue we need for one npc?

pale river
red basalt
finite topaz
#

is it true that we need different dialogue for each seasons? or is it possible to reuse dialogue for every season

pale river
pale river
finite topaz
#

Oh I see, thanks!

elfin parrot
#

Does anyone know the tileProperty or other logic that prevents you from placing an object on a tile? I'm trying to prevent my grass bomb from placing grass on invalid tiles.

Currently using !__instance.objects.ContainsKey(vector) && !__instance.terrainFeatures.ContainsKey(vector) && __instance.isTileOnMap(vector) && __instance.isTileLocationOpen(vector) and it is not enough.

valid folio
#

Hello everyone! I’m back to ask for your help. I have a recipe where, when I buy it, both ingredients appear correctly, but when it shows up in the kitchen to cook it, only one ingredient appears.

The recipe in question is quite simple: vanilla + rum or vodka. It can be made either way, but in the kitchen it only asks for the vanilla.

In theory, the code is correct because it displays properly in the traveling cart.

regal leaf
#

Hi! Is there a document indexing individual items added by popular mods as universal tastes? Like for example the Golden Ocean Flower being a universal love despite being in the Flower category.

I'm making a NPC having almost every items as neutral gifts, but since universal items bypasses categories when it comes to gift tastes I have to add them manually. So this kind of documentation would come handy if it exist. SDVpufferheart

blissful panther
scenic ferry
red basalt
abstract moat
fossil osprey
elfin parrot
#

will keep looking

blissful panther
#

Did that one method not at least prevent the placement on the farmhouse's porch? I'm surprised by that.

elfin parrot
#

You can actually place grass on the porch

lucid iron
#

Can u just use the placement action to do whatever you want

elfin parrot
#

I did not know that

lucid iron
#

Instead of adding directly to terrain features

#

Besides that i would check grass spread logic

blissful panther
#

I suspect that would result in about the same problem, but it's worth a try!

lucid iron
blissful panther
#

Failing that, if you want it to be as close to perfect as possible, I think you're basically looking at a mini custom raycast of sorts...

scenic ferry
ocean sailBOT
elfin parrot
#

I'm thinking whenever I spawn a new grass, I check if there's a grass touching it. If not, then I don't spawn a new one

#

Would prevent it going up into the walls

#

I loops through the radius of the bomb to spawn them

#

this could work I will try

lucid iron
#

BFS goes brr

lucid iron
scenic ferry
lucid iron
#

I would try patch export on the buff and the tinker data

scenic ferry
#

Patch export?

lucid iron
#

Yeah a console command

scenic ferry
#

ah okok

urban patrol
#

do you want the buff to last as long as the trinket is equipped?

scenic ferry
#

I do ideally yeah
So i tried to set the Proc to Always

#

Ah!
I tried debug buff again and this time the buff applied! Only for a couple seconds but still! progress? Maybe?

urban patrol
#

try setting duration to -2 instead and remove the buff manually when you unequip the trinket

scenic ferry
#

o7

#

hm,, So the buff on its own (via console command) is fully working, but equipping the trinket still doesnt trigger the buff

urban patrol
#

how are you equipping the trinket?

scenic ferry
#

cjb spawning the trinket item and equipping it to a regular trinket slot
I havent implemented the whole "trigger on leave farm" thing yet

#

wanted to make sure the trinket functions before getting fancy with how it equips

urban patrol
#

i’m just wondering if it would be easier to manually add and remove the buff with trigger actions instead of tying it to the trinket, since presumably you would be using the same trigger actions to equip and unequip the trinket

scenic ferry
#

I could certainly try
How do I implement the trigger action?

#

er, I know the action, mushymato.TrinketTinker_EquipHiddenTrinket and unequip respectively, I just dont know... where to put it, haha

urban patrol
#

inside a patch to data/triggeractions

#

[[Modding:Trigger_actions]]

scenic ferry
#

oooo thanks!

urban patrol
#

i’m off to do Actual Job Things now but i’ll answer any pings later

scenic ferry
#

good luck!

elfin parrot
gentle rose
#

oh this really is quite a tricky one actually

#

I can think of a lot of situations that would force you to scan the entire map and even then may not get a correct answer

blissful panther
#

Personally, I think I would go for a slightly dumb line of sight type deal for a grass bomb, though. Just because a tile on the other side of a wall could have grass placed on it, I probably don't want to if it's grass being placed starting from the centre of a bomb.

#

Just my thoughts there, of course! It's not my bomb. SDVkrobusgiggle

gentle rose
#

what if you make it work by just putting up a grass starter next to the farmer with an aggressive version of the grass spread method that immediately runs like 30 times SDVkrobusgiggle

calm nebula
#

I would bfs with a radius

#

Oh, iro has a point

gentle rose
#

because grass does already spread

calm nebula
#

Actually

gentle rose
#

I can’t remember where that code is though. there’s a chance it’s floating around in dayupdate somewhere

gaunt orbit
#

Why not use a flood-fill algorithm?

gentle rose
#

because if ca already wrote the code for me I’m using his on principle snob /lh

blissful panther
#

I would too, because then if it happens to perform badly, it's not my fault! /j

calm nebula
#

I have personal beef with the bomb code so I would flood fill yes

blissful panther
#

Also, whoever requested this in 1.6?

gentle rose
calm nebula
#

Uh. Grass.dayupdate iirc

gentle rose
#

not too bad

gaunt orbit
calm nebula
gentle rose
half tangle
#

unless someone else has patched it...

blissful panther
#

Reminds me of that one mod to do with hay harvesting breaking Better Return Scepter of all things for some reason.

#

I don't think I ever figured out quite why.

blissful panther
gentle rose
scenic ferry
#

im doin something silly arent I

This works if I remove the Condition, so I assume its that

calm nebula
#

!location_name here farm

#

You're checking for a location named "!Farm" currently

scenic ferry
#

Ah! Thanks so much, I knew it was somethin silly like that

urban patrol
#

also watch out for Here vs Target

#

the sharpies will know which one location changed checks

scenic ferry
#

Seems to be working now!
Although, I tried to do the reverse for entering the farm and have run into issues

#

Am I misunderstanding the Unequip Trinket thing?

#

My hound is still here, so I feel like I certainly have an equipped trinket

half tangle
#

the unequip takes different arguments (it doesn't take a duration)

scenic ferry
#

Alas, has not fixed it :(

urban patrol
#

i have an unequip trinket action i can look at hold on

#

i just have mushymato.TrinketTinker_UnequipHiddenTrinket {{ModId}}_CharlesFollower

royal stump
#

you may also need to check whether the trinket exists in each "Condition" before adding/removing it
I'm not sure if it works with that framework's trinkets, but something like this for the add trigger, and the opposite for the removal
"Condition": "!LOCATION_NAME Here Farm, !PLAYER_HAS_TRINKET Current your_id_here"

scenic ferry
#

Aha! That seems to have made progress
They now leave properly when going back to the farm, thank you!

#

now they wont re-appear on leaving the farm a second time, but at least the first issue has been fixed..?

#

My guess is I did the MarkActionApplied false thing wrong

urban patrol
#

you have to take it out of the actions block and use the MarkActionApplied field instead

#

trigger actions can't mark themselves unapplied as an action

scenic ferry
#

ahhh ok

#

Success!!! Thank you guys so much

#

Next task is to add a condition that makes the trinket only appear if the player has adopted that corresponding pet - but it looks like the only Pet GSQs are for having any pet or the prefered pet, which isnt quite what I'm looking for

#

could I trigger a piece of mail on adopting the pet maybe? And then check for that MailRecieved?

urban patrol
#

are you covering modded pets?

#

or is it just your pet you added

scenic ferry
#

a good question... Compatibility for other modded pets might be good

#

but for now I was just going to do the hound pet I added

urban patrol
#

gotcha

#

is your pet available on save creation?

scenic ferry
#

nope

urban patrol
#

then yeah i think a mail flag would work well

scenic ferry
#

lets goooo i had a good idea >:D

#

im learning!!! slowly, but, still!!

urban patrol
#

you are!

summer spoke
#

I have a bit of an odd question. I'm trying to download and play Legacy of the Dragonborn for Skyrim - decided to take a bit of a break after losing everything again - and it involves a json. I've finished it, but there's an error that keeps popping up and I can't seem to fix it. Can I put it through a json validator before posting it in vanilla-tech-support or modded-tech-support and get some thoughts on it? Because I just can't understand.

torpid sparrow
#

for quoi

#

so not for stardew?

#

this is for stardew xd

hallow prism
summer spoke
#

That makes sense, thanks for the help nonetheless. I appreciate it

scenic ferry
elfin parrot
scenic ferry
#

thats so fair

#

small yet massive QOL thing

#

can it place blue grass?

elfin parrot
#

once I got it working I was gonna add grass variants

scenic ferry
#

hell yeah

#

All Shall Be Grass

calm nebula
#

Nice!

final arch
#

cool idea 😄

elfin parrot
#

thank you!!

elfin parrot
# scenic ferry hell yeah

ive been stalking this channel looking for help and your mod looked super cool, what are you working on?

final arch
scenic ferry
# elfin parrot ive been stalking this channel looking for help and your mod looked super cool, ...

Oh thank you so much!
I'm working on a "Familiars" mod, which adds:

  • New romanceable NPC named Vael, who runs the shop where you can buy your familiars and a couple corresponding items
  • New "Familiars" which are both pets and trinkets, allowing them to hang out on your farm, be named, have hearts, AND follow you around outside the farm and attack mobs or provide buffs

Right now, Vael and their shop is fully functional (Although I haven't written all their events or tested marriage yet), and I have one familiar... mostly functional, The Hound, which grants an attack buff

#

I want to soon make the hound attack nearby monsters but first I gotta get this mail flag working

#

otherwise the "trinket" will show up... when you haven't gotten the familiar? And thats just a little awkward aint it

#

I have, admittedly, gone a little overly ambitious for my first ever mod
but
Its mostly working? With a TON of help from all the lovely folks here

blissful panther
elfin parrot
#

I had no idea there was a modfest!

#

i have 2 that ive made

elfin parrot
#

If you ever need help testing or opinions let me know

uncut viper
#

Does this grass bomb work anywhere? Such as, inside my wife's farmhouse? Hypothetically speaking.

elfin parrot
#

it does

uncut viper
#

Duly noted. Hypothetically noted.

blissful panther
#

I'd bet it would even work on the ocean if you happened to use Smart Building with it and forced it to let you.

elfin parrot
# elfin parrot 😳

[17:25:07 ALERT Grass Bomb] startGrass calls: 2512, tryPlaceGrass calls: 22215, hasAdjacentGrass calls: 2740

i need to work on efficiency haha

#

i didn't see the messages about flood fill, I probably shoudlve gone with something thaat

ornate locust
#

my ass misreading that as "blood fill", having a weird moment

elfin parrot
ornate locust
#

Got a Rimworld video going on in the background, I'm gonna blame that LOL

elfin parrot
#

Seeing how harmony can also be used in there makes me want to make RImworld mods

scenic ferry
#

which ah, speaking of which. I come bearing an exceptionally foolish question...
... how do MailFlags work ?
LivestockBazaar comes with a handy dandy one right here : "MailFlag: mushymato.LivestockBazaar_purchasedAnimal_{animalType}"
But how do I set it to true?

#

I may be blind, but the Mail Data wiki page has plenty of info on existing flags and checking flags but I do not know how to, yknow... set the flag

urban patrol
#

setting a mail flag is essentially just sending mail but without an actual corresponding letter in Data/Mail

#

so you can do it as an action in a trigger action, in dialogue, in an event, anywhere that allows you to send mail

elfin parrot
uncut viper
#

That also seems like a mail flag that Livestack Bazaar is saying it sets itself?

elfin parrot
#

This grass bomb thing is only my second, I made a super simple one last month that just added the ability to lock/unlock signs. I kept accidentally swapping signs and it annoyed me so I fixed it

#

excited to do something more ambitious

scenic ferry
uncut viper
#

Yes

scenic ferry
#

Hm. I may be missing something then

#

no smapi errors, but no trinket either

#

feels so silly to be messing up on mail flags after successfully making an entire npc, but here we are

urban patrol
#

no trinket how? like it's not being equipped by the trigger action?

scenic ferry
#

yep, not being equipped, no buff

#

Is there a debug to check that I have the mailflag?

urban patrol
#

in a patch summary full it shows you the mail you have

scenic ferry
#

hmmm- I cant find it in there, so it must not be set

uncut viper
#

Have you actually purchased the animal in this test save?

urban patrol
#

did you test on a new save after making changes to the trigger action?

scenic ferry
#

yep
I can try a new save again though

#

im relatively certain i already did but cant hurt to try again

#

No dice :(

#

trigger not triggerin', mail nowhere to be found in patch summary

hallow prism
#

hmm

urban patrol
#

in the shop it has to be ActionsOnPurchase

#

do you have the wiki up side by side while editing?

hallow prism
#

yeah i was about to say that

#
                    "AddMail Current {{ModId}}_ZenithFlowerSeeds received"
                ],```
is what i have
scenic ferry
#

AH thank you!!!
I have uh. Far too many wiki and github pages open while I edit

hallow prism
#

it's also pretty easy to miss, imo

#

i understand why it's different, but it's hard to expect that

urban patrol
#

yeah i only realized what was wrong when i went to check the wiki

scenic ferry
#

WOOOOO SUCCESS

#

thank you both so much! I absolutely never would have caught that on my own

ornate locust
#

you ever asked someone for info to diagnose a bug and they don't answer your question, just answer a third question you didn't ask

#

and you have to ask again and they finally give you the right info

uncut viper
#

The purchasedAnimal mail flag isn't supposed to be somethingf you need to set on your own

#

(For Cody)

scenic ferry
#

Its totally possible that in the chaos of getting LivestockBazaar set up I deleted something that sets the mail flag honestly

uncut viper
#

No as in you shouldn't need to do literally anything for it

scenic ferry
#

huh

uncut viper
#

The docs are telling you that Livestock Bazaar sets this mail flag for you to use

#

However, it seems like it only does it in Marnie's place specifically maybe? Don't know if that's intended or not

#

(Only from a cursory glance at the code though, I may be missing something)

scenic ferry
#

That's a little unfortunate, but at least its easy enough to add in :]

uncut viper
stark ocean
#

hey y'all! i am working on my custom npc and having issues with his schedule not loading in. i've stripped the schedule.json to a barebones default one, and have an include section in my content.json. i am not sure why it is not working. he spawns in his bed in his room, but when i use the lookup anything mod to see if it's loaded in, nothing ever shows up. i have slept in-game and still no luck. if anyone has advice pleeeease let me know, this is throwing me for a loop. here is the code for the schedule.json: https://smapi.io/json/none/2a4b2b3d64464ec4b527a4377af2e8cb and i attached a pic of the content.json

scenic ferry
stark ocean
scenic ferry
urban patrol
urban patrol
scenic ferry
#

ah fair

stark ocean
stark ocean
calm nebula
#

The location is optional

scenic ferry
#

my bad my bad 🙏

urban patrol
calm nebula
#

Yeah

urban patrol
#

🦧 why

calm nebula
#

It defaults to the location of the previous point

#

Afaik Ginger Island

urban patrol
#

but what's the location of the previous point if it's the first point then hmmm

scenic ferry
#

NPC Home maybe?

calm nebula
#

The home point i think (less sure now)

urban patrol
#

that could also be an issue

stark ocean
#

hmm i don't think so. how does that work?

urban patrol
#

you make a blank.json containing only {} and load it to the same target you edit the schedule for

#

are you following the npc tutorial?

stark ocean
#

i am, though i will admit i got lost at the blank json part, haha...

urban patrol
#

do you understand it now or do you have further questions

stark ocean
#

i will take another look at that section and come back after i've done a bit of editing :3

stark ocean
mortal blade
#

|}{|

lucid iron
torpid sparrow
#

i can't remember, does sebastian play d&d as part of his regular schedule?

mortal blade
#

I wanna hop the fence and huggle marnie's cows.

uncut viper
# lucid iron I don't remember doing that but maybe i messed something up

I didn't have time to look through all of LB's source code to understand the intentions or flows well enough SDVpufferpensive but the docs at least to me give the idea that it'd apply to pets too, which may be a misunderstanding on my part tbf since it does say purchase (in which case there should be an adopt one SDVpuffersquee)

#

I only said that message specifically since its a postfix on AnimalHouse specifically

lucid iron
#

I'm confusion about original issue but maybe I'll figure it out on way home

scenic ferry
#

wolf is just following me doin nothin

lucid iron
#

are u hitting any monsters yourself?

#

thats what "Proc": "DamageMonster", means

scenic ferry
#

yeah, bonked a couple skeletons with a rusty sword

lucid iron
#

is your trinket lv2

scenic ferry
#

should be, its being summoned with equip SpiritHound 2 0 -1

lucid iron
scenic ferry
#

AH

#

that makes sense

lucid iron
#

i should prob be more clear on the docs, forgor that not everyone's a compsci blobcatgooglyblep

#

fyi u can see what abilities are active in the log

scenic ferry
#

hm, does not appear to be attacking still

#

oh, the smapi console log? Its not saying anythings active

lucid iron
#

its a trace item

#

will say something like Add valid ability ...

#

only logs it one time tho bolbsun

scenic ferry
#

Ill try a good ol turn it all off and on again and see if that helps anything (I've mostly been doing Patch Reloads)

lucid iron
#

u can access log while game's running

scenic ferry
#

Huh--
Okay, so, wolf is charging towards enemies periodically, but does not seem to actually be attacking - no "bite" animation, no damage

gaunt orbit
#

the optimization stuff has been a lot of work but it's really paying off ✨
2 of the 3 major components are finished now, and there's been a number of surprise side benefits with the changes

lucid iron
#

that means ur anchor is correct, but the ability is not there perhaps

gaunt orbit
#

I think when it's done I want to record a before:after comparison video on my main loadout

lucid iron
#

also maybe they r behind a rock that can happen

tender minnow
#

is it possible to get modded dialogue to take precedence over in-game dialogue? or will in-game dialogue always come first when loading dialogue? i'm having trouble getting my dialogue to show up over other conditional dialogue, like season specific dialogue

elfin parrot