#making-mods-general

1 messages · Page 614 of 1

supple ice
#

Hello here, i'm working on something huge to help modding community and i'm looking for a modder and pixel art artist to discuss and help me to finalize some little things before releasing my tool.

I'm actually working on an app to help people to create mod content for SDV, it's scan your game folder to import vanilla and custom content (Maps, Assets, NPC, items, events, custom commands, schedule etc...) and help you to create scenes with wokflow and timeline system. It detect conflicts between mods too. You can add custom NPC (with their own spritesheets and you can build custom animations), items, portraits, etc...

This is a preview of my app, i made that video when i'm testing the choice system in live.

fossil osprey
#

Oh wow that looks impressive SDVpuffergasp
What do you need help with exactly? Sounds to me like it's done

supple ice
#

I have add a NPC builder, it's like a mister potato system, you import your base assets (Hair, face, eyes, arms, etc...) and you can create a NPC portrait and spritesheet, but i'm a programmer with no art or drawing skills... so I'm looking for someone to help me to test that feature and adjust the code to have a nice result. After artists can release packs for my tool to provide more things to people when i will release my tool publicly

supple ice
fossil osprey
#

SDVpufferthinkblob There is already a SDV Portrait maker made by the community, you could try to ask for their permission to reuse their work? Or alternatively, knowing this exist, simply redirecting people to their website and letting them make portraits there
We have nothing for sprites tho, but you can probably quite easily take vanilla assets and cut them into pieces for the base sprite, no need to be an artist

#

!pfp for the portrait maker

ocean sailBOT
#
Make a premade SDV portrait with Jazzybee's site (art by Poltergeister):

Female Version | Male Version

Note: If you use images from either of these tools in something you must credit Jazzybee and Poltergeister.

autumn temple
supple ice
#

I Will look on it after lunch 🙂

hallow prism
supple ice
supple ice
gentle rose
#

(also, out of curiosity, you say it scans your game folder for custom commands - those usually come from dll mods, does it decompile them? or is checking the game itself?)

supple ice
gentle rose
supple ice
#

I don't know yet, first i want to finish my app before thinking about how to publish it.

gentle rose
#

fair enough! personally I love open source mods (especially ones like this) because it means the community can get involved and see what’s going on

supple ice
#

Me too, I'm working on a mod as a writer, and I was frustrated with the json ^^ So i decide to create that app to allow people to gave life to their stories without need to learn how to develop mods

barren tapir
#

Is it possible to give trinkets an on equip buff?

calm nebula
#

Nullnnow, are you using chue's trinket framework

barren tapir
#

No

#

I'm doing everything in C#

#

