#making-mods-general

1 messages · Page 378 of 1

tender bloom
#

Hmm, I’d have to look into it. Did prismatic pride break or do you just mean compat?

#

More Prismatic Stardew rn is half hand recolored animations in DGA and half FS

#

The FS part is just using FS prismatic features

#

So that should be possible or maybe it already has compat with prismatic pride bc I think those go through the game functions for prismatic stuff

#

The hand recolored animations would be hell to figure out how to do, I think — but maybe I’m too pessimistic

gaunt orbit
#

I thought More Prismatic Stardew had a c# component for some reason, nvm

#

Please ignore me

tender bloom
#

I mean it could! I could write one!

tawdry warren
#

Hey All, finished updating the GitHub and Nexus page! Level Extender now has an update, working with current Stardew! Yay! More updates are planned, QoL features are the main focus. Check it out here: https://www.nexusmods.com/stardewvalley/mods/1471

Nexus Mods :: Stardew Valley

This mod extends your maximum skill levels to 100 and adds experience bars.

#

If someone with that fancy orange name wants to post that in #mod-showcase for me, that would be super epic ❤️

brave fable
#

cool! will my spacecore custom skills work out of the box, or do i need to register them manually?

tawdry warren
#

I have absolutely no idea! (but probably not going to work out of the box, let me know though!)

tawdry warren
#

Appreciate you!

obtuse wigeon
#

Just looking at the unpacked buildings assets and there's brightly coloured RGB versions of the buildings called paintmasks, what are they used for?

brave fable
#

several buildings are paintable from Robin's builder menu; these buildings have an entry in Data/PaintData and a Buildings/*_PaintMask asset, where the order of the fields in their data entry corresponds to a respective R, G, or B colour in the sprite

#

each colour channel has its own paint slider in the menu that's used for chroma-keying in the paint colour you want

obtuse wigeon
#

Ahhh gotcha, I completetly forgot about the ability to paint buildings as I always used replacers, I thought they might've been left over from actually designing the buildings in the first place

brave fable
#

nope! most of the holdover/leftover sprites were removed in 1.6, painting was added in 1.5 i think?

obtuse wigeon
#

Good to know! Say if I want to replace the sprite for the farm house to something that's completely different, What should be done with the Paint mask? replace it with a blank .png using content patcher? or just leave as is?

brave fable
#

i suppose you could blank-out the sprite asset, but you could also remove the House entry from the data asset

#

which would make it unpaintable entirely, rather than paintable to no effect

obtuse wigeon
#

Gotcha, might remove it from the data asset then, takes less space and time

#

thank you!

brave fable
#

good luck! be sure to ask if it doesn't work right hahah

vale holly
#

any suggestions for how one could go about, like, "dynamically changing" a festival?

making a small mod using content patcher with the current gist being:

Enter Event (moonlight jellies) --> talk to existing NPC --> event is triggered with dialogue ($v)

I've gotten through all that fine, and the event itself is done unless I want to tweak anything. The issue is that ideally, it would then go:

Event ends --> back to jellies festival --> change interacted NPC's sprite set & kill dialogue

Impractically, using changeLocation Beach ends up putting you in the festival by triggering the set up again, but that restarts the festival. my first thought was maybe a check for whether the event was seen or not in the festival set-up, and then having the main event set the modded event back to unseen so it's repeatable. I don't think that's possible though, looking at things, so i'm kinda at an impasse. Just using end puts the player on the moonlight jellies map but with no npcs present.

i'd like to avoid C# since I have experience with json and none with C#, but if it's necessary I'd probably look into it since it (should) be a small part of things?

kind sundial
#

i have been using better crafting for a little while an d i installed daisy nikos earthy recolor, and i was deisapointed to learn that there is no built in daisyniko's earthy theme, so i took it upon myself to make a theme for better crafting for daisyniko's earthy. im finished now and would like to upload it but i dont know how or where

#

i mainly ask this becuase it is a theme for another mod and can not just be installed liek a normal mod, you would have to put it in your themes folder

devout otter
#

So perhaps you can ask her to include yours?

left nova
#

From what I understood, you want to trigger an event in the middle of a festival (using $v) and back to festival after the event ends?

obtuse wigeon
left nova
#

I don't think you can bypass the 'set-up' phase, every festivals has to run through set-up phase first.

#

Or you want to do something else?

mortal hatch
#

i need a good idea for a sideways staircase

#

i dont liek how its looking atm

vale holly
# left nova Or you want to do something else?

I guess the "how" doesn't really matter. The goal is just to have the game go back to the festival state, ideally with just the one NPC changed, but worst case scenario "the entire festival is reset but this NPC is changed" is probably fine

left nova
#

Oh you want to have apply changes to NPC after the seeing the event, is that correct?

#

You can use mail flag to track that.

obtuse wigeon
vale holly
mortal hatch
#

i now know why 4 corner farm hides its sideway, ways

brave fable
#

see, you're making a staircase but the start and end points are on the same height, so it's never going to look like stairs

obtuse wigeon
#

I've tried making sideways stairs for my mod but I can't figure out how to make it look good either

mortal hatch
#

the other ones look good

brave fable
#

the reality is it can't work well as-is because the player has to zig-zag up the stairs, which doesn't look or feel right

#

that does actually look really good though lol, stick with that

#

you can also toggle the tile grid with ctrl+G if you think it's distracting, btw

left nova
#

These have sideway steps for you to use.

kind sundial
#

thank u for finding one for me tho

#

❤️

left nova
#

For replacing thing, I think a CP patch with condition like 'HasFlag' should be able to do it.

#

changeLocation as far as I know, can trigger a CP patch with OnLocationChange update.

vale holly
#

Hmm that looks promising, I'll have to look at it a little closer, but I think that could work. Thanks!

brave fable
#

just happened to be looking at the farm cave, figured you'd be happy to know the dialogue selection 9-slice makes a cameo as the bats in fruit cave SDVdemetriums

calm nebula
#

It what

swift belfry
#

Hi everyone! Does someone know an easy way to get an object by its ID from a specified GameLocation? Something that would be like GameLocation.GetObjectById(string)

calm nebula
#

Depending on what you want there may be a method in utilitu

#

But tbh "write it yourself" is probably the easiest

brave fable
#