I have been looking at Trinket Tinker though to see if and how it does this (I haven't had any luck yet though)

barren tapir
#

This is what happens when you accidentally load the wrong save while testing a bug (this was my heavily modded SVE save file... My development profile currently only has 44 enabled mods 😅)

#

Now that I've loaded the correct save and the game isn't throwing an error every second, the key bind logic for my lightning spur trinket seems to be working!

Now I just need to check if the player actually has the spur equipped and what level said spur is before applying the buff (which, in order to do, requires me to do several other things first to the lightning spur. Mainly, looking at the other trinkets to see how they keep track of what level it is and update the name/description accordingly).

#

With that in mind, I think my plan for today will be as follows:

  • Finish the lightning spur trinket
  • Add the Dragon Claw trinket
  • Patch the anvil logic
  • Add the crafting recipe for the lightning spur
  • Begin/resume working on custom mannequin behavior
#

I'm slowly but surely whittling down the TODO list I set for myself before adding any more new books

strong kite
#

Is there a Content Patcher mod that adds a hat without Fashion Sense that I can look at for reference?

barren tapir
#

I'm so confused

#

I have the following:
and it claims that TrinketEffect.GenerateRandomStats returns a boolean value, and that it doesn't have a definition for general_stat_1.

However, neither of these statements are true about the Trinket Effect class

#

This is the TrinketEffect class in comparison (the final method is public virtual void GenerateRandomStats(Trinket trinket))

brittle pasture
barren tapir
#

WTF

#

I gtg soon, but can you send me the decompile instructions just so I can make sure I decompiled it correctly?

I followed the instructions on the wiki, and thus far the decompile has seemed to be correct up until now

blissful panther
#

(You are over level 50, so you could ping Pathos for access to the decompile repo at this point.)

barren tapir
#

How do you know what level you are?

strong kite
#

Wait does being over level 50 give you permission to ping Pathos? heehee (Just curious)

brittle pasture
#

using Avalonia ILSpy

blissful panther
strong kite
#

Holy smokes I'm level 74?? That's actually so crazy 😭

barren tapir
#

WOAH, I'M LEVEL 63... What does that mean?

barren tapir
blissful panther
#

But yeah, I would strongly recommend pinging Pathos for access to the decompile repo on GitHub.

barren tapir
#

@ivory plume Ohhh yee who holds the keys to the forbidden knowledge, guardian of the sacred halls, and creator of many a useful tool. I beseech thy aid, as for whatever reason my decompile doth appears incorrect.

Pray take pity on me, as I request access to that forbidden to the layman.

-# May I please have access to the decompile repo? Thanks 😅

ivory plume
barren tapir
#

Sure thing!

#

How do I find my GitHub Id? Or is it just the same thing as my username?

ivory plume
#

Yep, it's your GitHub username.

barren tapir
#

Aaand done!

ivory plume
#

Done! You should get an invite email from GitHub. Once you accept it, see the decompiled repo readme for more info. Feel free to ask if anything is unclear.

barren tapir
#

I just got it and am currently reading it now!

#

IDK how my decompile got borked.

strong kite
#

Good news, the hat is added! Bad news, I need to make sure it positions correctly-

torpid sparrow
#

Seems right to me

barren tapir
#

Is the help command for the governor mansion broken?

torpid sparrow
#

Governor maybe dead rn

#

!json

ocean sailBOT
#

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

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

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

torpid sparrow
#

Nvm

barren tapir
#

!help

ocean sailBOT
#
please get me off discord
strong kite
torpid sparrow
#

Ik I was being silly SDVpuffersquee

barren tapir
#

Is !help not how you view the documentation of different commands?

strong kite
#

maybe it would also help if my player character didn't have a similar skin color heehee

torpid sparrow
#

You have become the

#

Whatever it is I’m not sure

barren tapir
fossil osprey
#

it's /list

#

not !help

strong kite
gray bear
#

mudkip

barren tapir
#

Thanks

gray bear
#

how does hat code even work

strong kite
fossil osprey
#

I think you define offsets

strong kite
gray bear
#

there is no offset listen on the wiki

strong kite
#

Because for Content Patcher, the only offset thing isn't something you can fine-tune

#

At least according to the wiki

gray bear
#

Each hat in the texture should have a 20x80 pixel area, consisting of four 20x20 hat sprites from top to bottom: facing down, right, left, and up. The texture can have any width and height that's evenly divisible by 20 and 80 respectively.

#

uhm,,, i don't know, move it up/down? thonk

fossil osprey
gray bear
#

FS has offsets, vanilla does not

fossil osprey
#

but yeah I guess just move your sprite until it fit?

strong kite
#

So like this for example is already placed genuinely as high as it can go

gray bear
#

does it need to be higher?

#

that is issue

strong kite
#

But the game auto sets it back down to where it thinks it can be

strong kite
strong kite
#

I'm trying something sneaky and hoping it works

#

Cuz changing the Booleans of these wasn't doing anything

#

it still didn't work truedespair

gray bear
#

whats ur code look like

strong kite
#
    "Changes": [
    {
        "Action": "Load",
        "Target": "Mods/TntDove.PBB/Hats",
        "FromFile": "assets/{{TargetWithoutPath}}.png",
    },
    {
        "Action": "EditData",
        "Target": "Data/Hats",
        "Entries": {
            "{{ModId}}_MudkipHat": "{{ModId}}_MudkipHat/{{i18n:MudkipHat_description}}/false/true//{{i18n:MudkipHat_name}}/0/Mods\\TntDove.PBB\\Hats"
            }
        }
    ]
}```
#

The two Booleans are pretty nebulous as I'm trying to figure this out

gray bear
#

that looks correct

strong kite
#

Yes, it's working correctly, but in game it appears lower than I feel like it's supposed to

gray bear
#

try hide/true?

strong kite
gray bear
#

maybe its the hair

strong kite
#

maybe...

gray bear
#

this is one advantage FS has, you can offset anything

strong kite
#

Not sure why the hair offsetting it would make it lower, though.. unless the Mohawk is just extremely wack

gray bear
#

hair be crazy

strong kite
#

but like.. I could use Fashion Sense, but I really do not want to add another dependency for literally one single item that should be possible without it

finite ginkgo
# barren tapir IDK how my decompile got borked.

(Not that it matters now, but i was curious and investigated a bit, looks like the decompile you had matches the TrinketEffect.cs code in 1.6.0-1.6.8, then in 1.6.9 the trinket code was refactored a bit and looks like the modern code instead, so yours wasn't messed up, just outdated)

strong kite
#

Like I've gotten a ton of use from adding BETAS and Unlockable Bundles, those are good dependencies

#

Well it definitely hid the hair...

strong kite
#

Ima see what happens if I move the hats down in the tilesheet

barren tapir
#

Also, I think I've gotten all of my ADHD command questions out of the way in the mansion

#

Now I can have lunch get back into modding...

... Probably gonna have lunch first though

strong kite
#

Well- It made it lower, that's for sure...

#

shoot, I guess I really do have to make it higher, but that would mean redesigning the hat...

barren tapir
#

Speaking of hats, I also still need to look into placing hats onto mannequins via C#...

... Gonna give players the weirdest way to farm for rare clothing 😅

barren tapir
gray bear
#

hat

barren tapir
#

The hat is only 1 tile too tall, correct?

strong kite
#

It is 3 pixels too tall

#

or rather 3 pixels lower than I planned for

barren tapir
#

I mean, at least 2 of those pixels could probably be shaved off fairly easily

strong kite
#

I hope so... it'll mean squimshing the kip a little bit though

barren tapir
#

The final one may require changing the cheek spikes a bit

gray bear
#

squishkimp

strong kite
barren tapir
#

If there's one useless skill I got from my castform army, it's shrinking pokemon

fossil osprey
#

squishy

strong kite
#

I actually don't dislike this, he kinda scrunkly :3c

barren tapir
#

Time to get lunch and take my booster dose of ADHD medicine, bc god I keep getting distracted from modding

strong kite
#

Alright so yeah I was able to remove 2 lines of pixels relatively easily. I'll see how this looks in game before continuing

barren tapir
#

I'd lower the the topmost line by one and maybe shorten the spikes by 1 pixel. If need be, you could also try to reduce the number of spikes per cheek to 2.

You may also be able to use AA to make the top bits round without adding that top black pixel

strong kite
#

Alright, if I can't get it 1 pixel more then I'll be okay with this

#

actually yknow what I think I'm okay with this

#

I'll change the sides a bit because there it's kinda covering the eyes a bit

barren tapir
#

I basically just made the top spike and back fin 1 pixel shorter

gray bear
#

unrelated to the horrors of coding but omg its so cute

barren tapir
#

BTW, please don't think that you have to do this or that I'm trying to "fix" your art. This is just my general process of shrinking pokemon heads to fit in a much smaller space than they were meant to be in

#

My first step is usually shortening longer bits

strong kite
gray bear
#

squish the kip SMCPufferWoke

strong kite
#

Unfortunately, shortening the head fin even more isn't as simple because I still have the other 3 directions to do it for and.. they're already pretty ittle

barren tapir
#

I'm also like 92% certain I've already head to deal with shrinking mudkip. I don't recall if I made a mudkip/castform base yet 😅

strong kite
#

I'll keep the original design I had for if I do make a Fashion Sense version

#

But for people without, this'll do

barren tapir
# strong kite Unfortunately, shortening the head fin even more isn't as simple because I still...

You could still get away with shortening the fin when its front facing. A) you could just say that the kip has lowered its tail bc it's a living creature, and B) I'm fairly certain that angle would make the tail completely covered by the head.

Now, if B holds true, I'm not implying that you should remove the fin from the front facing sprite, as it helps with readability.

Especially when working with smaller sprites, you are allowed to break rules if it helps make it easier to read

strong kite
#

Now I feel like I need to make the hat non-trashable or at least renewable if you lose it (granted I gotta implement the way you actually get it in the first place heehee )

barren tapir
#

The crow shop could sell it. That's what it does with Emily's clothing

strong kite
#

Well it's meant to be a reward for completing a set of bundles

barren tapir
#

For context, that shop sells one of a kind items that you've lost (e.g., Leah's sculpture)

strong kite
#

Ohhh right okay

barren tapir
#

So you'd still only be able to get one hat (granted, IDK how it interacts with CP)

strong kite
#

I could also do something more unique with it... I have an idea in mind, I just don't know if there's a way to determine whether or not you've lost the item or not

barren tapir
#

The shop also only appears if you can purchase something.

#

NOW TIME TO FORCEFULLY QUIT. I WAS SUPPOSED TO EAT LIKE 15 MINUTES AGO. CURSE YOU ADHD

strong kite
#

I see a path here but I'm worried there's gonna be a big ol' hardcoded wall in the middle of the road 😭

autumn temple
#

Has anyone tried to add locations to the return chepter?

torpid sparrow
#

hmm i suppose you could if once you clicked it you could choose where to go

#

but i dont think its been done actually

#

i just know theres a bunch of teleportation mods

strong kite
#

I think realistically all I need to know is if with Vanilla, Content Patcher, SpaceCore, or BETAS, can I detect when an item no longer exists in the world.
Or... actually? I guess I don't need it to be a unique item, I can just set up a special shop where you purchase the hat and you can theoretically purchase it as many times as you want

#

I'll handle that once the method of obtaining it is actually made because that's gonna set up the mail flags I need

autumn temple
#

Hat looks super coolSDVpufferwaaah

fierce vault
#

someone asked me if I was a C#-er. I have not made the jump yet, and maybe I never will… but I do kind of want to mod other games, and once you know one language, you can more easily pick up all the others

#

my dad told me he could see me making a video game someday. He’s nice, but I’d have to be a great musician too, otherwise it just wouldn’t land the same (assuming I could totally get the coding and writing thing down too) lol

#

I’m so glad this game has great music

#

It makes the events I create that much better

#

Speaking of, I’m doing anything but working on my mod right now SDVpufferthinkblob

gray bear
#

i feel called out

blissful panther
fierce vault
#

I promise the update’s still in production, I just got slow and inconsistent after I didn’t have a time limit anymore SDVpuffercry

patent lanceBOT
fierce vault
#

I love that I’ve been able to do something with my pixel art because of this game

blissful panther
#

(Atra!)

calm nebula
#

Anyways, parcy game sound redesign when

fierce vault
#

Wow

calm nebula
#

Hi DH!

fierce vault
#

that’s the first time I’ve been quoted, and it’s me admitting to my biggest modding fault 🤣

#

which is doing anything but modding when that’s what I could be doing

lunar hare
#

if i use mods in nexus and in curseforg will they both work?

torpid sparrow
#

if ur using different mods then yes i dont see why not

#

if ur downloading two of the same mod, well no

#

actually idk how curseforge works....do they download it FOR you? and have a cf folder

#

but theoretically downloading files from two different places won't make them not work

lunar hare
lunar hare
torpid sparrow
#

nexus has vortex, curseforge has it's own(?)

lunar hare
torpid sparrow
#

i feel like using both mod loaders will cause issues

#

but if u dont use vortex with nexus

#

then maybe manually downloading from nexus and using curseforge works? no clue

fierce vault
torpid sparrow
#

most mods are on nexus

lunar hare
gaunt orbit
torpid sparrow
#

ohh thats what they mean

#

yeah just download files and put them in the Mods folder

gaunt orbit
#

if you would like to use a mod manager app for stardew, I would recommend stardrop rather than any site-locked app

#

also wouldn't recommend using curse for stardew in general because the selection is lacking and many of the mods on it are old/not compatible

torpid sparrow
#

these have some hello kitty plushes

#

@lunar hare

lunar hare
#

thank you guys !

barren tapir
torpid sparrow
#

oh yay

lunar hare
#

im downlaoding this mod here i can install othewr mods alongside this in one save right ?

autumn temple
lunar hare
#

ok tyy

fossil osprey
#

Just fyi, this channel is for making mods, the channel to talk about mods is #modded-stardew

barren tapir
#

I have the following in a class that extends the TrinketEffect class.

public override bool GenerateRandomStats(Trinket trinket)
{
    if (trinket.ItemId != $"{ModEntry.ModId}_Trinkets_LightningSpur")
    {
        return false;
    }

    GeneralStat = (GeneralStat + 1) % 3;
    trinket.descriptionSubstitutionTemplates.Clear();
    trinket.descriptionSubstitutionTemplates.Add((GeneralStat + 1).ToString());
    ModEntry.StaticMonitor.Log("Generating Random Stats", LogLevel.Debug);
    return true;
}

This is getting run everytime I equip and unequio the trinket. Is this normal?

brittle pasture
#

it seems like every existing overrides of GenerateRandomStats is using generationSeed to ensure the same results get returned, so possibly

#

and if a trinket actually needs rerolling RerollStats is called to change the seed

barren tapir
#

Huh

#

That... complicates things

brittle pasture
#

I would use generationSeed to save your state

barren tapir
#

I was actually just beginning to pull up the decompile to look at generation seed

brittle pasture
#

on second thought probably something on modData is better if you need it to be really deterministic

severe cairn
#

I'll replace the carps with other fish later too lol

fossil osprey
#

fish in fountain 🙂‍↕️

strong kite
#

I'm gonna assume the fact that has changed color is going to be fine for these bundles...

iron ridge
#

looks fine to me

strong kite
#

I assume it's just some visual with Notepad++ for having (word):(word) or something

iron ridge
#

mhm

floral python
#

Can someone help me understand how to use the helper.Data api? I've read the docs over and over and I still don't understand how to read/write the actual variables

toxic hemlock
#

Does anyone have any idea why this happens?

brittle pasture
#

for the most part you just call Read to read and Write to save

final arch
final arch
#

in the example on the page its just

// read data
var model = this.Helper.Data.ReadGlobalData<ModData>("example-key");
//change variable
model.ExampleBoolean = true;```
barren tapir
#

I think I'm gonna take a break on working on the trinkets to begin tackling the clothing generation of mannequins

#

The good news is that the lightning spur is almost finished. I just need to:

  • Actually have the anvil accept and process it
  • Set the speed boost based on its level
  • Add its crafting recipe
  • Add on step animations
    Which would then put the logic for my trinket book at around 33% finished (still need to add the logic for the other trinket + changes to the anvil behavior for all other trinkets)
floral python
brittle pasture
#

perhaps you can show your code so others can look
but if modData works then SDVpufferrad

toxic hemlock
#

Look at the couch

#

And the window below it

floral python
#

I had this, if you're curious. My guess is that there was an issue assigning the value to an existing variable (wasShackled)

final arch
#

OnSaveLoaded you read the data and change it. OnSaving you read the (old) data again, not the one you changed. you only changed the value in the local variable model (which gets garbage collected right away)

brittle pasture
#

seems like they're just reading the field on save load and only saving it on saving?

#

the code looks fine to me; make sure you registered those events?

toxic hemlock
final arch
#

actually yes the code seems fine 🤔

final arch
#

check your chairtiles ig? 🤔

toxic hemlock
#

It's from Rattan Furniture

golden spire
#

I thought it was just a rug under the window

final arch
#

is it there only if you sit? thats odd 🤔

#

I dont think couches have extra draw stuff when you sit

ornate locust
#

Not from the back

#

Sides, maybe

fossil osprey
#

chairs are cursed so I wouldn't be surprised if something went wrong

ornate locust
#

But it looks like a messed up chair tile, yeah. Couches just usually don't have them from the back

final arch
#

I thought about chairtiles but if its movable furniture they dont even have chairtiles right?

ashen thunder
#

if its furniture its an issue on the furniture_front png i assume?

toxic hemlock
#

It's a part of map

final arch
#

ahh

#

yeah then its the chairtiles

ornate locust
#

That angle shouldn't even have a chair tile, but that would be the problem

ashen thunder
#

it should have a chair tile wouldnt it? cause it draws the couch back over top of the farmer

ornate locust
#

No, the couch top is put on the front layer anyway, or a building layer. A layer that draws on top of the farmer

#

so you sit on it and it just shows the top of the couch, it doesn't need a separate chair layer like an arm of a chair does

floral python
#

what if you go behind the couch

ornate locust
#

let me double check digs open files

#

Well a building layer also draws behind the farmer if you walk in front of it.

#

but that doesn't matter if butt is in chair

#

Maybe it does have them, I need to check. Suddenly doubting self

#

Ah, it doesn't have SEPARATE draw tiles, you just use the top of the couch, for it, my bad

#

Draw tile entry is one off in the Y direction then

#

man has it really been over a year since I set up those couches...

#

what is time

ashen thunder
#

Trying to make my custom buff do the same thing as the oil of garlic buff. Any insight on why this doesn’t work? i can’t even get the ouch message to show

internal sealed class ModEntry : Mod
    {
        public override void Entry(IModHelper helper)
        {
            Harmony harmony = new(ModManifest.UniqueID);
            
            harmony.Patch(
                original: AccessTools.Method(typeof(Farmer), nameof(Farmer.hasBuff)),
                prefix: new HarmonyMethod(typeof(ModEntry), nameof(hasBuff_Prefix))
            );
        }
        
        public static bool hasBuff_Prefix(string id, ref bool __result)
        {
            Game1.showGlobalMessage("Ouch!");
            if (id == "23" && Game1.player.hasBuff("chocolatte12.CedarPoint_Lavender"))
            {
                __result = true;
                return false;
            }
            return true;
        }
    }```
brittle pasture
ashen thunder
#

ah ok i was hoping i could do it one at a time

brittle pasture
#

seems like that one is used more often while hasBuff("23") is only checked in the volcano dungeon

ashen thunder
#

oh it works now!! tysm

hard fern
#

Selph is moldy now

whole prism
#

i eat mold.

barren tapir
#

Status Update:
Leaving mannequins in the mayor's basement now turns them into cursed mannequins. On top of that, every day they have a chance of getting a random hat.

Tomorrow I plan on adding the logic to add the remaining random clothing items so that I can finally cross something off of my todo list for this mod.

I also want to try and properly finish the lightning spur trinket, and maybe even then Dragon claw trinket.

Also, as a fun side effect of this, this not only gives players a new way of farming for the living hat, but it also gives players a means of obtaining the panda hat!

#

I may try finishing the spur logic before going to bed, though its getting rather late (All I have left to do is let the anvil accept the trinket, have the trinket level change the speed boost, and add the crafting recipe)

hard fern
#

Lewis's basement gets more haunted by the day

barren tapir
#

But in all seriousness, that is my goal! I've been working on fleshing out the lore of this mod in the background, and I don't want to give too much away. But the general idea is that the shrine that sells you these books and powers is some sort of eldritch evil

#

There's a reason why I called this mod "Dark Offerings", after all

ornate trellis
barren tapir
warped mesa
#

well gents i finally figured out how content patcher works

#

about to test it

#

Don't know whether I should be using it to make cutscenes and stuff rom now

barren tapir
ornate trellis
#

my boss is lowkey everywhere

warped mesa
#

i love how most of the mod devs here are making chill mods and im making whats essentially a horror mod

ornate trellis
#

was more a joke towards me being the void but that also works

barren tapir
warped mesa
#

oh.

#

im a moron

midnight eagle
barren tapir
ornate trellis
#

i do horror daily. all the code i do is pure horror for real coders

warped mesa
#

poor kent

barren tapir
#

This mod isn't necessarily designed to be a horror mod...
... It's just sort of evolving into that direction (its the beholder dragon BBEG in my previous D&D campaign all over again)

warped mesa
#

okay

#

Fair

#

I wish I played D and D and understood that reference

barren tapir
#

Even if you played D&D at least 30% of that reference wouldn't make sense

warped mesa
#

fair

#

i keep looking in the "making-mods-art" section and I want to be like "hey do any of you want to do art" but i feel bad cuz of what i'd be making them draw

barren tapir
ornate trellis
#

mayhaps, maybe its the boss we made along the way, maybe its maybelline™

barren tapir
#

I'd say I recently got my superior fired, but that completely skips over everything he did on his end... Not the least of which being to send an email to the mother of the CEO telling her that said CEO is not fit to run the company

#

Which is the craziest thing ever

ornate trellis
#

damn

#

ngl "mother of the ceo" sounds like a funky bbeg title too

barren tapir
#

And that is a loaded statement, given the circumstances as to how he became the CEO in the first place

#

For a bit of context, I work for a very small government contracting company. About half a year ago, the CEO of the company passed away suddenly and without warning. The new CEO is his son.

ornate trellis
#

so a variant of "he didnt deserve that job" or w/e?

orchid glade
#

Hey Void do you like to see mods made from your sprite base?

ornate trellis
#

sure

orchid glade
barren tapir
#

To be clear, the current CEO deserves the job. I don't think anybody is happy given the circumstances as to how he got that position, but there are a lot of details I'm skipping over due to a variety of reasons.

ornate trellis
warped mesa
#

ladies and gentlemen of making-mods-general, i come to you with more problems because i can not do content patcher well. allow me to begin
in my mod file i have this. inside cp is manifest.json and content.json. content.json contains a lot of dialogue for Penny specifically. manifest.json is just the manifest. However, upon opening Stardew valley, i notice there is no message in the log that says it was applied. i confirmed it was so by using "patch summary", which confirmed nothing was applied.
Does anyone know what could cause this?

urban patrol
#

there's no content.json on the same level as the manifest

#

either move content.json up or manifest.json down

uncut viper
#

You cannot have a CP mod and a .dll mod within the same folder

#

Once SMAPI Finds one manifest, it looks no further/deeper

#

Both your CP mod and your C# mod will need their own mod folders, which can then both be put inside a different parent folder

warped mesa
#

huh. well thats a problem cuz the mod is intended to be a mix of C# mod and Content Patcher

brittle pasture
#

ModBuildConfig has an option to automatically bundle a content pack when building so you don't have to do it yourself

#

plenty of mods mix C# and CP packs; most major expansions do (+ FTM packs/etc.)

warped mesa
uncut viper
#

No, not as one

#

Two different mods

warped mesa
#

I see. But when the time comes to release the mod, how do I make the mods as one singular mod?

uncut viper
#

You don't. You upload the zip that contains both folders.

ornate locust
#

I think you're getting stuck on technicalities

#

put them both in the same folder in a zip, that's one mod as far as a user is concerned

brittle pasture
#

SMAPI checks subfolders so they can be in one top level folder if that was what you were concerned about

#

they don't have to be two separate folders in Mods

#

they just can't nest

warped mesa
#

I think my primary concern is that the mods will be considered separate, when this content patcher pack is intended to only be said upon the time stated by dll code.

ornate locust
#

Here's SVE. It's three mods wearing one hat

warped mesa
#

Ah

#

So SMAPI takes it all as one essentially.

#

or maybe i put that wrong

#

my other concern is that the dialogue present in my mod does not replace the vanilla dialogue until a set time

#

or at least thats the design

#

For testing reasons I made it so that the mod starts an "OccupationState" on Spring 26 of year 2

#

The mod itself does not start until that day

#

So all this dialogue is not intended to replace the real ones until that date.

uncut viper
warped mesa
#

but thats what i sort of intended. The dialogue would change. Like after the "first day" as everyone in the town calls it, they all act shocked for a bit. Then the dialogue sets into a steady pool of dialogue that they pull from after like a "month" in stardew time

proven spindle
#

You can either do 'when season spring day 26 year 2', or you can set a mailflag on that day and trigger dialogue (as well as other things like map patches, schedule changes etc) when the player receives that mailflag

brittle pasture
#

that also sounds like a use case for conversation topics

#

though CTs only serve one line at a time

warped mesa
#

Alright whatever. ill come back to that later. anyway, after making the little content patcher as a separate mod, the log sends this. Of course, the dialogue for penny doesnt change. At the moment during the day she is inside the house.

brittle pasture
#

PennyMarriage is not a thing; the correctkey is MarriageDialoguePenny

#

I believe they don't show as applied because they're not being used; Penny is unused because you married her and PennyMarriage is unused because it's the wrong name

#

also they shouldn't have Data/ at the beginning

warped mesa
#

christ whats my problem with that

#

hmm so it seems even after changing it to MarriageDialoguePenny its still not applied

brittle pasture
#

!json show your code?

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.

warped mesa
#

i feel like an idiot but should it be in json format content patcher? i assume so but i just want to be sure

#

thought so thanks

#

only one error found. fixed it, and even so, its not applied :(

proven spindle
#

share the link to the json so we can take a look at it

warped mesa
brittle pasture
#

that look correct to me; the dialogue should apply if you check with patch export

#

what happens when you talk to her

warped mesa
#

just says the normal lines

brittle pasture
#

that line is summer_2 in MarriageDialoguePenny

#

and I don't see that in your code

#

just in case, I'll clarify that editing the MarriageDialoguePenny asset (as is the case for most assets) to insert your new lines will not remove the existing ones

#

so if you patch export MarriageDialoguePenny you'll see your lines amidst the vanilla ones

warped mesa
#

yeah i did that

#

and yes its among them

brittle pasture
#

then it's working as intended

warped mesa
#

So essentially youre saying i have to remove any reference to summer_2

brittle pasture
#

you can use something like "summer_2": null to remove the line entirely

#

or Load a blank JSON into Characters/Dialogue/MarriageDialoguePenny beforehand if you want to go scorched earth

warped mesa
brittle pasture
#

inside the Entries of the second block yes

warped mesa
#

great so i have to write a bunch of dialogue for each season. llloooovveeely.

#

maybe i shouldnt have tested this on penny

#

especially cuz i only have one save

#

But it presumably works fine.

proven spindle
#

i think if you just load instead of editdata your dialogue patch it'll replace the whole thing

#

of course then the npc won't have anything to say on the days they have no dialogue entries, so they'll just be quiet

#

or you could leave the existing dialogue and only editdata the lines you want to change, so they still have stuff to say and it's less work

warped mesa
#

ill just write a bunch of dialogue to replace every SINGLE line of dialogue present

#

though I think i used most of my best ideas on the not married dialogue

#

the ones that are gonna suck the most to write dialogue for are the characters who i didnt put any time into

#

like sebastian and a bunch of ones i dont care about

#

luckily i dont have to write any dialogue for Kent :D

#

boy being a mod developer sure is FUN

devout otter
#

Is the NPC icon on Special Order posting hardcoded?

ornate locust
#

You need C# for it

calm nebula
#

Yes.

devout otter
#

Hm hm thankee.

waxen thorn
#

whats the best way too add new dialogue without replacing the old diagloue

proven spindle
#

editdata the npc's dialogue patch and only include lines for the new dialogue entries

waxen thorn
#

ok thats what im doing rn but im worried if i add new dialogue on a day that already has specific dialogue in vanilla, will they only say the new dialogue or is there a way i can get it to alternate

tiny zealot
#

you should be able to (for example) conditionally patch in the new dialogue only some of the time using When/Random

waxen thorn
#

ohh okay

subtle spear
#

Hey yall! I was wondering if it's possible to change a sprite for an NPC ONLY for an event and nothing else? Maybe go back and forth so I don't need to add the sprite as a temporary actor? (I have flashbacks)

I didn't know if this extra stuff is necessary.

` {
"LogName": "Shane - Preteen Sprites - Load Custom",
"Action": "Load",
"Target": "Characters/Shane_Preteen",
"FromFile": "assets/images/Shane/Shane_Preteen.png" //change the name if you plan to add portraits
},