you probably want something like this```cs
Utility.ForEachItemIn(Game1.currentLocation, (Item item) =>
{
bool looking = true;
if (item.QualifiedItemId == "(BC)164")
{
MyMod.DoThing(item);
looking = false;
}
return looking;
})

lucid iron
#

@formal crown aski here cus it is not directly about 1.6.16 can you elaborate on the usecase for building getting map like layers

#

My confusion comes from the fact that if you make something like the mill but as a map thing you would need to separate the anim elements to own tiles as well so it seems same to me

swift belfry
formal crown
#

Well, all my buildings in VPP are not regular rectangular buildings, so I have to split parts of it in the sprite to prevent clipping, drawing over when it shouldn't etc and use DrawLayers for those parts

#

Map style layers could make easier to deal with this, but I'm open to other easier solutions

lucid iron
#

Ah so the desire is actually make building participate in the map layer draw order?

#

Previously i just fiddled with SortTileOffset until it looks right and so far it work ok

formal crown
#

If that's what it would be called, yeah

#

Yeah but it means using DrawLayers

lucid iron
#

Naw u can set a SortTileOffset for the building

#

Like if the building is supposed to have a 1 tile tall porch you can put SortTileOffset 1 on the building entry no draw layers required

formal crown
#

I'll try it with the Minecart Repository SDVpufferthinkblob

rancid temple
brave fable
#

the blinking effect is just the animation moving over the 9-slice border. incredible

formal crown
#

Unfortunately it's not helping it

lucid iron
#

How tall is the area that shouldn't occlude the player?

formal crown
#

Green part should be drawn over the farmer, red circles shouldn't

#

(Ignore the crow, its part of something else 😆 )

brave fable
#

this seems like an ideal use case for DrawLayers hahah

trim sand
#

crowpocolypse energy

lucid iron
#

Crow house

formal crown
lucid iron
#

Yeah you will need at least one draw layer here no matter what but you can do it without splitting i think

#

The idea is to just draw the overhang again

#

And give building overall SortTileOffset 3

brave fable
#

honestly it sounds far less tiresome than dividing all buildings into layered tiles

lucid iron
#

I'll go try it DokkanStare

brave fable
#

which, having looked at a map once, sounds abysmal

trim sand
#

maps are pain. i say this having made a custom map

brave fable
#

i could never.

formal crown
#

It's easy once you get the hang of it SDVpuffersquee

lucid iron
#

I don't like how many jank there is i tmx

formal crown
#

There's junk inside it?

lucid iron
#

Yeah the various map quirks

#

Some are related to how tmx is not sdv native format

formal crown
#

Looks like SortTileOffset worked for this one SDVpufferparty

trim sand
#

racoon house energy

lucid iron
#

I tried it and it is work

#

@formal crown by doing this u don't have to slice up the building png

formal crown
#

Thank you Chu! SDVpufferwow

lucid iron
#

Main change is the SortTileOffset and switching from drawing a bg layer for the sides to drawing a normal SortTileOffset 0 layer for the roof

wanton pebble
#

Do tokenizable strings work in quickQuestions?

#

Context: I'm finally splitting the first part of the date out for the drinks and I want my options to be the drink names, so it'd be easier than having translators translate the item names in-mod. I'd be doing

quickQuestion What do you want to drink??#Item1#Item2#Item3(break)switchEvent <insert switches here>

and if it wasn't for me going the extra mile and wanting to make sure the farmer is "eating" the proper food, I probably wouldn't even need to switchEvent

#

(If there's a way to store a variable and then use it later in event, tell me that too, because that'd be simpler than what I'm about to do)

#

(Thankfully because most of the code is the same, I'm i18ning then dynamic tokening so my event code looks a lot cleaner)

left nova
wanton pebble
#

got it, so switchevents it shall be

#

(The BETAS stuff isn't a part of the Island date specifically and I'm trying to make sure users can run with just Content Patcher if they prefer.)

mortal hatch
#

what are the meaning of these symbols?

formal crown
formal crown
#

Um, @outer glacier

timid helm
#

Is there a way to make it so when you click on tile it pulls up a text box asking if you want to visit X location, then there being two options of Yes or No. and then when you hot yes it warps you?

sturdy charm
#

hii! i have this problem with my custom NPC and i wonder if anyone knows how to fix it?

#

how do i make it so that she avoids the debris instead?

torpid sparrow
#

where is she going in the forest?

#

i dont think there's a way for NPCs to avoid debris is there....in vanilla they'll just destroy fibre in their path afaik

sturdy charm
#

like next to the big pond

sturdy charm
#

i wonder how can i bypass this

torpid sparrow
#

i think all of here has debris spawning

#

i dont know for sure but the npcs dont usually walk here afaik

#

and not past the big tree toward the left

#

i wouldnt say ur mod is "very broken" 3ohokay

sturdy charm
#

like this area

torpid sparrow
sturdy charm
#

usually i just let it be but i didnt know that them destroying the debris would lose friendship

torpid sparrow
#

you would have to choose a different area for them to g to

#

maybe the top of the lake? or by the river?

sturdy charm
#

dangg really

torpid sparrow
#

im not 100% sure maybe theres something i dont know xd

#

someone else might know but that's the extent of my knowledge

sturdy charm
#

its okay! ty anyways

#

i wonder if theres another mod that could help with the debris

torpid sparrow
#

this maybe?

#

Although that would be client-side i think

left nova
torpid sparrow
#

You could patch that one map area without all the debris...

#

then if someone is adding ur NPC mid-save, they would use RTF to clear the debris?

sturdy charm
torpid sparrow
#

Yeah you would make a copy of that one area of the forest map, delete all the stuff on the paths layer

#

Also not sure if that’s the only thing that controls debris spawning

sturdy charm
#

i think there was this one thingy with an X where the purpose is to not let anything grow on it i think

torpid sparrow
#

[[paths]]

#

not the link

#

well ill go find it

#

oh wait its up there

wanton pebble
#

Is there a way to debug event preconditions?

sturdy charm
#

so in my house file i should include her pathing out there with the rest of the forest and clear any spawning debris?

torpid sparrow
#

sorry i dont know what you mean

#

" include her pathing out there with the rest of the forest" this part

left nova
wanton pebble
#

I didn't realize it had that

#

But actually I figured out the issue and now I'm a little annoyed

#

either with myself for not reading or with the game for a regression

#

For those who know: What is the updated version of the O precondition?

#

Because it isn't Spouse

sturdy charm
#

am i making sense ...

wanton pebble
#

If it has to be GameStateQuery PLAYER_NPC_RELATIONSHIP Current {{Date}} Married, I can deal, but my swap from O to Spouse resulted in the dates not firing

#

(Because, of course, I'm poly married and Maddie was not the main spouse. Sometimes my talent for running into bugs finds a whopper)

torpid sparrow
torpid sparrow
#

no dont do that

#

it would be a separate map file

#

you would make a duplicate of the Forest map file in the game's files

#

and then delete all the debris on there

#

and then patch that

#

i can help more later but i gotta go study rn SDVpuffersquee

sturdy charm
#

ahh i think i get what you mean!

#

thats alrigth, ty so far and gl with studying!!

meager portal
#

Is it possible to add a new interactive TV only with Content Patcher?

wanton pebble
#

Okay, yeah, so thanks to the wiki having the docs as is... I would very much not normally do this but at the least I need clarification

#

@ivory plume What's the difference between the old logic for the precondition O and the new logic for the precondition Spouse? The wiki notes they're supposed to be interchangeable, but the old precondition checks if the player is married to the NPC, whereas the new precondition checks if the NPC is the player's spouse

delicate smelt
#

how to get players some kind of fish catched count?

wanton pebble
#

This breaks things like poly mods where O is actually preferable because the player may be married to someone else, and I know you're going for people using the new preconditions

ivory plume
wanton pebble
#

That... if I have a current version of the mod that shows that's not the case when multi-married (e.g. when multiple NPCs are "married"), can I send that as a repro pack?

#

Because that's definitely not what's happening SDVpufferthink

#

although... perhaps the problem lies in the poly mod

#

Let me recheck for certain precondition checks

delicate smelt
wanton pebble
#

Okay, found it. I see what happened, it's on poly mod end. Thank you Pathos, apologies for the ping

ivory plume
#

No worries!

ivory plume
# delicate smelt i need to get this data to do something,but i dont know the code,c# or cp is all...

Currently you'd need C# for that. Game1.player.fishCaught is a dictionary indexed by qualified fish ID, where each value is an array containing (0) the number caught and (1) the max size caught.

For example, to get how many pufferfish the current player caught:

int pufferfishCaught = Game1.player.fishCaught.GetValueOrDefault("(O)128")?.[0] ?? 0;

Or to get a total of fish caught:

int fishCaught = Game1.player.fishCaught.Sum(p => p.Value[0]);
delicate smelt
wanton pebble
#

Looks like it's a common issue on all poly mods (Aeden/Ender/Apryll). the relevant code for each of them, using Free Love (the original) as the example:

public static void GameLocation_checkEventPrecondition_Prefix(ref string precondition)
        {
            try
            {
                ###(removed some for length)
                for (int i = 1; i < split.Length; i++)
                {
                    if (split[i].Length == 0)
                        continue;

                    if (split[i][0] == 'O')
                    {
                        string name = split[i].Substring(2);
                        if (Game1.player.spouse != name && spouses.ContainsKey(name))
                        {
                            Monitor.Log($"Got unofficial spouse requirement for event: {name}, switching event condition to isSpouse O");
                            split[i] = $"o {name}";
                        }
                    }
                    else if (split[i][0] == 'o')
                    {
                        string name = split[i].Substring(2);
                        if (Game1.player.spouse != name && spouses.ContainsKey(name))
                        {
                            Monitor.Log($"Got unofficial spouse barrier to event: {name}, switching event condition to notSpouse o");
                            split[i] = $"O {name}";
                        }
                    }
                }
                precondition = string.Join("/", split);
            }
#

So long as all three utilize that I can't update from "O" to maintain compatibility, but that's what I'd have to report to all three

ivory plume
#

It would be much more efficient and simpler to patch Preconditions.Spouse instead.

bleak spade
#

I genuinely have no idea how to fix this divide by zero error

#

I don't even know how to identify what tile in what tilesheet is breaking it

tender bloom
#

Is this a map error?

#

If it started happening at some point, you can try going through the changes since that point to find the issue

#

If it’s part of a specific mod, you can try removing mods to figure out which one and then adding/removing bits of the mod to figure out which part is causing it

twilit quest
# sturdy charm hii! i have this problem with my custom NPC and i wonder if anyone knows how to ...

You might recommend that the player download Non-destructive NPCs. Any NPC that runs into spawned items (forage, debris, etc) will have a grumbling speech bubble (though I don't know if this currently results in loss of friendship or not). If they want to avoid that, Non-Destructive NPCs is their best bet. It doesn't mean your mod is broken; it sounds like it's working according to standard vanilla logic.

#

@sturdy charm Link to the current version of Non-Destructive NPCs above.

bleak spade
#

It only happens in a certain area of the map

twilit quest
#

@bleak spade If you'll send me the map you're working on, I can take a quick look at it

brittle pasture
#

and yes, it's a vanilla thing, characters walking over weeds in their path

bleak spade
#

How do I send it to you? @twilit quest

brittle pasture
#

but tbh I wouldn't bother

sturdy charm
timid helm
#

How do I make an iteractable tree in tiled? So that it can be shook

torpid sparrow
#

Paths layer

brittle pasture
timid helm
twilit quest
brittle pasture
#

the game's own C# code

twilit quest
wraith aspen
#

hi everyone, long time lurker here with a question. i recently got into stardew modding and am attempting to make my first mod. at this point i am just attempting to put the objects into the game, but i can not for the life of me figure out how to get my textures to work. i keep getting errors that say the asset i'm trying to use does not exist and i can't figure out why

#

this is what my content.json file looks like currently, and my assets folder

urban patrol
#

just copy paste the target you loaded it to into the texture

wraith aspen
#

let me try that, thank you!

torpid sparrow
wraith aspen
#

that worked! thank you so much!!

torpid sparrow
#

Pusheen SDVpufferheart

wraith aspen
#

yesss i love pusheens and i was inspired by the jojapop labubu mod to make my own blind box mod

#

very new to all this but i'm excited to be trying it

torpid sparrow
#

I thought airyn’s labubus might have been the inspo SDVkrobusgiggle

uncut viper
torpid sparrow
#

I have 1 pusheen item and I got it for 15 dollars at hot topic I remember I felt it was a bad purchase bc it was overpriced but that’s okay….pusheen

uncut viper
#

if you use any backslash at all inside a string, it must be a double backslash in order to escape it

urban patrol
#

oh that’s my bad!

wraith aspen
#

i see, good to know thank you!

uncut viper
#

SMAPI will also normalize asset names to match regardless of slash type, so Mods/MyAsset is the same as Mods\\MyAsset anyway, so you usually dont need to

#

but its important to know for things like furniture where you have to use a backslash

urban patrol
#

yeah i was aware of needing it for like events and stuff where backslashes do matter, good to know that it’s actually SMAPI handling that

ivory plume
#

(Note that it's better to always use / instead of \\ when possible, to avoid the extra string manipulation and allocation to normalize it.)

round dock
ivory plume
#

I'm not familiar off-hand with how events handle music looping; that might be a question for event modders.

round dock
#

Thank you, Pathos SMCPufferHeart

unreal spoke
#

If you're still here, Pathos, I've been wondering one thing for a while: Has anyone ever called you Pat?

gentle rose
#

wait, pathos child - pat ch - patch -- it's been a conspiracy all along, guys

#

pathos IS content patcher

torpid sparrow
#

then....what are you doing when you type patch reload....force reboot of pathos?!

round dock
lucid iron
#

Well he is Cat rn

gentle rose
#

-# pathos left the chat to avoid answering the important questions. your silence is deafening SDVpuffertriumph

sand timber
#

Hi! After I added a custom buff, I started getting this error:

ContentPatcher Can't apply image patch "Earthy Interface > EditImage TileSheets/BuffsIcons" to TileSheets/BuffsIcons: target area (X:0, Y:0, Width:192, Height:64) extends past the right edge of the image (Width:160), which isn't allowed. Patches can only extend the tilesheet downwards.

Did I mess something up?

lucid iron
#

You should not edit the TileSheets/BuffsIcons

#

Just Load your own asset

sand timber
#

You're the best chu

wraith aspen
#

another question, i decided to turn my assets into sprite sheets to make the process a bit easier, do i need padding in between sprites? and if so how much?

lucid iron
#

If they are item sprites then you need em in 16x16 boxes no padding

#

Whether your item use the entire box is your business

wraith aspen
#

theyre items and the images themselves are 16x16 yeah, ok thank you!

cosmic pendant
#

Hii, I need some help replacing Jas's avatar and portrait to a custom one I made, i think its the json files but im not sureSDVpetchickenw

#

I was trying to follow a tutorial but I think i messed up on certain areas

dapper crown
#

Hey, it's not my mod, but does this seem like the kind of issue that could be resolved by rebuilding from source?

lucid iron
#

Do you have the source

dapper crown
#

It's available on his github under MIT

#

Okay no, rebuilding doesn't help at all. Time to learn how harmony works, i guess

lucid iron
#

You just need to update the bit of reflection

dapper crown
#

Thanks, that was simple enough. Just needed to specifiy the parameters for the wrapped overload to disambiguate

mighty quest
#

when adding ClickableComponent to IClickableMenu, does anyone know if the component coordinates should be relative to the parent menu, or relative to the whole viewport?

raw oxide
#

hello is there a way to make seasonal sleeve ?

calm nebula
raw oxide
dusty scarab
#

nevermind, I was looking at the wrong input

timid helm
#

How does the water need to be animated in Tiled to match the base game water?

tender bloom
#

The animated water is drawn separately

#

You just need to make sure the tiles have the correct tile properties to get the overlay

#

For the “sloshing” animation, this is purely at the edges of the water

#

And corresponds to animations on the edge tiles of the edge of the water

#

You can see the water overlay sprite in Cursors (under LooseSprites)

timid helm
lucid iron
#

I think you should take a look at vanilla outdoor maps

#

It should illustrate what is going on with water

timid helm
latent mauve
#

The in-game water overlay is drawn in the game, not in Tiled

timid helm
#

Oh

latent mauve
#

The instructions above tell you what to set in Tiled so the game knows to draw it

timid helm
teal crest
raw oxide
#

thank youuuuu

latent mauve
#

There is a tile property named Water that needs to be set on your Back layer if it is not already saved to that tilesheet file itself like in the vanilla tilesets

timid helm
raw oxide
#

i know that npc can change outfit seasonally, same with building but could we make the body or more the clothe seasonal that the question ?🤔

teal crest
raw oxide
#

i tried this for example :
"Action": "EditImage",
"PatchMode": "Replace",
"Target": "Characters/Farmer/farmer_girl_base, Characters/Farmer/farmer_girl_base_bald, Characters/Farmer/farmer_girl_mannequin, Characters/Farmer/farmer_girl_mannequin_cursed",
"FromFile": "assets/Sleeve/{{season}}_Sleeve.png",
"FromArea": {"X": 96, "Y": 0, "Width": 192, "Height": 672},
"ToArea": {"X": 96, "Y": 0, "Width": 192, "Height": 672},
"When": {
"Sleeve" : false,
"Seasonal Sleeves" : true

latent mauve
#

You might be able to get away with a different value but I know T works as intended, and I makes it not render the overlay

teal crest
timid helm
raw oxide
#

Okay i'll try

royal stump
timid helm
royal stump
#

just in game

#

some animations are made in Tiled itself, but the water effects are something Stardew does

teal crest
# raw oxide Okay i'll try

the image updated when day begin(without specific order), so cheated season change don't show new image by default

timid helm
dapper crown
#

Im fighting my way through yet another mods source right now, and I replaced some hardcoded assembly references inside the .csproj files with the reference to Pathoschild.Stardew.ModBuildConfig, but because two of those aren't actually mods and don't contain a manifest.json file the build for these libraries fails: [mod build package] The mod's manifest.json file doesn't exist.
Is there a way I can use that package to reference the correct assemblies without it expecting to build a mod, but just a library for multiple mods?

#

Nevermind, as usual I assumed it would be a niche thing with no documented workaround, when all I needed to do was tell the package not to zip or deploy the mod:

<PropertyGroup>
  <EnableModDeploy>false</EnableModDeploy>
  <EnableModZip>false</EnableModZip>
</PropertyGroup>
tender badger
#

anyone has experience with event code?
i see on wiki: shake <actor> <duration>, but we cant actually use this to shake farmer. is there a way to shake farmer too?

brave fable
#

yep, you'll want to use startJittering and stopJittering SDVpufferthumbsup

tender badger
#

@brave fable just saw u asked about this 10/23/24, 3:46 PM!! 😄 thanks!!

brave fable
#

i'm working to end generational shake farmer trauma 😌

neon bough
#

Has anyone had trouble/experience assigning their custom NPC to a door in a Custom Location? I’ve done the [Buildings Action: Door NPCname] in Tiled and it works for all other characters aside from my NPC 😭

brave fable
#

just to be sure:

  • your tile action is simply Action Door NPCName, without including Buildings in the action?
  • your tile action, when selected, has its X, Y, Width, Height values all as whole-number multiples of 16 (ie. aligned with the grid)?
  • your door placeholder tile is on the Buildings layer?
  • your NPCName value is your full NPC internal name, including mod ID as-is (eg. blueberry.MyMod.MyCoolNpc?
#

(assuming your NPC's name includes your mod ID, which it absolutely should)

timid helm
#

How do I make a map for my custom area?

hard fern
bitter hare
#

I was playing with the date night mod with the suggestive endings turned on. Do note that I'm playing with a portrait mod, so as the event progressed and the suggestive part played out, my spouse suddenly reverted back to his original portrait. The mod adds new expressions and such so I did draw new portraits to fit the portrait mod I had, but it still keeps showing the original portrait of my spouse. Any way to fix this?

neon bough
tiny zealot
#

oh yeah you can't use content patcher tokens in Tiled

neon bough
#

Lessons learned 😅🙃

rich linden
#

is it possible to change a furniture's source rect permantly in code? when I do it, it resets after I move the furniture or place it, so I'm nedding to update it every frame

latent mauve
#

Can't use any CP tokens in Tiled at all, if you want to do that, you have to do it through the code instead

timid helm
brittle pasture
#

[[Modding:Location_data]]

brittle pasture
brave fable
#

the default source rectangle is read from the Data/Furniture asset each frame, so the simplest method would be to update the data rather than the instance

#

this would affect all instances, though

#

what's your goal?

rich linden
# brittle pasture why can't it be transformed into a new item?

I'm changing how the game calculates the source rect for rotations, it works fine, but when I move/place the furniture the source rect updates back to the normal one
edit: basically I want to change the source rect of an instance only once (or only when some action with it occurs, not every frame)

brave fable
#

[[Modding:Dialogue]]

brave fable
#

you'll find them all if you search for $ SDVpufferthumbsup

brittle pasture
rich linden
brittle pasture
#

yeah, sometimes harmony is the cleaner solution
you can maybe do it on farmer inventory changed + furniture added to location, but eh

rich linden
#

ok thanks I'll try that, I was kinda scared of doing harmony by reading the wiki

foggy marsh
#

ive looked at a bunch of event making guides but none of them are telling me where exactly i should put the code? 😭 like do i put it in an existing file like content.json or do i make a new json

brave fable
#

it's up to you SDVpufferthumbsup you can put your entire mod in content.json if it's still readable and maintainable, or you can use Include actions to separate it into smaller, more manageable files

foggy marsh
#

ooh okay so there's nowhere specific i need to put it

brave fable
#

yep, CP just reads as many Changes entries {} as you've added across your content.json and included files

#

one thing that does matter is the order they're added in though, since CP parses them top-to-bottom, so earlier edits can be overridden by later ones if targeting the same asset (with the same (or later) priority)

#

when targeting entirely different assets the order doesn't matter, of course

foggy marsh
#

i'll try to have a little bit of organisation then

#

putting it in a different file

brave fable
#

not exactly, but they all follow the same order -- row-by-row, top-to-bottom, starting from $0 -- so the first portrait is $0, right of that is $1, then $2, ...

foggy marsh
#

is there a way to move farmer in increments in cutscenes? -3 looks like this, but -2 makes them sit too far forward, on the ground. i just want them to be sitting on the chair (aside from that everything works!)

#

or am i maybe using the wrong sit animation

calm nebula
#

Position offset

#

Or smth lkke that

wanton pebble
#

Just to make sure - the "-3" and "-2" - are those-

#

Yeah it's position offset

calm nebula
#

Which is in pixels not tiled

wanton pebble
#

I've been having to do that for DNR

#

let me grab a quiiiiiick example that I just recently did

calm nebula
#

Do not resuscitate?

foggy marsh
brave fable
#

could you use doAction to sit on the bench SDVpufferthinkblob

wanton pebble
#
faceDirection farmer 0/pause 300/positionOffset {{Date}} -10 -0/pause 250/playSound dwop/pause 200/speak {{Date}} \"%[CharacterName {{Date}}] leans their head against your shoulder.#$b#Can we stay here for a while, @? I just want to watch the sunset with you.$l\"/pause 200/emote farmer 20/pause 200/positionOffset farmer 10 0/playSound dwop/pause 200/globalFade/
#

Date Night Redux XD

calm nebula
#

Sorry, bluebs, my right click action is vest knitting

wanton pebble
#

I believe -16 is the equivalent of -1

#

so -10 is basically "partial"

foggy marsh
#

i'll try that!

wanton pebble
#

for you, to move them down, it'd be...

#

positionOffset farmer 0 10/

#

obviously, you can try any number from 0-16 (or even higher)

calm nebula
#

Keep in mind once you position offset

wanton pebble
#

But down increases Y coord

calm nebula
#

You need to warp them back on the grid to successfully use move

foggy marsh
#

they don't move after that so i should be good

wanton pebble
#

I am suddenly so incredibly glad I don't have my characters move after position offset

calm nebula
#

You can also use advance move

#

Or knit a vest

wanton pebble
#

Knitting a vest sounds more enjoyable than troubleshooting advancedMove XD

foggy marsh
#

i'd prefer to avoid anything "advanced" for making my first mod lol

calm nebula
#

Nah it's not bad and is the move controller that works better ngl

vernal crest
#

Managing movement in events is mostly a case of patience and a willingness to experiment ime

wanton pebble
#

When you have the time and patience, advancedMove is your ally

#

When you don't or you end up in one of those advancedMoves where your character decides "fuck this shit I'm out".... it can be hair-pullingly infuriating

#

I've used advancedMoves in events - my Pika's dates in my Personal version of Date Night uses it

hard fern
#

😔 once made my farmer walk off the map, softlocked the whole event, had to start over

tiny zealot
#

advancedMove my beloved

quartz mica
#

anyone know what the dimensions are for shirts and hats?

brave fable
#

only once??

wanton pebble
#

but when I made the Island date I was like "yeah I can't deal with this too much right now"

hard fern
#

ive only bothered actually making One singular event SDVpufferwaaah

brave fable
#

shirts are 8x32 (4 frames above one-another, front-right-left-back)

wanton pebble
#

"Hhhhrrgghhh....#$b#%Cauthen fell asleep during the movie."

hard fern
#

dialogue breaks need # on either side of the command

#

uh

foggy marsh
#

i accidentally did this earlier too 😭 made me giggle though

tiny zealot
#

in a dialogue string, # is the delimiter between entries. $b and $e are commands and must begin an entry, so they must follow a # character, and neither of them takes any parameters so you just end the entry immediately with another #

tiny zealot
brave fable
hard fern
#

cribbles..

quartz mica
tiny zealot
#

yes, the { character is how $b actually works (it appends that character to the end of the previous string).
the dialogue display code checks for that character to do the box breaking

brave fable
#

i'd open hats and tell you but ps is having a moment since i've sliced cursors into about 2000 chunks

hard fern
#

hats are Weird

brave fable
#

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.

quartz mica
tiny zealot
#

it looks like you might be misusing $1? are you trying to get dialogue to display only once and then be replaced with a different dialogue when that key is selected again?

#

okay then you probably want
"Hhhhrrgghhh....$1#$b#%Cauthen fell asleep during the movie.",
(portrait selections must come at the end of a dialogue entry)

calm nebula
#

Hats are not weird

#

Shirts are

tiny zealot
#

a mouse told me to tell you that hats are Good, Actually and you should buy some

brave fable
#

shirts are perfectly normal so long as you don't think about sleeves or the spritesheet size

quartz mica
brave fable
#

which reminds me i lied about the spritesheet size, it needs to be 256 wide even if your shirt is only 8px wide

tender bloom
#

Sleeves aren’t real and they can’t hurt me

#

Particularly not the 3 random slingshot frames

quartz mica
#

h

brave fable
#

the game expects that if your shirt's dyeable that there's a greyscale copy of the shirt at 128+x, y in the spritesheet, where x y are the values of the regular shirt sprite

quartz mica
#

I'm making a reskin for the fishing vest/hat, just a lil color change to suit me better

brave fable
#

otherwise you get weird sprite clamping artefacts on your shirt when worn, even if the shirt isn't dyeable

quartz mica
#

I love putting myself through agony and torture for the sake of reskins

brave fable
#

ah in that case don't worry about it, you can just use the dimensions of the shirt and patch the region in the original spritesheet

#

only new shirts need worry about this

quartz mica
#

just gotta figure out the dimensions for where it needs to go

brave fable
#

you can open up shirts.png in Paint or anything similar and hover your cursor over the top-left pixel for the shirt and you'll get the X Y values

#

width and height are of course 8 and 32

mellow tinsel
#

y

tender bloom
#

(Nowhere else in the game are they 8 and 24, of course)

#

Because this happened to be the size CA felt was best for shirts

#

Presumably

#

Like it does fit perfectly onto the farmer body

#

And it doesn’t “waste” extra spritesheet space

calm nebula
#

Can't you have a fourth shirt frame if you want

#

I thought it was 8x32

tender bloom
#

Based on some of the tilesheets in the maps I suspect CA used some kind of tool to help pack tilesheets

#

Idk for sure though it could be like just xnb works or something

brave fable
#

oh yeah i have the stupid it's 32

#

i even wrote out that there's a distinct left frame and not just flipped-right

calm nebula
#

No worries! I used my 10th grade physics to make that calculation

#

(Jkjkjkjkk SDVpufferheart )

brave fable
#

knew i should've gone for 4-unit maths SDVpufferpensive

calm nebula
#

(Can't use the math brain. The math brain is this:

#

Tbh i think the nth grade physics joke has gotten stale but I'm also too tired to come up with something new

#

So probably I'll go back to being atraknits

tender badger
#

random question - has anyone seen events where multiple NPCs talk one after the other? how do you avoid having to click mouse twice between their lines? (1 click removes text windowof NPC, 1 click to open the window of the other NPC). id like to click once and move on to the line of the 2nd NPC.

quartz mica
#

we're so back

tiny zealot
tender badger
#

sorry i meant that clicking once will immediately open the second dialog box, instead of having the 1st one close

#

(or is this not possible?)

tiny zealot
#

ah, i see. no, you can't switch speakers in the same dialogue box. you have to watch the close and open animations (and wait a mandatory 500 ms)

#

(anything is possible with determined application of C#, so it could be done. but i don't know of any implementations)

tender badger
#

got it, thanks ichortower!

upper forum
#

So, I have an odd question- I'm super new to modding, and am trying to tweak an existing custom NPC mod to include indoor/outdoor outfits. Is that breaking some kind of taboo if I'm editing their code for personal use? I don't want to be asking for help if it's considered rude to be editing other folks' code like this

torpid sparrow
#

Personal, not uploaded -- no

#

You could ask the original author if ur worried

upper forum
#

yeah definitely not uploading it! 😅

devout otter
#

(There are some taboo that would make people a lot less inclined to help, even for personal editing, but just indoor/outdoor outfit editing is fine.)

upper forum
#

Oh yeah not trying to do anything that's like, messing with the characters in any way or anything untoward, just want them to have indoor/outdoor outfits to fit with the other NPCs lol

#

I know that Content Patcher doesn't recognize if a character is indoors or outdoors by default, so I tried a dynamic token, but it doesn't seem to be working at all. SMAPI keeps telling me it's not valid JSON

round timber
#

!json

devout otter
#

The simplest way is to do the Appearance system, but this also depends on how the original NPC is setup. What's the NPC?

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.

upper forum
#

I added this in:

    //Checks whether the character is inside or outside, for winter outfits.
    {
        "Name": "IndoorVariant",
        "Value": "Indoor",
        "When": {
            "IsOutdoors": "false",
        }
    },
    {
        "Name": "IndoorVariant",
        "Value": "Outdoor",
        "When": {
            "IsOutdoors": "true",
        }
    },
],```
and then edited the sprites section to include that value:
```    {
      "LogName": "winter sprites",
      "Action": "EditImage",
      "Target": "Characters/Juliet, Portraits/Juliet",
      "FromFile": "assets/{{Target}}/Juliet_winter.png",
      "When": {
        "Season": "winter"
      }
    },
    {
      "LogName": "winter indoor sprites",
      "Action": "EditImage",
      "Target": "Characters/Juliet, Portraits/Juliet",
      "FromFile": "assets/{{Target}}/Juliet_winter_indoor.png",
      "When": {
        "Season": "winter"
        "IsOutDoors": "false"
      }
    },```