{
    "LogName": "Shane - Preteen Look - Custom",
    "Action": "EditData",
    "Target": "Data/Characters",
    "TargetField": ["Shane", "Appearance"],
    "Entries": {
        "{{ModId}}_Shane_Preteen": {
            "Id": "Preteen",
            "Portrait": "Portraits/Shane", //change this to whatever you end up naming the portraits
            "Sprite": "Characters/Shane_Preteen",
            "Indoors": true,
            "Outdoors": false,
            "IsIslandAttire": false,
            "Precedence": -10, 
            "Weight": 1
        }
    }
},

`

brittle pasture
subtle spear
#

Okay I see! I always thought that was only for events like festivals guess I didn't read the whole thing! Thank you i'll give it a try 🙂

brittle pasture
#

festivals are simply oversized special events SDVpuffersquee

velvet narwhal
#

specifically an event?

#

because there's a changeSprite command for events

brittle pasture
#

ah forgot about that + the back and forth part

velvet narwhal
#

surely there's crimes with frameworks but if it's just a normal event then because it's loaded to Shane_Preteen you can just do:
changeSprite Shane Preteen and it'll change SBVPufferThumbsUp

brittle pasture
#

I don't think you need an Appearance entry even if it's only for the event

#

as long as you load into the correct paths

subtle spear
#

Hopefully all will go well 😅 Thank you!!!

dawn ore
ocean sailBOT
#

@dawn ore You leveled up to Cowpoke. You can now share images in all channels!

devout otter
brittle pasture
#

yeah pretty much

#

could have sworn there's a framework to dehardcode that

#

well can't find any framework but it seems like Ridgeside/Sunberry/etc. also rolls their own patches to dehardcode it 😌

#

-# just like with untimed orders

#

well good-ish news is that custom emojis (including for special orders) is also maybe possibly probably on the roadmap for dehardcoding

barren tapir
#

Wait, when did selph eat a green apple?

brittle pasture
#

-# it's actually mold

barren tapir
stoic chasm
#

Hello pufferfriends. How does one make an event that takes place on the farm? I just want a small intro event that takes place on the porch for the farmhouse, that's all

brittle pasture
#

you can insert into Data/Events/Farm

#

it should automatically be near the porch, but to be safe I recommend copying a vanilla event and modify it

stoic chasm
#

Ooh okie dokie. Thank you! How do I find a list of the events, again-?

brittle pasture
#

!unpack

ocean sailBOT
#

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

stoic chasm
#

Ah, thank you!

subtle spear
#

Okay, um small issue with changing the sprites. I can't change them back because the only way to change them from

#

changeSprite Shane Preteen

Back to normal was

changeSprite Shane

#

and he doesn't change back DX

hard fern
#

uh

#

🤔 will Shane Shane work

#

or no

brittle pasture
#

just in case but did you also make the Appearances change

subtle spear
subtle spear
brittle pasture
#

with IS_EVENT? yeah definitely remove it

#

what changeSprite Shane does is "go back to using Appearances"

subtle spear
#

` {
"LogName": "Shane - Preteen Sprites - Load Custom",
"Action": "Load",
"Target": "Characters/Shane_Preteen",
"FromFile": "assets/images/Shane/Shane_Preteen.png" //change the name if you plan to add portraits
},

{
    "LogName": "Shane - Preteen Look - Custom",
    "Action": "EditData",
    "Target": "Data/Characters",
    "TargetField": ["Shane", "Appearance"],
    "Entries": {
        "{{ModId}}_Shane_Preteen": {
            "Id": "Preteen",
            "Portrait": "Portraits/Shane", //change this to whatever you end up naming the portraits
            "Sprite": "Characters/Shane_Preteen",
            "Indoors": true,
            "Outdoors": false,
            "Condition": "IS_EVENT stardewaly.rosalie_ShaneRosalieSecondFirstKissEvent",
            "Precedence": -10, 
            "Weight": 1
        }
    }
},

`

This is what I have now

brittle pasture
#

yep remove the Appearances entry

#

then switch to the Preteen sprite at the beginning of your event

subtle spear
#

I was going back and forth since those are for flashback sequences

ornate locust
#

For a flashback, I created a temporary actor to be the past NPC

subtle spear
#

temporary actors don't move as well though 🙁

ornate locust
#

pardon?

subtle spear
#

they tend to move more than they should

ornate locust
#

Mine acted like a normal NPC

subtle spear
#

so if you want them to move say 1 to the left, they may go 2 or more

#

sometimes

ornate locust
#

Okay I had that happen, but it was with unaltered vanilla Shane

#

I think that's just actors in general and movement being weird. When I swapped to advanced movement, it stopped

subtle spear
#

oh yeah for sure i hat ewhen that happens DX but temporaryActors typically don't work that well in my experience DX

ornate locust
#

Changing the type of movement to advanced movement completely solved that for me

#

and with that, my temporary actors acted totally normal

#

event movement is just cursed

subtle spear
#

so you changed every movement to an "advanced movement" for the temporaryActors?

uncut viper
#

From a code standpoint, there is no difference between a real actor and a temporary actor

subtle spear
#

yeah but in the game it says otherwise DX

ornate locust
#

I use advanced movement for EVERYBODY now because I don't trust normal movement not to double

subtle spear
uncut viper
#

I am saying that Midnight is correct and movement is just Cursed™ sometimes. The game isn't saying otherwise

subtle spear
ornate locust
#

Shane insisting on walking two steps instead of one made me just about lose it.

subtle spear
#

Thank you @brittle pasture @ornate locust and @uncut viper ❤️ I'm gonna try those tomorrow (or lalter today since it's 2am here) I've gotta head to bed because apparently sleep is important 😅

uncut viper
#

I've done nothing but good luck! /lh

subtle spear
spark wharf
#

how do I set multiple conditions? Is it "Condition": "THING 1", "THING 2",?

uncut viper
#

"Condition": "GameStateQuery One GoesHere, GameStateQuery Two GoesHere"

spark wharf
#

Okay thank you

haughty charm
#

Hiya! I want to restrict items from showing up in a shop until after an event has been seen, but the when condition I added to the shop entry doesn't seem to be working. I've tried both:

    "Id": "{{ModId}}_FurnitureShop_Bouquet1",
    "ItemId": "(F){{ModId}}_Bouquet1",
    "Price": 300,
    "AvailableStock": -1,
    "AvailableStockLimit": "Player",
    "When": {
        "HasSeenEvent" : "{{ModId}}_FlowerShowFinalEvent"
    }
},```

and

```{
    "Id": "{{ModId}}_FurnitureShop_Bouquet1",
    "ItemId": "(F){{ModId}}_Bouquet1",
    "Price": 300,
    "AvailableStock": -1,
    "AvailableStockLimit": "Player",
    "When": {
        "HasSeenEvent |contains={{ModId}}_FlowerShowFinalEvent": true
    }
},```
#

I confirmed via patch summary that the event hasn't been seen

#

So I'm sure I'm missing something obvious 😭

uncut viper
#

It looks like you have the When condition inside the shop entry, but those are a CP only concept and can only work to control an entire patch at once, so your When stuff isn't even being put into the game at all here

haughty charm
#

ohhhh

uncut viper
#

It'd be better to use a game state query in the Condition field though

#

PLAYER_HAS_SEEN_EVENT Current {{ModId}}_FlowerShowFinalEvent

haughty charm
#

THANK YOU BUTTON SDVpufferheart

uncut viper
#

(or Host instead of Current if you prefer)

dawn ore
uncut viper
#

I don't know where the expansions have it in their codebase but it'd be a very very simple Harmony postfix to SpecialOrdersBoard.GetPortraitForRequester()

devout otter
#

I wonder if I could just hitch on whatever method those mods are using if I have them installed...

velvet narwhal
#

if they're not targeting specific assets, maybe

uncut viper
#

Well I just checked Ridgeside and no, it does the exact same hardcoding as vanilla but with its own sheet, so don't copy its homework

devout otter
#

ES has this, which looks like a pretty simple CP thing... { "Action": "Load", "Target": "Mods/EastScarpe/Emojis", "FromFile": "assets/Images/ESemojis.png" }, { "Action": "EditData", "Target": "Mods/EastScarp/EmojiOverride", "Entries": { "Aideen": { "AssetName": "Mods/EastScarpe/Emojis", "Location": { "X": 0, "Y": 0 } }, } }

uncut viper
#

It's doing it in a very strange way (imo) looking at its code but yeah, you can reuse it for your own if you copy that format

devout otter
#

*Putting "special interaction with East Scarp" in my mod's feature bullet points*

uncut viper
#

Can't do it with Sunberry either

devout otter
#

Ow, this is not it? 😔 { "LogName": "Add SO Emojis", "Action": "Load", "Target": "Mods/skellady.SBVCP/SOEmojis", "FromFile": "Assets/Images/SOEmojis/SOEmojis.png" }, { "LogName": "Add SO Emojis Data", "Action": "EditData", "Target": "Mods/skellady.SBVCP/SOEmojisData", "Entries": { "AichaSBV": 0, } },

uncut viper
#

That is indeed it. However, hardcoded texture asset (that first patch)

#

i.e. if you add a new emoji index to their sheet and someone else also adds a new emoji index to that sheet, you two will probably overwrite each other.

#

Unless you happen to pick different indices and different spots to extend the emoji sheet to

devout otter
#

Ah yeah, I just realized that you can't actually specify a different texture asset to use.

#

I see, I see. Thanks for the insight!

uncut viper
#

I feel like every expansion here made this much more difficult on themselves than they needed to /lh

royal stump
#

i sure did
might be a good idea to throw into the .16 pile if nobody has yet, I don't see it on the wiki

uncut viper
inland rain
spark wharf
#

Is there a way I can set a Condition for the player needing to have a specific Mastery unlocked?

fierce vault
#

Guys, this should work in getting Jack's hat and mail flag still sent upon skipping the event, right? This is the DT```{
"Name": "SkipLastHi",
"Value": "setSkipActions AddItem {{ModID}}_JacksHat#AddMail Host {{ModID}}__hatGiven received",
"When": {"Hearts:{{ModID}}_Jack": "4, 5, 6, 7, 8, 9, 10"}
},

    {
        "Name": "SkipLastHi",
        "Value": ""
    },

and this is the events jsonjunimoKart_whaleMusic/
27 20/
farmer 19 23 0 {{ModID}}_Jack 27 18 2/
setSkipActions AddMail Host parcy.jack_santaLetter tomorrow/
{{SkipLastHi}}/```

#

oh wait

#

Ok, I fixed the mail part

#

still didn't receive his hat though when I think that should've worked? SDVpufferthinkblob

royal stump
#

and afaik the numbers are farming = 0, fishing = 1, foraging = 2, mining = 3, combat = 4 (for the mastery_ part)

spark wharf
#

Was just about to ask about that. Thanks very much 😄

royal stump
#

SDVpufferthumbsup it's not entirely clear in the code either, but those are the constant numbers for skills elsewhere

proven spindle
fierce vault
#

Ohh, ok SDVpufferthinkblob

#

got it, now I think

devout otter
fierce vault
#

Took me a minute

fierce vault
#

thanks, both of you

#

wait, that also explains why the set skip action to make jack appear after his event failed!!

#

I had two

#

oh this is great

#

More bugs are going to be knocked out

devout otter
#

Honestly though, setSkipActions is mostly useful if the timing of the trigger matters. Like with additem, you'd get a message saying the item was added to your inventory when it happens, so presumably you'd want to time it precisely with the scene where the item is being given.

#

For adding mail or making an NPC appear after the event, there's not really any visual indication of it happening during the event itself. So you could just set them all at the beginning of the event without needing to use setSkipActions.

fierce vault
#

Oh, good to also know

#

I'll save this to keep in mind

#

Side note, I think I also just figured out how to fix his hatless sprite not being used after his event!

#

All with the power of DT's

#

(assuming it works!)

devout otter
#

So you have two versions of the sprites?

fierce vault
#

Yes, I can show you

#
"SpringJack3": {
                "Id":"SpringJack3",
                "Condition": "SEASON Spring, DAY_OF_MONTH 3",
                "Portrait": "Portraits/{{ModID}}/SpringJack3",
                "Sprite":"Characters/{{ModID}}/SpringJackSprites3"
            },
///*// still won't work
            "SpringJackAlt3": {
                "Id":"SpringJackAlt3",
                "Condition": "SEASON Spring, DAY_OF_MONTH 3 4 5 6 7 8 9, PLAYER_HAS_MAIL Host {{ModID}}_hatGiven Received",
                "Portrait": "Portraits/{{ModID}}/SpringJackAlt3",
                "Sprite":"Characters/{{ModID}}/SpringJackSpritesAlt3"
                }```
#

I was thinking of making the conditions DT's with conditions

#

oh wait!

devout otter
#

You can add a PLAYER_HAS_SEEN_EVENT condition.

fierce vault
#

wrong one I put though

#

hold on a sec

fierce vault
#

So event seen is too broad I think

devout otter
#

Ah I get it.

fierce vault
#

Yup, but I think DT's will fix it!!

#

Sort of getting how to utilize DT's now has been so helpful

devout otter
#

Hesitate to point this, but did you know that you "hatGiven" mail id is different between this Condition and the one on your event?

fierce vault
#

Oh, wait, let me check that SDVpufferthinkblob

#

OHh

#

it is

#

the __

#

yikes, thanks for telling me

fossil osprey
#

Quick question people (no idea if this is the right channel, sorry in advance)
Have we already gotten some errors regarding OneDrive preventing correct installation of SMAPI? I feel like this was (at least part of) the problem in last tech support post, but I can't find other occurrences that clearly pointed at this being the culprit
I wanted to make a wiki edit to not advise installing things from OneDrive, but I wanted to make sure this was actually the issue

waxen thorn
#

i added a new animation for sam and it works for his normal outfit but doesnt work for his winter outfit (he just stands still instead of the animation playing)

#

i have a 2nd png with the winter clothes with the animation frames, i have the code in my content.json telling it to load that png

verbal glacier
#

!json you can post your content.json by following these steps, and then people can help look what’s causing the issue

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.