#

But I'm very new to this so this is mostly me examining other mods that do the same and trying to copy what they do haha

devout otter
#

(Also yeah, please do what Vinilla/the Governor said for json sharing.)

upper forum
torpid sparrow
devout otter
#

(There's no proof otherwise.)

ocean sailBOT
#

I sure do love making mods!

uncut viper
#

you've not put a comma after line 224

tiny zealot
#

even if the original NPC isn't using the Appearance system, for indoor/outdoor outfits i recommend using it over trying to get Content Patcher's tokens to do so

devout otter
#
  1. You need a comma after line 224, like Button said.
  2. You need an "Update": "OnLocationChange", on that Action because otherwise the patch would only check the condition when you wake up.
  3. Also recommend what ichortower said, instead of doing OnLocationChange
modest heart
#

hey guys, im in over my head here lmao

#

all for my personal game of course

uncut viper
#

its a C# mod, so you cant if you dont know how to get the source and recompile it with your changed edits

#

which will require C# code

modest heart
#

fun, yeah

brittle pasture
#

tbh I would just rewrite this to actually read game data instead of hardcoding every villager

uncut viper
#

theres also no source available so it'd be a decompile, which is a bit messier to work with

upper forum
modest heart
#

i mean im a neet atm (medical leave) so no better time to start learning coding lol

uncut viper
#

(the gift tastes are also hardcoded SDVpufferthinkblob)

#

i would agree with selph here

brave fable
#

incredible

brittle pasture
#

oh nice, there's the source

modest heart
#

A

brittle pasture
#

but yeeeaaa

uncut viper
#

even if you expanded this list the same way they did, it'll be completely busted as soon as you have any other mod that changes an NPCs gift tastes

brave fable
#

wonder why he chose to do it this way SDVpufferthinkblob

devout otter
modest heart
#

i mean i wont be changing my list anytime soon, let alone gift taste mods

#

famous last words from a skyrim modder

uncut viper
#

i mean changing gift tastes is incredibly common even in mods that are not just a "gift taste mod"

modest heart
#

yeah, very true

uncut viper
#

such as sve, ridgeside, and east scarp

devout otter
#
Stardew Modding Wiki

If you want to add seasonal outfits for your NPC, there's two ways you can do this: the token way or the Appearances way. Appearances is a new code structure added in SDV 1.6, so if you're looking at an older NPC's code for reference, they'll most likely be using the token way. The main difference between the two is that the token way is simpler...

modest heart
uncut viper
#

i just noticed theyve committed all their references

#

like, all the other .dlls

modest heart
#

i thought it would be a good semi learning take things apart and add things to code to learn how but maybe this is too big of a mod to try haha

uncut viper
#

bc theyve committed their entire bin/Debug folder

modest heart
#

right after i already decompiled it haha

#

i hate github

brittle pasture
#

I guess you're gonna have to decide which is quicker - manually fill in every single modded SVE/Ridgeside/ES NPC and the items they add, of which there are dozens, or learn how to programmatically do things so it works once with every NPC forever

modest heart
#

which would be quicker in your expertise(s)?

hard fern
#

SDVpuffersweats i couldnt imagine doing it all manually

#

that sounds cursed

brittle pasture
#

well I like to think I'm an expert and I've been doing this for months, so the latter. But I can't speak for your own skill level SDVpufferlurk

lucid iron
#

i think u should do what feels fun wew

upper forum
modest heart
#

i am level 0 i havent touched c# ever

upper forum
#

But seriously thanks for the help lol

uncut viper
#

manually filling them in would definitely be quicker if you're starting from 0 coding knowledge

#

however, every moment of it will kinda usck

lucid iron
#

maybe learning C# will be fun too who knows

uncut viper
#

suck*

modest heart
#

thing is idk how to even start tweaking it manually haah

#

like how to make it hook into the mods

#

if thats the right word

uncut viper
#

you dont, if you're doing it the same way they did

#

theirs literally does not hook into any mods or even hook into the vanilla game

#

they filled it out by hand

modest heart
#

do i have to figure out item numbers?

#

ohhh

uncut viper
#

yes, you'd likely use Lookup Anything for that

modest heart
#

then after that all i have to do is figure out how to save it as a dll right?

uncut viper
#

correct, you will need to compile it still

tiny zealot
#

(if you have lookup anything, what is this other mod doing for you?)

modest heart
#

i dont have it lol

brittle pasture
#

modded item is doom nvm I misread nvm I did not misread

uncut viper
#

well you dont HAVE to use Lookup Anything

#

i just thought itd be easiest

#

and just assumed everyone had it

#

otherwise you have to find where each mod has its gift taste patches stored

#

and learn how to parse gift taste data

upper forum
#

...ohhh, did more reading in the link. "isoutdoors" is part of the appearance system. So I didn't need dynamic tokens, the game recognizes them all on its own now

#

thanks for all the help, folks!

rocky copper
#

Hey, can you use a custom Player Stat in the "When" part for editing data in Content Patcher?

uncut viper
modest heart
#

ill use it to look up the items yeah lol

uncut viper
#

Outdoors is the appearance part

#

IsOutdoors is not part of the appearance system

upper forum
#

oh! I thought it wasn't. I might've found outdated advice when googling this lol

uncut viper
#

dont google and instead go to the content patcher docs

lucid iron
uncut viper
#

EMP does do this

#

and is the only way to do so

upper forum
#

...ah. Yeah this might've been outdated advice lol

lucid iron
#

oof

modest heart
#

so to start it manually i can just copy paste the .cs into vscode and go from there?

#

and do i need to do anything else for it to work

#

or just edit the npc one

brittle pasture
tiny zealot
brittle pasture
#

it's weird, like they are reading object data lol

modest heart
#

those mods can get kinda overwhelming to look at lol

tiny zealot
#

consider me baffled. i do not understand the decisions this mod made

brittle pasture
#

with the effort you're going to be put into making this mod work with modded NPCs/items you may as well reach out to the creator for a pull request

modest heart
#

no idea what that even is

brittle pasture
#

this is beyond "personal modification" territory

modest heart
#

is that the github thing where they send over the whole code

uncut viper
#

a pull request means "i have made changes to your code, would you like to incorporate them into your repository for me?"

modest heart
#

ah

#

yeah screw this rip a great mod

lucid iron
#

I mean u can make personal edits and just use it

modest heart
#

if even modders are baffled at the choices made here i have no chance

uncut viper
#

we're not baffled by how to like, edit it

lucid iron
#

But it's like, easier to rewrite the mod wholesale now

uncut viper
#

just baffled at why its constructed the way it is

lucid iron
#

Probably fits under 200 loc

brittle pasture
#

yeah my point is a personal edit is fine, but the effort is that you should also send it to the creator if you get it working

modest heart
#

ohh

#

do i need to edit the schedules too?

#

im not sure where that is located

tiny zealot
uncut viper
#

yeah, but thats differnt from us not understanding how we'd edit it

#

that is what i would call "baffled at why its constructed the way it is"

brave fable
#

fwiw i've just about got it working

#

interestingly there's no manifest.json or modbuild package reference either

tiny zealot
#

yeah button, exactly. just adding more... context? phrasing?

golden basin
#

I hate to butt in? but my tokens to make a dynamic season override for my locatio isnt working

uncut viper
#

have you a json to share

golden basin
#

yeah one sec im typing slowly today i just put on false nails

#

content json

#

wait

#

i see

#

cant have season as theres a global token

brittle pasture
#

I think your problem is you're using Season which is already a-

#

yeah lol

uncut viper
golden basin
#

it works!!!!!!!

modest heart
#

orrr

#

just looking at the gifts

modest heart
#

i could skip the modded items and just add the npcs

golden basin
#

now time for weather

modest heart
#

they all like vanilla items anyway lol

#

just to double check the only thing i need to edit is the npc data provider file?

brittle pasture
#

yes, that file, you'll need to insert entries corresponding to the modded NPCs (their IDs will likely have more stuff in them, not just their names)

brave fable
#

pls dont im working on it lol

modest heart
#

perfect, thats what i came to ask help for, how do i add them so the mod reads their schedule? and the mods in general

brittle pasture
#

oh nice (re: blueberry)

#

nerd snipes work

golden basin
#

weather works now too

modest heart
#

?!

#

blueberry is working on it now instead?

brittle pasture
#

if I'm reading it right yes

modest heart
#

oh thank god

brave fable
#

beet borger

modest heart
#

lmao

#

im so excited

#

lol

brave fable
#

it still manually parses schedules in a funny way

#

and needs i18nisation

modest heart
#

oh wait i cant even mess around since idk how to recompile it into dll

#

lol

#

i wanted to just mess around with added npcs

vital lotus
brittle pasture
#

they're editing a C# mod

vital lotus
#

ah icic

modest heart
#

ugh, stupid csc.exe window just flashng then going away

#

wait nvm

#

nvm the nvm i cant compile it

brave fable
#

i suppose it's on the author whether he wants to merge it or not, but if it looks good and goes through then someone else might want to submit a PR to cover i18n and schedule parsing

modest heart
#

could you send it here or would that be distributing?

brave fable
#

it's probably best we wait and see if the author wants it at all

modest heart
#

itll be months

brittle pasture
#

you can pull it and build it yourself

brave fable
#

the mod's only been out for a week or two SDVpufferthumbsup patience

modest heart
#

i also need to do that for another mod to fix smapi yelling apparently

brittle pasture
#

clone the repo, open it with visual studio and build probably

#

if you don't know what github, visual studio or C# is it can/will be a learning experience

brave fable
#

i'm sure i was doing something today SDVpufferthinkblob sniped again

modest heart
#

sending it to me in dms

#

lol i cant open cs because the terminal wont stay open

brave fable
#

yeah you can't do that hahah

#

in any case while the mod is licensed under GPL3.0, i'd still rather wait for the author to give the go-ahead and merge

#

and i'm sure you can too 🎂

#

after all, it's entirely possible they hardcoded everything to avoid having a popup every day for someone with a hundred modded NPCs, or to only show a handful of specific non-lategame non-secret loved items

modest heart
#

this is such a waste of time for me

#

but

#

whats the .net you need to use c# on vscode?

lucid iron
#

you can use any but need to target net 6

modest heart
#

i have it but it says i need a sdk

lucid iron
#

yep go install net 6 sdk

oak umbra
#

Starting to teach myself how to code and was wondering if anyone knows a good tutorial for adding a new building to the game

uncut viper
brave fable
#

i do not look at curse. it does not exist 😌

brittle pasture
#

aka are you looking to use C# or just content modding

lucid iron
#

this section is the basic add building into game

#

what does the building do tho

modest heart
#

the items are working! but theres no way to see when theres two birthdays at the same time

#

*the second character

brave fable
#

yeah i figured that was out of scope of a simple de-hardcode fixup commit

#

the author builds a list of all npcs with birthdays, but only uses the first

modest heart
#

also the text runs out of the box when its too long

brave fable
#

see this is why i don't make mods

#

and never ui mods

lucid iron
#

are you sure

brave fable
#

absolutely

lucid iron
#

suspicious

hard fern
#

wow i cant believe youve never made a mod with a ui thing

brave fable
#

no orange name. no play game. no shame 😌

tender badger
#

anyone knows how to use the [continue] parameter of move properly?
id like for an NPC to walk left then up, all while something else is happening.
but when i do move NPC -10 0 3 true move NPC 0 5 0 true the second move is just ignored.
is there a way to do this? because i think advancedMove doesnt support such parameter either...

teal crest
#

advancedMove works simultaneously in default

tender badger
#

o i didnt know this! thanks!
i tried out another method that also works- u can seperate the "action chunks" with waitForAllStationary. seems to work for what i was looking for! ill try out advanced move tho~

teal crest
#

advancedMove NPC false -10 0 3 1000 0 5/ as like

#

Need to stopAdvancedMoves when you want

modest heart
#

github questoin

#

i only want to pull and build this mod, when i download the whole folder it shits

brave fable
#

ah yeah you can't clone a single project, you have to pull the whole solution

modest heart
#

i have the whole solution and two ro three mods dont clone

#

thers a error

brave fable
#

is the error more detailed than it shits

hard fern
#

im sorry that made me laugh

modest heart
#

lmao its fine

#

uhh

#

vs code terminal is super overwhelming lemme see if i can try to read it

#

Invalid expression term '[' [C:\Users\glitt\Documents\Krobus\StardewValleyMods\KrobusSellsLargerStacks\KrobusSellsLargerStacks.csproj]

#

and

#

Syntax error; value expected [C:\Users\glitt\Documents\Krobus\StardewValleyMods\KrobusSellsLargerStacks\KrobusSellsLargerStacks.csproj]

hard fern
#

huh

modest heart
#

i ahv no idea what im doing i jsut want these stupid mods to work lmao

brave fable
#

out of interest, are you actually able to build and debug these mods using VSCode? typically people use VSCommunity

modest heart
#

i have no idea what vscommunity is

brave fable
#

true true

modest heart
#

i just saw that someone rebuilt a broken mod and it worked

#

the smapi error

lucid iron
#

this class is changed in 1.6.9

brave fable
#

which is a newer language feature

modest heart
#

ilu

modest heart
#

one more question

#

when i decompile a mod i have exported to vs but it doesnt open

#

using dotpeek

#

theres no github for this mod

brave fable
#

i'm not sure i understand SDVpufferthinkblob

#

incidentally, ilspy is generally preferred over dotpeek, though it probably won't change whether or not you get usable output

oak umbra
oak umbra
lucid iron
#

you don't need C# then

#

is the building a farm building or a location somewhere in the world

lucid iron
ocean sailBOT
#

Making mods can be broadly divided into two categories:

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

lucid iron
#

[[modding:maps]]

lucid iron
#

you can do what you want with just a content patcher mod

#

and ofc u can load and edit the same data with C# if you want

oak umbra
#

Thanks

oak umbra
left nova
#

C# mod if you want to do magic trick, aka things that Content Patcher can't do normally.

lucid iron
#

even if you are in C# it's better to do stuff via content if you can

urban wigeon
#

If you are not familiar with programming Content Patcher is so useful, I know programming but I found CP very powerful, its definetely easier

fading walrus
#

Unless you really really want to do something that can't be done with C#, a content pack is the way to go 90% of the time

left nova
#

First time learning C# here, and I want to replicate Emily's Outfit Services at Desert Festival as event command.
I already unpacked the SDV game code I can't seem to find the code of it anywhere.
If anyone know how to do or guide me to it, it would be appreciated.

#

Also is it too hard of a project to add an event command like that as a first time learner?

urban wigeon
#

You can check StardewValley.Locations.DesertFestival in the code

#

It took me some time to find it tbh haha

royal stump
#

performTouchAction, GetMakeoverEvent, and ReceiveMakeOver seem to be the relevant bits
this specific event may be difficult to replicate without much C# familiarity, mostly given how much it does, but registering a new event command is relatively simple by itself

urban wigeon
#

also check Makeoveroutfits.json in Data, i think its related to that specific event, but its mostly just the combinations

royal stump
#

...ah, yeah, this has quite a few components SDVpuffersquint

vale holly
#

do (non-mail) mail flags only trigger content patcher When statements with a day change? that's what im experiencing at least—event adds a mail flag (just replaces linus' sprites with a big red square for testing), but it only takes effect when reloading the mod with the smapi console or the next day.