vernal crest
ocean sailBOT
#

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

Please share your SMAPI log file. To do so:

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

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

vernal crest
#

Oh hang on nevermind the issue is that Sam does not use his Characters/Sam outfit in Winter. He uses Characters/Sam_Winter.

fierce vault
#

hey, are CT's supposed to normally override the day's other dialogue?

#

It's what happens with the CT from my intro event SDVpufferthinkblob

waxen thorn
#

i have a 2nd version of the animation sprites in his winter outfit

golden spire
#

you want to target Characters/Sam_Winter for the winter one, as Abagaianye mentioned.

#

you're changing the non-winter one which is not used in winter

waxen thorn
#

OHH

#

i see

#

thank you!

vital star
#

is <recipe> a name or an ID for addCraftingRecipe and addCookingRecipe on the Modding:Event_data page?

royal stump
#

those are kind of the same thing for recipes, but use its key from Data/CookingRecipes or Data/CraftingRecipes, e.g. .../addCraftingRecipe Quality Bobber/...

vital star
#

Okay, thank you 🤩

rare orbit
#

can dialogue mods be made to work with content patcher?

vernal crest
devout otter
#

It's the recommended way to do it, provided you are not doing shenanigans.

rare orbit
#

just some more dialogue on some npcs that i feel need more!

#

im just brainsstorming my next project

golden spire
#

more of what? or just more dialogue in general?

rare orbit
#

more dialogue yes there's dialogue mods but more can be nice!

#

maybe they can talk about previous festivals added via mods?

warm onyx
#

Hi! I'm looking to replace the the hay sprite/make a cp mod to do so, but I after a first pass I'm not sure where that sprite would be nor the easiest way to find it?

#

I found a mod that makes hay a craftable and the content json has this but I don't actually know what this means to know if it's helpful: "Hay": "262 2/Home/178/false/Farming 1"

vernal crest
#

Its id is its sprite index on the spritesheet so you can open data/objects to find its ID and then use an image editor like Aseprite that shows sprite indexes to find that number on maps/springobjects.png

warm onyx
#

okay, I think i can work with that

#

thank you!

ornate trellis
#

yall, i got a brainfart moment. was gonna start doing my maps and was like, wait a sec i feel like i didnt think this fully through....so, from this convo #making-mods-general message i was gonna have a tilesheet for the maps(contaminated) until an event happens and the next day the maps will from then on use a diff tilesheet(cleansed), both my own custom ones.
Maybe i am overthinking this but uh...how do i actually set it up? I probs use the contaminated tilesheet in the maps, right? then load both tilesheets, but uh...have contaminated set to uh...hasseenevent XYZ to false and the other set to true? orrrr...how would the maps know....i keep thinking back to its probs similar to the seasons tilesheets but idk

#

i feel like i should start the maps until i know how to set up the sheets...

hard fern
ornate trellis
#

oh right...

#

man i keep forgetting the way to set up when conditions...is this right?

{
            "LogName": "VoidWitchCult's EditImage Tilesheets",
            "Action": "EditImage",
            "Target": "Maps/VWCF_LostIsland_Underwater_tainted",
            "FromFile": "assets/Maps/Tilesheets/VWCF_LostIsland_Underwater.png",
            "When": {
                "HasSeenEvent |contains=EVENTID": true // TODO: Replace this with a real event ID!
            }
        },
ornate trellis
#

imagine you could lock the doors and lock others between them /j

inland rain
#

Here's the sprite for the two doors, pretty simple; it only shows the knob on one side for vertical doors, I don't know if there's an easy way to fix that

#

A neat thing is that they are furniture, but we fudge the collision based on the actual door frame

#

so you can see in the video that you only collide with the actual door, not its tile

royal stump
inland rain
#

you can flip them so, you have more than just 4 rotations, e.g. for double doors

iron ridge
#

!gs

ocean sailBOT
iron ridge
#

!chatgptmods

ocean sailBOT
#

We don't recommend using generative AI (such as ChatGPT, Copilot, Claude, Grok, etc.) to write mods for Stardew Valley. There are a few reasons.

  • AI-generated content is not allowed to be posted in the server. If you need help with your code, you won't be able to post it.
  • Large Language Models aren't trained on enough Stardew-specific information to give reliable, accurate output. They also have no concept of what they don't know, and so cannot tell if they're incorrect. In short, they don't know if they're hallucinating a solution that simply feels like it makes sense or not.

This holds true for both SMAPI/C# mods, and mods for frameworks such as Content Patcher.

There's no shame in being new to Stardew modding, and you won't be talked down to for not knowing what you're doing. We strongly recommend consulting with other mod authors in the appropriate channels as a first step if you're completely stuck at step one.

royal stump
pallid moss
clever monolith
golden spire
#

Maor Lewis as a door

fossil osprey
#

human barrier SDVkrobusgiggle

inland rain
# clever monolith This is so neat I think this is what I need for my custom boards I'll be taking ...

here's the patch for that:


        [HarmonyPatch(typeof(Furniture), nameof(Furniture.IntersectsForCollision))]
        public static class Furniture_IntersectsForCollision_Patch
        {
            public static bool Prefix(Furniture __instance, Rectangle rect, ref bool __result)
            {
                if (!Config.ModEnabled || !TryGetDoorData(__instance, out var data) || data.Bounds?.Length < 4)
                    return true;
                var rot = __instance.currentRotation.Value;
                var loc = __instance.GetBoundingBox().Location + data.Bounds[rot].Location;
                var bounds = new Rectangle(loc, data.Bounds[rot].Size);
                __result = bounds.Intersects(rect);
                return false;
            }
        }
#

I think it should be a bit different, as I read it again

#

that's better

clever monolith
#

Time to get off my bed and fix my patch

pallid moss
#

Am I doing this right so far?

iron ridge
#

update keys need to be in a string

pallid moss
#

I only am gonna use 1 update key tho. (Should I change it from plural "keys" to just "key"

iron ridge
#

no

brittle pasture
#

as in ["Nexus:number"]

fossil osprey
#

no no, you just need to put "" around your key, inside the brackets []

pallid moss
#

Ohh ok

#

And then thats all that's really needed for that file right?

#

Now for the content file, what do I do for "format" and "changes" (sorry if im asking too much)

#

The thing where I copied from used an example which is why format has numbers rn

#

Just forgot to delete them

iron ridge
#

depends what change youre changing

#

[[Modding:Content_Patcher]]

ornate trellis
verbal glacier
#

pam door

barren tapir
#

@civic river I think I remember someone stating that you created a framework mod that let's trinkets give a buff when they are equipped. Is this true, and if so, what framework mod is it?

fossil osprey
#

wrong chue

barren tapir
#

Dammit

#

Sorry

pallid moss
barren tapir
#

Why isn't chue's name appearing in the autofill?

fossil osprey
#

2.9.0 is the latest so you can leave that

pallid moss
fossil osprey
barren tapir
#

Thanks

brittle pasture
#

the framework is Trinket Tinker

barren tapir
#

@lucid iron I think I remember someone stating that you created a framework mod that let's trinkets give a buff when they are equipped. Is this true, and if so, what framework mod is it?

#

Thanks

#

That was meant to be a reply to Selph

#

UGHHH

barren tapir
fossil osprey
#

nullnnow you should rest I think /lh

clever monolith
barren tapir
#

I like just booted up my laptop to begin working on mods

fossil osprey
#

no more pirate duck friend :c

verbal glacier
fossil osprey
#

:O

barren tapir
#

Are we getting a pirat pam?

fossil osprey
#

evil pam duck base :O

clever monolith
#

Pirate pam duck inc

barren tapir
#

We are getting a pirate pam, aren't we

void aspen
#

j son

fierce vault
#

Do CT’s typically override the current day’s dialogue

#

?

barren tapir
#

Okay, plan of actions:

  • Finish the lightning spur
  • Finish the mannequin logic (will probably be asking questions later on how to do a certain thing)
  • Analyze Trinket Tinker to see how it does buffs on equip
fierce vault
#

It happened with my event’s CT

devout otter
fierce vault
barren tapir
#

BTW, have yall ever spent way too much time doing something to prevent having to hard code values?

fierce vault
#

No, but I have spent too much modding in general

gaunt orbit
#

not really

verbal glacier
fierce vault
#

and figuring out basic stuff

gaunt orbit
#

I mean at this point I just design mod features around asset data or configs mostly

lucid iron
#

Since there's a GSQ that checks for trinket presence

barren tapir
#

I spent way too much time yesterday figuring out the best way to determine the hat loot table for mannequins, which wouldn't be too difficult except for the fact that I wanted to assign rarities to certain hats.

A lot of math on probabilities later, I found a solution. Now yall have a legit way of getting the panda hat and farming the living hat

royal stump
gaunt orbit
#

for transpilers I sometimes hardcode stuff but for local indices but usually what I'll do is look for specific landmarks around the target variable and then just copy it out of the existing IL so that the transpiler is less likely to blow up if the code changes

barren tapir
gaunt orbit
lucid iron
#

The key is that you can subclass trinket effects and make it do stuff

fierce vault
#

Ok, good to know. I was asking because I was doing a crossover kind of event with LimeyDragon, and I realized that if the CT for the interaction after the event overrides my dialogue, I might want to ask that the days get narrowed to one

lucid iron
#

Idk if looking at tt is that helpful bc it's oop hell due to being something that let you make complex trinkets from data alone

barren tapir
gaunt orbit
#

at one point I wanted to make system where you defined rarities for loot and then the actual probabilities would be based on that + an input rarity value, and the conclusion I came to was that I didn't know enough to pull it off and needed more practice with algorithms

barren tapir
pallid moss
barren tapir
brittle pasture
spark wharf
#

i'd really like to know what was going on in my head this morning that let me look at this and think "yep looks good, ship it"

gray bear
#

we decided to improve your chance

pallid moss
#

I dont understand, it should be fine

fossil osprey
#

what is your file name?

pallid moss
fossil osprey
#

uh, should be alright indeed SDVpufferthinkblob

blissful panther
#

Those square brackets aren't the kind of brackets it's talking about, I'd wager?

fossil osprey
#

I'd say try to have the file just be tree-mod.zip?

gray bear
#

doesn't like square brackets it seems

fossil osprey
gray bear
#

what do you call them

pallid moss
fossil osprey
#

() parenthesis
[] brackets
{} curly brackets

#

but actually you can call them all brackets

#

and it's weird

gray bear
#

bracket family

latent mauve
#

I usually have to change the square brackets to parentheses for Nexus Mods

torpid sparrow
#

i mean

#

in math we differentiate between paranthesis and brackets

#

but i am canadian maybe americans dont

fossil osprey
#

I distinctly remember an american trying to designate a key on their keyboard, not knowing the name, and saying "bracket with angles"

#

So I guess some people call parenthesis "brackets"

ornate trellis
#

ngl in German we also just call em brackets, square brackets and curly brackets

full vapor
#

hey guys, i was thinking bout trying to make a simple mod that adds an npc, i draw pixel art more easily on my phone, would it work if i drew the pixel art on the phone and then transferred it to my PC?

#

I've been drawing on my finger for a long time

ornate trellis
#

never remember "paranthesis "...

round timber
#

as long as you use the right dimensions then sure!

#

doesnt matter what tool you use as long as it gets the job done

#

for example a standard portrait is 64x64 pixels, and a walking sprite is 16x32

cyan jungle
#

question: how can you change the default portrait for when you ask a custom npc to go watch a movie?

fossil osprey
#

In the dialogue I guess?

full vapor
fossil osprey
cyan jungle
#

it's like the game

round timber
ornate trellis
#

dialogue key MovieInvite_Invited_NPCName

fossil osprey
cyan jungle
round timber
ornate trellis
#

ya, you can write your onw dialogue and make the expression like any other

pallid moss
#

Could I get someone to test my mod (not at my computer right now) or no

fossil osprey
#

Can't you just wait to be able to test it yourself?

barren tapir
#

Anvil logic for the lightning spurs is working, now I just need to have its level change the speed boost!

pallid moss
fossil osprey
#

Dw, I was just confused ^^

cyan jungle
#

@ornate trellis hey so, i added that to my i18n and my dialogue and it's still showing up as the hardcoded version :(

torpid sparrow
#

if ur testing translations, did u change ur game language

barren tapir
#

The lightning spur is officially finished! I just need to clean up and document its code!

I also need to add it's crafting recipe, but that is a separate item on my todo list. I think I'm gonna begin trying to manipulate the output of regular trinkets next

barren tapir
#

How does the game assign dyeable clothing random colors when they drop from monsters?

serene meteor
#

Hello - can somebody point me to documentation to figure out how to make my mod aware of another mod's dynamic tokens? The specifics are that I'm trying to implement the datable template from Seasonal Cute Characters and, as an example, getting errors that the BeachOutfitsEnabled token cannot be used because it cannot be found.

uncut viper
ornate drift
#

is woodsTheme just the secret woods theme?

verbal glacier
#

yes

ornate drift
#

thanks

#

why the fuck are you pale ale now 😭

verbal glacier
#

long story...

torpid sparrow
#

2 pale ale

ornate drift
#

crazy

#

hi wem

torpid sparrow
#

hi speedy

#

mrow

ornate drift
#

um

does Tiled not show where hardwood can spawn?

#

cause im pretty sure hardwood spawns near the middle of those two big open spaces

torpid sparrow
#

it does

floral stream
barren tapir
verbal glacier
barren tapir
#

We've started a pale ale game of chicken

#

No wonder it wasn't working - I was using the wrong item ID

verbal glacier
fierce vault
#

are you ok?

barren tapir
#

Someone needs to make a mod that randomly replaces the duck textures with your profile pics

floral stream
barren tapir
#

I was more so thinking that its just alternate textures similar to how there are brown and white cows

#

OH GOD, I JUST REALIZED SOMETHING...

... I'm probably going to need to patch the actual ice rod trinket class to get it to work SDVpufferwaaah

#

I'm lost. How are you supposed to make a perfect ice rod? I currently have the following:

if (t.QualifiedItemId.Equals("(TR)IceRod") && t.GetEffect() is IceOrbTrinketEffect iceEffect)
{
    if (Game1.random.NextDouble() <= perfectChance)
    {
        ModEntry.StaticMonitor.Log("Forcing a perfect Ice Rod trinket.", LogLevel.Debug); // TODO: Trace
        t.displayNameOverrideTemplate.Value = TokenStringBuilder.LocalizedText("Strings\\1_6_Strings:PerfectIceRod");
        iceEffect.ProjectileDelay = 3000f;
        iceEffect.FreezeTime = 4000;

        t.descriptionSubstitutionTemplates.Clear();
        t.descriptionSubstitutionTemplates.Add(Math.Round(iceEffect.ProjectileDelay / 1000f, 1).ToString(CultureInfo.InvariantCulture));
        t.descriptionSubstitutionTemplates.Add(Math.Round((float)iceEffect.FreezeTime / 1000f, 1).ToString(CultureInfo.InvariantCulture));
    }
}
idle lantern
#

What's the command to play an event in CP again?

urban patrol
#

debug ebi?

idle lantern
#

ty!

ornate drift
#

it is TIME

#

to learn how to make a multiple choice question inside an event

#

(ironically its Manny's last year 1 event)

calm nebula
#

debug ebi

ornate drift
#

speaking of which

#

how do you initiate that question....

urban patrol
#

question fork or quickQuestion

#

i usually like to have the wiki page up side by side so i can see a list of all event commands as i write the event

ornate drift
#

question fork<answer index> "<question>#<answer 0>#<answer 1>#..."

#

hm

#

does anyone have an example?

#

cause this is kinda confusing

#

i want both answers to have the same result

urban patrol
#

you can look in vanilla files

#

if you want the same result then use question null

ornate drift
#

question null "What do you think?#Yeah, I believe you can.#I think you worry too much."

#

like that?

urban patrol
#

you need to escape quotes

#

otherwise it’s not valid json

ornate drift
#

why does the wiki add it though

urban patrol
#

add what

ornate drift
#

the quotes

urban patrol
#

because they’re required

uncut viper
#

Because the quotes are needed still

#

The wiki doesn't escape them because the wiki is writing them in a language-agnostic format. It doesn't matter if you use JSON or C# or add it bit by bit through some other means, that is what the end result of the string should be for the game to recognize it

#

It's just the case that if you're using json to do so, you need to either escape the quotes or use single quotes for your outermost quotes instead

ornate drift
#

how do i escape them...?

floral python
#

with a backslash

uncut viper
#

\"

ornate drift
#

isnt that just what speak uses?

urban patrol
#

yes that’s another example of escaped quotes

ornate drift
#

oh so i already know it

floral python
#

frontslash? wait which is which

ornate drift
#

yay

uncut viper
#

The concept of "escaping" characters is not a Stardew thing. It's a programming thing

#

So it will apply any time you want to use quotes inside a string

clever monolith
#

frontslash/
backslash\

floral python
#

thank you

ornate drift
#

question null \"What do you think?#Yeah, I believe you can.#I think you worry too much.\"

#

that was easy

#

thanks guys

#

does giving the player a stardrop matter if theyre already at the max amount of health they can have?

#

like their bar doesnt increase anymore or something

golden spire
#

it still increases

ornate drift
#

theres no limit?

golden spire
#

I can't remember

#

but can eat quite a lot

urban patrol
#

it may affect perfection though i think

ornate drift
#

yummy

ornate drift
golden spire
#

it doesn't, I think it gets counted elsewhere

#

but the perfection tracks specific ones

urban patrol
#

okay great

golden spire
#

but I think there's another counter somwhere that does increase?

#

someone else was talking about this a few weeks ago in here

uncut viper
#

There's no other counter as far as I'm aware. Also stardrops only effect stamina, not health

#

(I ofc might not be aware of every single thing but I don't recall one off the top of my head at least)

#

Be aware though that if you plan on selling a Stardrop from inside a shop, buying it will give the player the mail flag for getting the sewer stardrop if it's not a festival shop

#

If it is a festival then they get the valley fair stardrop mail flag instead

#

It does not matter if it did not actually come from those shops

ornate drift
#

event

uncut viper
golden spire
#

Perfection will now also require 38 stardrops 😛

ornate drift
#

jesus

#

even i dont play the game that much

ornate drift
#

huh, doesnt seem like theres a command to add a stardrop to the player in an event...

#

im guessing maybe its the eat command?

golden spire
#

it's just an item

autumn tide
#

or give item?

ornate drift
#

give item yeah

uncut viper
#

A stardrop is just an item with qualified id (O)434

ornate drift
#

is there a way to make them do the stardrop animation during it?

uncut viper
#

It should always do that automatically upon obtaining one

ornate drift
#

oh okay

autumn tide
#

ooh innnteresting good to know

uncut viper
#

That said I'm not 100% certain on events

ornate drift
#

thanks :3

uncut viper
#

Like 85%

#

Maybe 80

brittle pasture
#

I havent really investigated the code but I mildly suspect that giving the Stardrop during the event would just drop it in your inventory untouched

autumn tide
#

oh happy junimo-ing selph SDVpufferheart

brittle pasture
#

pls do the science and let us know the results

uncut viper
#

The Farmer.doneEating() code handles the animation and it has a check for whether an event is currently going but it only seems to care when it comes to some UI overlay TASes

#

Otherwise it does just do all the usual stuff

#

But this is just from reading the function and not trying it myself or tracing it all the way back to see if this even gets called during an event

#

But it checks for an event specifically so I imagine it must matter

ornate drift
#

i will let you know :3

floral python
#

having just looked at that code recently, it actually checks if the item being added to player inventory is a stardrop

barren tapir
#

Question, is there a bug in vanilla SV wherein reforging a Perfect Ice Rod will cause it to still be called a Perfect Ice Rod afterwards?

ornate drift
#

sigh.

brittle pasture
ornate drift
#

animate {{ModId}}_SpeedyManny false false 1000 30 30 30 30 30 30 32 32 32 32 32 32 30 30 30 30 30 30 32 32 32 32 32 32 30 30 30 30 30 30 32 32 32 32 32 32

wait what am i having issues with?

barren tapir
ornate drift
#

theres clearly a {{ behind the modid

barren tapir
#

I JUST SPENT LIKE 2 OR 3 HOURS TRYING TO FIX A VANILLA BUG SDVpufferwaaah

#

Granted, now that I know its a vanilla bug, I actually think I know how to fix it

#

This entire time I thought it was an issue on my side

golden spire
#

@uncut viper Now that I have thought about it more, I think the counter that was in the back of my mind was the Steam achievement counter for the nunber of stardrops.. so external... and if you're using that many mods, expect steam achievments to be easier/wonky. :p

uncut viper
#

The steam achievement is granted by checking the specific mail flags only.

slim marlin
#

Just popping in to say y'all are awesome. I was able to search this channel and use the modding tutorial to create a complete mod with new fish. Don't know if I will publish it but the kid is happy.

golden spire
#

hmm, cant remember what it was then

uncut viper
#

I'm not sure how the counter is updated, but you won't actually be granted the achievement without them all (or the gotMaxStamina mail flag)

scarlet temple
#

Hi, am I allowed to ask questions here about changing existing mod data for my own use to fix errors? (Specifically "Can't apply data patch" because "target" doesn't match an existing target.)

uncut viper
#

Yes

ornate drift
#

i just realized

#

the hotbat...

#

hotbar...

#

its all 67

ornate drift
#

😭

floral python
#

Ohhhhh

slim marlin
ornate drift
#

sigh

scarlet temple
#

So I'm trying to replace portraits for certain characters for Stardew Valley Expanded, but I can't figure out why it can't target Olivia or Victor

ornate drift
#

are you using their internal NPC names?

scarlet temple
#

The targeting in the .json files (both content and Olivia and Victor) are correct.

golden spire
#

we can't either without seeing the json

scarlet temple
#

Yes, same exact wording from SVE for the NPCs

ornate drift
# severe cairn probably something earlier

{{ModId}}_Manny10Hearts/Friendship {{ModId}}_SpeedyManny 2500/Time 600 2200": "woodsTheme/28 11/{{ModId}}_SpeedyManny 27 11 2 farmer 38 12 3/move farmer -8 0 3/move farmer 0 -1 0/move farmer -1 0 3/faceDirection farmer 2/pause 1000/speak {{ModId}}_SpeedyManny \"...$5#$b#Hey, @.$5\"/faceDirection {{ModId}}_SpeedyManny 1/faceDirection farmer 3/pause 1000/speak {{ModId}}_SpeedyManny \"Pretty quiet here, isn't it?$5\"/pause 1000/speak {{ModId}}_SpeedyManny \"Yknow...$2#$b#I'm starting to realize.$5\"/pause 500/speak {{ModId}}_SpeedyManny \"I think i actually might fit in Pelican Town.#$b#The people are nice,everyone's so supportive,#$b#and they have a really good saloon.$8\"/pause 500/speak {{ModId}}_SpeedyManny \"I just wish i was honest with you guys sooner.$6#$b#I was too scared of being abandoned, that i ignored all the things around me.$12#$b#\"/pause 500/speak {{ModId}}_SpeedyManny \"Do...you think i can make up for that?$6\"/pause 500/question null \"What do you think?#Yeah, I believe you can.#I think you worry too much.\"/pause 500/speak {{ModId))_SpeedyManny \"Yeah, you're right.$2#$b#I'll still try my best, regardless.\"/pause 500

#

i cant really find anything broken

severe cairn
#

oh wait i forgor u had the animate func

uncut viper
#

It would be better to send full jsons on the json validator

ornate drift
#

look at the 10 heart event in the end

scarlet temple
#

I see it in the pins, thank you @uncut viper

urban patrol
ornate drift
#

....ah

#

wait, THAT caused it not to be a tokenizable string?

urban patrol
#

idk

#

but it’s an issue

ornate drift
#

usually its the ModId, otherwise the event would still work but skip that specific command

urban patrol
#

if it’s still broken after then send the log again

severe cairn
#

oo yeah tht would do it

uncut viper
#

That would not cause a tokenizable string error, no

brittle pasture
uncut viper
#

{{ModId))_SpeedyManny

severe cairn
#

oo

uncut viper
#

#I think you worry too much.\"/pause 500/speak {{ModId))_SpeedyManny \"Yeah, you're right.$2#$b#I'll

#

You've used parenthesis here instead of braces.

ornate drift
#

oh, what the hell?

severe cairn
#

the braces 😔

ornate drift
#

oops

severe cairn
#

ive had enough braces bugs i just copy pasted the modid and pinned it SDVpufferwaaah

torpid sparrow
#

i do that sometimes

severe cairn
#

as in {{ModId}}

torpid sparrow
#

idk why

severe cairn
#

I write it manually half the time but i do pin stuff like character names for events, not gonn write {{ModId}}_Arumi 500 times

ornate trellis
#

i always have my dispo json open and copy from there :B

golden spire
#

I rarely use {{ModId}} as I just prefer to have the full id

ornate trellis
#

but even then im not safe from accidentally leaving in a { when i delete something catJAMCRY

severe cairn
#

I only do it when i have to... cus its so long T_T

#

(when i have to being in smapi window)

scarlet temple
brittle pasture
#

use CP for code

scarlet temple
#

.... I just now realized, there shouldn't be brackets [] but instead parentheses like this {}

ornate drift
#

the animate frames count in milliseconds, right?

torpid sparrow
#

yes

ornate drift
#

DAMNIT MANNY'S STUCK IN THE HARDWOOD LOG

#

😭

#

knew this would happen

scarlet temple
torpid sparrow
#

log time

ornate drift
#

the stardrop animation works perfectly as intented!

#

HOWEVER, you will need to add a long pause for the animation and text to finish

#

otherwise, i think the text will override whatever command is next

#

i did pause 12000

brittle pasture
torpid sparrow
#

i hate adding pauses

#

timing them is hard

ornate drift
#

finally im DONE
9 EVENTS

scarlet temple
brittle pasture
#

yes

scarlet temple
#

Thank you for the help ♥️

ornate drift
#

now that i have all events...

#

hm 🤔

#

okay, time to finish the generic dialogue and specific dialogue

#

and schedules

#

and fix the beach outfit not appearing

#

and the bakery outfit....sigh

#

christ i still have so much to do

torpid sparrow
#

npc things

ornate locust
#

#justnpcthings

ornate drift
#

whats that

torpid sparrow
#

wdym

#

this is just what happens when u make an npc

ornate drift
#

oh i thought that was a mod name 😭

#

im embarrased af

torpid sparrow
#

LOL

ornate drift
#

uhhhh how does inviting a custom NPC to a movie theater work?

brittle pasture
#

you mostly want movie reactions and concession tastes

torpid sparrow
#

are there default concession tastes

golden spire
#

most people do reactions for each individual movie, but you can do it by genre or a mix, but if you mix it you have to make sure to put reactions in the correct order, as the first matching reaction will be the one that is used

torpid sparrow
#

bc if yes i guess technically you dont need anything

golden spire
#

I think default is just neutral/like

late pewter
#

@worldly sky I vague posted on your mod's comments section, but after a bit of research, I figured out how to fix the "Modded Chickens sleep with their eyes open" bug:
In data/FarmAnimals.json, you need to add the following line item for both colors of chicken: "SleepFrame": 17. This allows your Desert chickens to sleep with their eyes closed like normal animals instead of sleeping with their eyes open staring blankly at the wall of their coop.
I think Vanilla animals don't have this line of code because something deeper in the game engine handles it, but custom modded animals need their sleep frame manually set.