royal stump
vale holly
#

oh that should work perfectly, thank you. figures it just wasnt where i was looking in the github

royal stump
#

SDVpufferthumbsup (I still always assume it's in the token page)

urban wigeon
royal stump
#

I'm not really familiar with cross-mod config stuff in general, but CP never updates conditions or token values outside of those specific events

#

in C# you can invalidate an asset whenever you want, but any CP-applied edits will still have the same results until the set update times, etc

urban wigeon
#

Yeah I think I will just ask the person who downloads the mod to do the setup before creating a save :p

#

too much trouble for something that will probably be just changed once or twice

royal stump
#

SDVpufferthink only took me 9 months to notice this problem with my docs

The Esca.EMP_SaveLoaded trigger happens when the player creates a new game or loads a save. Note that this does not happen when a save is first created or loaded

hard fern
#

🤔

dapper crown
#

Is there a way to simulate tool use during the fishing minigame without harmony patching? Here's how the game's BobberBar update function determines whether or not the bar is supposed to go up or down:

buttonPressed = (Game1.oldMouseState.LeftButton == ButtonState.Pressed || Game1.isOneOfTheseKeysDown(Game1.oldKBState, Game1.options.useToolButton) || (Game1.options.gamepadControls && (Game1.oldPadState.IsButtonDown(Buttons.X) || Game1.oldPadState.IsButtonDown(Buttons.A))));

The harmony-based approach im aware of involves forcing isOneOfTheseKeysDown to return true for the specific arguments provided, but might it be possible to just set some button state?

lucid iron
#

Tbh i feel like doing a harmony transpiler on this block is easiest

#

You can possibly take over the InputState instance while menu is bobberbar

dapper crown
opaque field
#

in a cream cheese 'churn' would it make more sense to have milk as the required item or vinegar? (so close to forgoing the vinegar to simulate real cream cheese making and just have it be milk)

brave fable
#

don't let realism get in the way of fun SDVpufferthumbsup i'd say milk as the main ingredient since it can come in different flavours and qualities

opaque field
#

sweet ty!

royal stump
#

on new game or load; I just accidentally copied that note from the TimeChanged event SDVkrobusgiggle

timid helm
#

How do I make a change to a vanilla map for my mod?

vital lotus
whole raptor
#

!mapmaking

ocean sailBOT
#

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

  1. Use Tiled to edit .tmx or .tbin files.

  2. Refer to the Maps wiki page for details on how maps work in Stardew Valley.

  3. Content Patcher allows you to create custom locations through editing Data/Locations

  4. Vanilla Maps can be edited via Content Patcher as well: EditMap

hard fern
#

[[Modding:Maps]]

vital lotus
#

Well there u go SDVpuffersquee

gentle rose
devout otter
#

Can we do something like this? "When": { "Merge: {{Roommate}}, {{Spouse}} |contains=Krobus": false, }

hard fern
#

"aiming to", 😅 so does it actually succeed...?

gentle rose
#

who knows lmao

gentle rose
lucid iron
#

Is there a marry krobus

gentle rose
#

not that I'm aware of, which is why I ask

devout otter
#

Krobus is just an example. Basically I'm just curious if I can check an NPC is not a Roomate and not a Spouse without using two lines of When entries or a Query.

gentle rose
#

ah, I see

lucid iron
#

Yep that's how u do it SDVpufferthumbsup

#

You can also store the Merge as a DT

devout otter
#

Oh that's handy. Thanks!

inland rain
#

Pet Clothes (I gave her a blue collar)

spice agate
#

Hello everyone.
How do you generate SmallFont, SpriteFont's json. It kinda looks like .fnt format but in json. Is there easy way to generate this file?

hard fern
#

blehh i dont want to write questions in my event SDVpufferflat

brave fable
#

the format exported by StardewXNBHack can't be repacked into an XNB with XNBCLI, so if you're working with the unpacked game files you'll need to convert them somehow

devout otter
#

If a Dynamic Token has multiple values, you can fulfill a When by having just one of them, right?

brave fable
inland rain
# spice agate Hello everyone. How do you generate SmallFont, SpriteFont's json. It kinda looks...

I think we actually did this one time for right-to-left experiments, I still have code like this, that I can't remember where it came from:

            arabicMap = new Dictionary<string, Mapping>();
            XmlReader xmlReader = XmlReader.Create(Path.Combine(Helper.DirectoryPath, "assets", "Arabic.fnt"));
            while (xmlReader.Read())
            {
                if (xmlReader.Name.Equals("char") && (xmlReader.NodeType == XmlNodeType.Element))
                {
                    arabicMap[xmlReader.GetAttribute("id")] = new Mapping()
                    {
                        x = int.Parse(xmlReader.GetAttribute("x")),
                        y = int.Parse(xmlReader.GetAttribute("y")),
                        width = int.Parse(xmlReader.GetAttribute("width")),
                        height = int.Parse(xmlReader.GetAttribute("height")),
                        xo = int.Parse(xmlReader.GetAttribute("xoffset")),
                        yo = int.Parse(xmlReader.GetAttribute("yoffset")),
                        xa = int.Parse(xmlReader.GetAttribute("xadvance")),
                    };
                }
            }
brave fable
hard fern
#

😔 oh boy i think i fucked something up real bad

devout otter
#

Like if the Dynamic Token is { "Name": "MouseAppear", "Value": "Guild, Wizard", }, I can have a patch fire just by doing "When": {"MouseAppear": "Guild"}, ?

brave fable
#

incidentally, if you're making an arabic script mod, i don't think it's even possible with a spritefont given the variations in the script

inland rain
#

i think that's in the neighbourhood of reasons why we gave up

brave fable
#

yeah there's a little more to it than just mirroring the text hahah

hard fern
ocean sailBOT
#

Log Info: SMAPI 4.1.10 with SDV 1.6.14 build 24317 on Microsoft Windows 11 Home, with 24 C# mods and 9 content packs.
Suggested fixes: One or more mods are out of date, consider updating them, SMAPI is out of date, consider updating it

hard fern
#

for the record i have absolutely no idea what this error means

brave fable
#

how did you get 4 as a layer id SDVpufferthinkblob

hard fern
#

I dont know

#

this is the list of layers i have

#

i dont know what it wants from me SDVpufferwaaah

#

my soul??

#

oh

#

nvm

#

i figured it out

#

all my fault

brave fable
#

it's your DayTiles haha

hard fern
#

yes it is

#

why does something cursed happen every time i try and make a map

fathom rapids
#

its the map making

halcyon nest
#

True! Map making is fun but also heavily cursed

brave fable
#

i mean you wrote the map property. you're the one who cursed it

hard fern
#

first it was me managing to shift the entire objects layer by one tile rendering every tile data useless

#

then it was me misspelling a map several times

#

now this

timid helm
hard fern
timid helm
hard fern
# timid helm Yes

You should be able to open it easily then 🤔 have you tried opening it from tiled menu

mighty quest
#

Adding a menu for Slimed Pipers to keep track of their Slime minions. Looking for UI/UX suggestions to make it look as natural as possible..

lucid iron
#

Are u attached to the no bg look

#

It's quite rare to have that in sdv I feel

mighty quest
#

not attached to it, but just slapping some vanilla bgs behind it ended up looking worse I think

lucid iron
#

Also that side of screen is where s&s puts the adventure bar if that matters

mighty quest
#

i've added the option to snap to different edges

lucid iron
brave fable
#

you could use a dummy buff icon sprite as a background, but on the other hand having the icons/hp bars separate to the actual slimes means if there's a bunch of slimes onscreen you might not actually know which ones are yours?

lucid iron
#

It sounds like this is a slime pet system

#

So all r yours?

mighty quest
#

yeah, the portraits are only for your "pet" slimes

#

I tried the buff bg too

#

but since the portrait cuts off abruptly, it always looks weird

brave fable
#

but can there be other enemy slimes in the same area

mighty quest
#

yes

tiny zealot
#

i think blueberry makes a good point and i would consider attaching the hp bars to the slimes themselves

lucid iron
#

Hm what if u use that slime emoji

mighty quest
#

thats what Im using

lucid iron
#

No like

#

I think there's a 9x9 slime emoji right

mighty quest
#

yeah that's the one you see in the pic

brave fable
lucid iron
#

Ok i am hallucinate then 3sSmolMiku

#

The issue with having it on the slime is like

#

Ppl might be using the various enemy health bar mod

mighty quest
#

mockup:

#

I guess I can add also as an option moving the health bars to the slimes themselves instead of the hud

#

or totally disabled

tiny zealot
brave fable
#

if you just want to show which slimes are enthralled you could just pop some tas vfx on them. love of cooking does it with the lasagna slow aura

mighty quest
#

it's not just that
you can click the hud to dismiss and re-summon slimes
and when they die it shows you the respawn timer / cooldown

#

also hovering over it shows their stats

#

thats a cool effect though

#

I think I definitely need something like that too..

lucid iron
#

Maybe they get a green heart

brave fable
#

if you can only have a small number of slimes at a time you could give them colour-coded health bars to the ui and model

lucid iron
#

Like the red one when they mate

#

But green for friendship

brave fable
#

yeah a little antenna on top would be very style-fitting

mighty quest
#

I like that idea

hard fern
#

Lasagna slow aura....

lucid iron
#

Is this part of wol or new mod DokkanStare

mighty quest
#

it's part of wol

brave fable
#

lasagna fatness aura only works on enemies with 2 or more legs. which is a bug, but i'm running with it

mighty quest
#

on a different note, I'm also looking for ideas for ways to highlight stones in the mines

#

like with an aura or outline

#

for the prospector hunt minigame

brave fable
#

you could do it terraria-style and redraw the sprite over the top after renderedworld/alwaysfront, with a colour overlay of red*0.5

#

outlines are trickier since you'd need to draw below the sprite at a higher scale

#

and it's always easier to draw above than below

brave fable
# modest heart ilu

thought you might like to know the birthday reminder mod is updated for custom characters and items on the nexus 🥳

mighty quest
#

I can try that

#

thanks

brave fable
#

drawing above might actually be tricky depending on whether or not your spritebatch is affected by lighting, terraria's setup ignores lighting

lucid iron
#

Maybe it's time for that pulse setting in TAS

brave fable
#

eh, just do color.red * (1 + 0.5 * math.sin(game1.currentgametime.totalgametime.totalmilliseconds / 500))

#

you're probably just redrawing the object sprite rather than making a tas out of it anyway since who wants to manage the lifespan of those things

wise harness
#

hello all. i have a question: which size can a farm map have?

brave fable
#

unless you make them pulsing ghost things like the lasagna fatness swirls

#

anything up to about 180x180 is fine, but 100x100 is as big as the entire town already

wise harness
#

ooofff.... hohoho

obtuse wigeon
#

Blueberry beat me to it

wise harness
#

that size is a giant one...

#

and farmhouses? do they have a fixed size?

brave fable
#

only the most gorilla-giganticus farm maps go above 100x100

wise harness
#

uh.... hahahaha

brave fable
#

uhhh the farmhouse is out of my wheelhouse hahah

obtuse wigeon
wise harness
#

by such a gigantic map it would be nice to have a castle on it! lol

#

O_O

obtuse wigeon
#

(The farmhouse was only cause I was bored and it's not actually viable in a proper playthorugh)

wise harness
#

wow! then i could use the castle which i made with another programm XD

#

although.... that one had tiles 48x48 size XD

mighty quest
wise harness
#

(terrible arithmetic shedule?) 😏 🤣

#

sorry... just a joke XD

#

im off. see ya ^^

finite ginkgo
hard fern
bleak spade
#

Okay so, I've figured out what's causing my Divide By Zero error. It's a conflict between my custom map and the Way Back Pelican Town mod but idk how to fix it

#

Does anyone know how I figure out a way around it?

wanton pebble
mighty quest
#

anybody know which draw overload is used for stones in the world?

bleak spade
# hard fern Uh, divide by zero?

I get the error "An error occurred in the game's draw loop: DivideByZeroException: Attempted to divide by zero." when I go into a certain area of the map

#

I've been trying to fix it for days

#

I've narrowed it down to a conflict with a particular mod but idk how to fix it

hard fern
#

🤔 does it only happen when you try and use way back and your map together?

bleak spade
#

Yes

hard fern
#

Huh

bleak spade
#

What's weird is that I made a custom map to replace the town square the exact same way and it worked fine

hard fern
#

Snd like, what area of the map is it occuring in 🤔 could you send like a picture, or something...

wanton pebble
#

so you can go to that area on the map and take a picture when Way Back isn't installed, but installed it explodes?

bleak spade
#

Okay so I wanted to redesign my town and forest areas of the vanilla game. I copied SVE and Way Back tilesheets into a custom mods assets folder (this is for personal use only) so that I could have the mix of redesigned sprites. For the Town.tmx map it worked fine and even changes with the seasons but now I'm redesigning Forest.tmx and whenever I walk down to the hat shop building the game crashes due to a divide by zero error

wanton pebble
#

The outdoors tilesheet, then

#

assuming this isn't a case of "missing vanilla 1.6 tilesheets"

bleak spade
ocean sailBOT
#

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

bleak spade
#

Here's the crash log

bleak spade
timid helm
#

Why is SMAPI asking (for a custom location) “Is its data in Data/Locations invalid?

rocky copper
#

Does anyone happen to know when the HappinessDrain on Farm Animals happens? I'd assume overnight, but do we know if it's DayEnding or DayStarted or something else?

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.

wanton pebble
#

also how are you patching in the custom location

#

Are you doing the most up to date 1.6 way or are you using the deprecated CustomLocations

timid helm
wanton pebble
#

I assumed content patcher SweatSmileIan

#

CustomLocations is an older content patcher way that works but is deprecated

#

The newer way is to patch into Data/Locations and such

tiny zealot
#

the old way works but it's less featureful and less performant than the new way. you really should convert if you haven't yet

timid helm
ocean sailBOT
#

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

wanton pebble
#

You may want to put the json with it in:

#

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

brittle pasture
brittle pasture
#

!decompile

ocean sailBOT
brittle pasture
#

very useful, answers 90% of code-related questions

rocky copper
#

Ooh, thank you, I have the uncoded xnbs but I didn't know how to decompile the DLL

lucid iron
#

What's the 10%

brittle pasture
#

netcode stuff

left nova
#

How can I check whether an item id is valid and that item is a shirt?
For the context, I'm making a new changeClothesTo event command that let people enter a specific item id and let the farmer change current equipped clothes to that item.

wanton pebble
#

Your first error - the Content Patcher one? Is the issue

#

The entire Json fails because you aren't comma-ing after your patches

#

This fails the load of the maps, which fails the location edit

lucid iron
left nova
#

Can I determine the item is actually a shirt with ItemRegistry.GetData?

timid helm
lucid iron
#

You can find it on the DataLoader helper

wanton pebble
#

If you know how to fix the first error like you said, the second should automatically work.

uncut viper
#

if the patches are in separate files then one failing will not make the entire mod break
further, they do have commas between their patches

wanton pebble
#

They do not have commas at the end of each patch

uncut viper
#

they do. at the end of the comments

wanton pebble
uncut viper
#

no. They are after the comments

left nova
uncut viper
#

a comment in that style comments out what is between the symbols

wanton pebble
#

Right, I've used that before

#

but the comma is italicized in the editor

uncut viper
#

yet is still being parsed as valid json by it

#

they are not in the comments. they are being read as json

#

no different than if the json was minified and the entire file written on one line

wanton pebble
#

I have no idea what that last sentence means, Button

left nova
#

Yes, I did.

uncut viper
#

you don't need line breaks or white space in json

#

excluding stuff in strings ofc

wanton pebble
#

Either way, I see what you're saying, I'm just saying it does NOT look like that with the editor as is. Probably moot regardless, but still

lucid iron
#

Have u ever seen minimzed json

wanton pebble
#

Beyond that, I'd have to leave it to the map pros

wanton pebble
brittle pasture
#

but for the most part the code is the documentation

uncut viper
#

{"Action":"EditData","Target":"Whatever"}
assuming I filled out the rest (I'm on mobile I'm not doing that) that is valid json