#making-mods-general

1 messages · Page 15 of 1

ornate trellis
#

anyway, enough of that I got em updated one way or another. time to download some popular npcs/expansions i dont have to test festival positions

#

idk tbh, its been like this since day 1

#

we dont happen to have, like, a top 20 of most used npcs do we lol

vernal crest
old edge
#

its probably blocked by something

#

firewall

vernal crest
#

I just chose the New Character category and then sorted by downloads to find the most popular NPCs

brittle ledge
#

I just go based off who I like since I run a pretty heavy NPC load generally SBVLmaoDog

#

Void if you remind me in 4-5 hours, I have a list of every EN-lang NPC that has over 10k downloads (though those numbers are from early 1.6)

vernal crest
#

I started downloading a bunch, got exhausted, and gave up partway through

#

Festivals are stinky and I am not going to bother with them until later

calm nebula
#

You can also just rely on the scream test

vernal crest
#

Is that waiting for someone else to scream at me?

calm nebula
#

Yes

brittle ledge
ornate trellis
#

man

velvet narwhal
ornate trellis
#

I really dislike those who dont have their whole mod ready in a folder when unpacking....

#

ok...I THINK i can finally test festivals now

velvet narwhal
#

what's mod compat, my expansion is gonna add an extra large area that isn't touching the main area because my ideamen wanna be in every vanilla festival

brittle ledge
#

That's probably worse to do compat for tbh SBVLmaoDog

patent lanceBOT
#

@deep cypress: figure out exactly where the crash is happening by spamming ten million break points. (8h ago)

ornate trellis
#

[20:32:01 WARN game] NPC TheFishmonger can't load portraits from 'Portraits/TheFishmonger': Microsoft.Xna.Framework.Content.ContentLoadException: The content file was not found.
Huh whatthe

stable grotto
#

trying to set up my mail trigger for a map edit only to be applied when a specified mail has been read HasReadMail
question is, in multiplayer, who can read mail? is it only the host?

brittle ledge
#

Ridgeside, Sunberry and ES all patch the festival maps, and that's not counting SVE which redoes them altogether

velvet narwhal
#

it was really a mistake to be like, "okay you get a max of two npcs" them: "i wanna be in all vanilla events"

ornate trellis
#

i thing i did the new appearance system wrong

brittle ledge
#

Plus I think there's one of the Reimagined map mods that changes them (though they aren't updated for 1.6. yet I don't think

velvet narwhal
#

casually eating in front of a library computer

#

yeah i'm gonna hate compat with all the other expansions, i contemplate breaking their lil hearts and being like, "nope we're not gonna deal with vanilla festivals"

velvet narwhal
frail elm
#

Can anybody here showcase my mod

#

?

ornate trellis
vernal crest
velvet narwhal
#

did you keep your flat loads?

ornate trellis
#

wait

#

I think i forgor bracket

round dock
dusk terrace
#

it's not released yet, but it should be very soon!

ornate trellis
#

i need a set of {} around the [] of appearance, dont i

velvet narwhal
#

why do you have an open appearance with no action SDVpufferwoke

round dock
#

Also tiaaaa say if I planned to make a dialogue mod for, say, June, where do I ask for permission SDVpuffertbh

frail elm
vernal crest
#

Your larger appearance block isn't inside your EditData for Data/Characters

ornate trellis
uncut viper
#

Appearance lists should not have {} around them

ornate trellis
#

i saw it in a dispo and was like, hm i guess this is a thing i gotta do now

uncut viper
#

its a list of objects so the brackets are correct
braces would not be

velvet narwhal
#

i think the problem is that it's a floating appearance with no actions attached to it

vernal crest
#

Just copy and paste all the entries (start with the Usual Outfit) underneath the "Default" entry that is actually inside your Data/Characters edit block.

uncut viper
#

that is likely the problem yeah im just makin sure to say its definitely not the brackets too, dont change the brackets

#

(on the real appearance entry i mean)

velvet narwhal
#

your dispo's appearance is fine

#

it's line 84 that i'm staring at you with a pencil for

teal bridge
#

I didn't see you get a clear answer to this - not sure if I missed it - but sell prices are set on the Item itself, that is the "instance" or "stack" which carries over when the item is moved to a different slot, put in a chest, etc. If you want the price of an already-harvested item to change when the season changes, you would have to hook one of the time events like DayStarted, check for a season change, and iterate through all the items in inventory and storage and update their price.

(In other words, this requires code. Someone may correct me if I'm wrong but I suspect it's not possible in CP since it's not really the "content" that's changing, it's live data in the game.)

vernal crest
ornate trellis
#

I am confused

velvet narwhal
#

hold on i attempt to fix from this shoddy school computer

ornate trellis
#

i need to stop going to mateo to look how things are done :I

velvet narwhal
#

what did i miss on line 90

#

i don't have an actual validator i have to do this from memory

uncut viper
#

the way you fixed it makes it more complicated than it needs to be bc they can just add the list directly into the Appearance field of their character

vernal crest
#

Yeah just move it up

uncut viper
#

the reason you're getting errors is bc you didnt give any of the entries any keys

velvet narwhal
#

ah ok

#

lemme fix

vernal crest
#

Void put these

#

Inside here

velvet narwhal
#

done, slap that in

#

replace "{{ModId}}_Fish" with whatever you want, if you want to bother, i just named them 1 through 9 LMAO

#

oh, that's what you meant

ornate trellis
uncut viper
#

(i would still not do it that way Avi since they are not editing an existing character)

velvet narwhal
#

shove it into the appearances rather than making a whole different entry

ornate trellis
#

i didnt effin realize i already got it up there wahh

uncut viper
#

that way would work tho Avi and is what they would need to do if the NPC wasnt theirs
but it can just go in the disposition itself yeah

ornate trellis
velvet narwhal
#

i have the thai food-itis and i just sat through an hour and a half talking about c++ structs and everyone kept on repeating the same question

vernal crest
ornate trellis
#

ok, new try to check festivals...

velvet narwhal
#

oh i set my appearance to null for my custom npc that's why i had it differently

uncut viper
#

SDVpufferthink why for

velvet narwhal
#

i didn't want my long laundry list of appearance edits to be in the dispo SDVpufferpain

old edge
#

I want to implement some code to fix the issue that occurs when a player is swimming state and then they are defeated. The player is warped to the hospital in swimming attire.

uncut viper
#

i mean, that sounds like what id expect to happen if someone found me passed out in swimming attire

old edge
#

hmm maybe I could just patch a map property to the hospital map... so the player will change out of the swimming attire...

#

is that problematic?

brittle ledge
#

How would you manage to pass out while swimming? Bat attack?

velvet narwhal
#

Is there any unsafelocations with swimming??

calm nebula
#

Not really

#

You can force it by bombing yourself in thr bath

old edge
#

My mod

#

swimming areas with high level monsters

velvet narwhal
#

Is it an open air bath with monster spawn capability then?

#

Euh

uncut viper
#

oh, are they not actually swapping to swimsuit before they can get in the water then, and getting into the water fully clothed?

old edge
#

mix of swimming waterways and stone caverns

velvet narwhal
#

Swimsuit inflicts the slowed effect when it has that tile action iirc

uncut viper
#

SDVpufferthinkblob the passout functions seem like they already should be changing you out of your swimsuit if you're wearing it

old edge
#

Yeah my mod is based off underwater caving

#

it doesn't. It's not hardcoded

#

is patching the hospital cause issues?

uncut viper
#
if ((bool)who.bathingClothes)
{
  who.changeOutOfSwimSuit();
}

this is in passOutFromTired, and this is from performPassOut:

if (!base.swimming.Value && this.bathingClothes.Value)
{
  this.bathingClothes.Value = false;
}
velvet narwhal
#

Shouldn't be, it's the pass-out context for the location

old edge
#

the monsters are ghosts and bats

uncut viper
#

though i did miss that ! at first glance

old edge
#

so they fly and attack the player when swimming

uncut viper
#

so it seems like if you're passing out but not from tired then it only checks if you arent swimming but have your swimsuit on

velvet narwhal
#

.... do you have to add in the passoutfromdamage (I don't remember it) into that then?

old edge
#

hmm yeah i think it's missing since there are no area's like that in the game.

#

where may I find the data in the decompiled code?

ornate trellis
#

hm.....I think I shouldve used a fresh save to test the festivals...

#

also idk why but constance isnt at the festival wahh

velvet narwhal
#

I cannot pull up my appends I'm in mobile now

ornate trellis
#

ugh, gotta slap my face after clicking an existing save again instead of making a new one

vernal crest
velvet narwhal
#

I've been able to do it on previous saves

hallow prism
#

@royal stump i have some questions about FTM
Can we spawn the new coal nodes with it in quarry like area?
And : i don't remember ever selecting an option for spawning wood branches but some of my area do, can i control that somehow?

uncut viper
#

following the trail of code that happens when a player dies as far as i can tell it should be changing you out of your swimsuit when you get the "wake up in hospital after being killed" event too

#

so iunno why theyre still ending up in their swimsuit

ornate trellis
#

(also can someone maybe look at my animation idk if i should use her normal TheFishmonger name or the target i set her festival sprite as)

#

for flower dance, i mean

paper sundial
#

Nexus glitched and now I can't edit my own mod SDVpufferchickcry

velvet narwhal
#

i am second guessing myself now

uncut viper
#

yeah nexus does that sometimes. gotta wait some minutes for it to catch up

vernal crest
ornate trellis
#

not yet, i am still at egg festival

#

tho rn i am not ingame in case i have to change something (i forgor the command hgnsfl)

velvet narwhal
#

!reload

ocean sailBOT
#
How do I reload my changes while I'm still in game?

-You cannot reload tokens, that's a forced restart unfortunately
-If you've done any CHANGES, then type into SMAPI:
patch reload YourMod.UniqueID
-If you've done i18n DEFAULT.jSON changes, then type into SMAPI:
reload_i18n then
patch reload Your.ModUniqueID
-C# Visual Studio has a feature called "Hot Reload": https://learn.microsoft.com/en-us/visualstudio/debugger/hot-reload?view=vs-2022
-C# Rider has the same: https://www.jetbrains.com/help/rider/Hot_Reload.html"
-Generally working in C# it will be called "Hot Reload" (usage may vary)

ornate trellis
#

oh right it was called patch reload...

velvet narwhal
#

is "setup" used? I have setupadditional

vernal crest
#

Did you watch Constance's 6 heart event before checking the festival?

ornate trellis
#

and yes i did

gaunt orbit
#

Anyone know of a good way to determine if a location is instanced/a building interior?

ornate trellis
#

currently making a new save since the entire rug on the middle of the egg festival was just a black void and i was like ok i changed the terrain so much and saved it without RTF i messed up :I

uncut viper
brittle ledge
gaunt orbit
gaunt orbit
vernal crest
royal stump
# hallow prism <@125370989780533248> i have some questions about FTM Can we spawn the new coal ...
  • Yes, the ore section should accept "Coal" as an option. It might help to copy a fresh ore list from a new file, e.g. one from the HTML editor.
  • I think twigs will appear alongside weeds and stones if you have the map properties "SpawnDebrisOnNewMonth" or "SpawnDebrisOnNewYear", but some might appear on any outdoor map regardless, if I'm reading the code right. SDVpufferthinkblob The map property "skipWeedGrowth" might prevent the automatic outdoor spawns.
hallow prism
#

hmm, i believe i have none of those property and it's an indoor map

#

and thanks for the answers 🙂

royal stump
#

SDVpufferthumbsup I'll see if I spot anything else of note, there are about a dozen "spawn objects" or "spawn weeds and stones" references throughout the location code

#

"ForceSpawnForageables" also causes those to happen, it looks like

hallow prism
#

thanks but no big deal, i was just curious if i missed some obvious "wood" option that would be defaulting to something in FTM

#

ahhh

#

that is it then

#

because i need it to... well, you probably guessed why 😄

ornate trellis
#

huh

royal stump
#

it looks like skipWeedGrowth and that are opposites, so using both would probably just skip forage too
if (this.map != null && ((bool)this.isOutdoors || this.map.Properties.ContainsKey("ForceSpawnForageables")) && !this.map.Properties.ContainsKey("skipWeedGrowth"))

ornate trellis
#

shes still not here and i still got this huge black void on the map

uncut viper
#

the black void is the best option for storing large quantities of painted eggs

calm nebula
#

Oh no!

#

She fell into thr void!

vernal crest
ornate trellis
#

i mean, i do feel at home but i dont think the townsfolk want it lol

royal stump
ornate trellis
#

should try that ..

vernal crest
#

Yes it's always a good idea to make sure you know how to do a thing in its most basic iteration before you start introducing a lot of complexity.

#

Well, I think so, anyway.

#

I hate all the backtracking involved in jumping too far in.

paper sundial
ornate trellis
#

damnit she is still at home

paper sundial
#

(Yes it's a de-hard code of the coop for the new farm)

brittle pasture
#

(SpaceCore already does this right?)

ornate trellis
#

did I do something wrong afterall..

paper sundial
royal stump
#

I'm not sure if it does things like animal setup, but SpaceCore does have some kind of farm building setup in 1.6, yeah

vernal crest
hallow prism
#

.9

uncut viper
#

(tbh stuff like that (the farm building framework thing) is very two cakes for me though, i prefer smaller dependencies if a dependency i do need)

#

(or more focused dependencies rather)

brittle pasture
#

yeah SC could be a rather meaty thing

#

Two cakes!

paper sundial
#

Welp, this is my two cakes moment I guess SDVpuffersquee

royal stump
#

tangentially, I don't think anyone's finished a "spawn building" trigger action yet SDVkrobusgiggle I was poking at one for EMP but never got around to it

velvet narwhal
#

well if Max's is tiled based id be happy

uncut viper
#

trigger action you say

brittle pasture
#

Better Crafting has that I recall

royal stump
#

(though I'll eventually be doing stuff like that in FTM, probably, some day)

uncut viper
#

i thought BC had a like. building crafting table

#

does it also have an action? (i dont actually use BC besides for testing compat)

hallow prism
vernal crest
paper sundial
brittle pasture
#

does not seem so actually. You can go ahead with that fancy add building action 🙃

velvet narwhal
#

(can I get targeted name building) goodbye I'm in calc

uncut viper
#

depends what you mean by targeted. if you just mean being able to specify a Coop instead of a Barn then yeah. i dont know if anyone would get much use out of an action that spawned a completely random building on the farm... but maybe? SDVpuffersquee

ornate trellis
paper sundial
vernal crest
ornate trellis
vernal crest
#

Then in your main Stardew Valley folder you will have a folder called patch export. Inside that you can open up what the game has in that moment for spring13.json

ornate trellis
#

hm

#

i dont see any mention of her in there

vernal crest
#

Is your Include code block in your content.json correct?

ornate trellis
#

...

rancid temple
#

Aba, your hack is seeming more and more like the only way lmao

#

Outside of just writing my own damn custom tile action in C# for it

vernal crest
#

I am a genius!

ornate trellis
#

ok so

#

me forgetting the include and then adding it is not the reason, she still aint there..

vernal crest
#

Did you do another patch export?

ornate trellis
#

not yet

#

yea no, nothing in there of her

#

ok whats going on

#

am i doing the when thing wrong

#

im gonna take it out for egg festival and check

vernal crest
#

Good idea

ornate trellis
#

wait

#

what

#

oh my god finally

#

it wasnt the when i forgor a folder in the incvlude

#

shes here

#

still wondering why with my other mods the ground is black..

#

UH

#

huh...

[22:28:29 ERROR game] The game failed to launch: Microsoft.Xna.Framework.Content.ContentLoadException: Failed loading asset 'Data\BigCraftables'.

velvet narwhal
ornate trellis
#

inchresting....stardroip suddenly doesnt wanna load all my mods

uncut viper
#

so because im lazy and love (/s) forgetting to actually register actions before i try and test them in game, i wanted to do this:

foreach (var action in Assembly.GetExecutingAssembly().GetTypes().Where(t => t is { Namespace: "BETAS.Actions", IsClass: true } && !t.IsDefined(typeof(CompilerGeneratedAttribute), false))) {
  TriggerActionManager.RegisterAction($"{action.Name}", action.GetMethod("Action").CreateDelegate(typeof(TriggerActionDelegate)) as TriggerActionDelegate);
}

is there a better way to do this? particularly the delegate creating part, gettin the name is fine and i do the same thing for my books mod but getting the specific method in it feels like im doing it messily or in a way that might not be so reliable maybe

#

(it does work and correctly register the actions and their functions though but i just feel like im using that CreateDelegate thing wrong bc iunno why i need to give it a type if i need to cast it anyway)

brittle pasture
#

(someone who knows better can give actual advice, but personally I think it's both kinda spooky and utter genius)

uncut viper
#

it has done me wonders in my books mod
i use it to generate all my CP tokens and GMCM config options automatically since they all follow the same template

#

as long as i dont mind keeping every book (or in this case action) i add in its own class, which, i do not

calm nebula
#

CreateDelegate<TriggerActionDelegate>()

uncut viper
#

oh bless thank you very much

#

immediately much more pleasing to my eyes thank you

#

time to do this for all my GSQs and triggers too and retest them all to make sure none of em broke SDVpufferthumbsup

calm nebula
#

Fwiw, I would personally define a custom attribute

#

Something like [GSQ]

ornate trellis
#

hm, just found out i somehow broke my i18n again, how do i keep doing this

uncut viper
#

being completely honest i dont really know what atttributes are besides the ones i use for harmony nor do i have even the slightest clue of how id make my own and then use it for something

#

so thats probably something ill look into in the future but for now i think im good with this quick (bc i already know it) way bc i wanna get back to writing the actual action i had in mind before i got distracted by this reflection stuff SDVpuffersquee

uncut viper
#

does this just save me having to check the namespaces and compilergeneratedattribute stuff but not the delegate creation stuff? (also in that second link you're looping over the properties of one class, would it just work the same for looping over my assembly in general if my attribute-assigned things are in different classes?)

calm nebula
#

Yeah

#

I mostly did it so I could associate metadata

#

(Ie GMCMSection)

#

But I don't like magic naming tbh

#

Rather have a custom attribute

uncut viper
#

SDVpufferthinkblob ill just go back to the actions i was making for now then without the reflection stuff and revisit this later tonight i think, thank you very much for the examples

deep cypress
#

This

 foreach ( var spouse in allSpouses)
 {
    NPC fubar = Game1.getCharacterFromName(spouse;
     if(fubar.justEngaged().Value == true)
     {
         allSpouses.Remove(fubar.Name);
     }
 }```
Gives the following error:

[PolyamorySweet Rooms] Failed in FarmHouse_loadSpouseRoom_Prefix:
System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
at System.Collections.Generic.List1.Enumerator.MoveNext() at PolyamorySweetRooms.ModEntry.FarmHouse_loadSpouseRoom_Prefix(FarmHouse __instance, HashSet1 ____appliedMapOverrides) in C:\Users\Apryl\source\repos\PolyamorySweetRooms\LocationPatches.cs:line 108```

#

How can I remove the npc from the list, without making that error?

lucid iron
#

why are you doing that

deep cypress
#

Because, when a person first gets engaged, if they go into the house, the game explodes. I was trying to remove them from the build the room list, temporarily.

lucid iron
#

iterate on a copy of allSpouses

#

i dont know if thats a good idea though

paper sundial
#

allSpouses.ToArray()

lucid iron
#

best if you can actually find out what is explode here

calm nebula
deep cypress
#

Actually, you are right, this isn't what I was trying to do last night, I was trying to do what Chu/e just said, yes.

calm nebula
#

Please for the love of god

#

The "traditional" pattern is to iterate backwards

#

But RemoveAll does it right

lucid iron
#

wow convenient DokkanStare

calm nebula
#

Sorry

#

Ex-modder yells at unnecessary allocations

#

News at eleven

lucid iron
#

more clear naming than python's filter

#

still i wonder if you can just

#

delay the push to allSpouses?

#

to like next day or smth

#

assuming justEngaged means "engaged today"

deep cypress
#

Thanks loves!!! I am going digging into why it likes to splode...

calm nebula
#

It exists and you can Just Use It

#

You may question my sanity

#

I do, every day

lucid iron
#

no i think u r doing fine wew

proud wyvern
#

...why is traditional n^2?

#

like, how

calm nebula
#

Imagine removing every other element

#

N/2 removals

proud wyvern
#

i guess you gotta move the elements around too

calm nebula
#

Yeah

proud wyvern
#

okay, makes sense

calm nebula
#

I wouldn't recommend necessarily implementing RemoveAll unless you benched it (n^2 is the pathological case), but it exists and it's easy to use

#

So why not

ornate trellis
#

man i hate how i cant use lookup anything during festivals :I

gaunt orbit
#

Hm. I kind of want to do a system for custom renovations and I'm debating how to go about it. The vanilla system is kind of a mess, but in theory I could make it work.

On the other extreme, I already have a conditional map patching system in place, so I could just add a system to, say, sell trigger actions in shops. The decoupled nature of this approach though makes it difficult to do vanilla-style previews of changes

#

Maybe if I do the second one I can have an optional field specifically to indicate a map patch preview?

lucid iron
#

Do you care about requirement to clear the area (like vanilla)

#

I feel that's the only reason to have preview blobcatgooglyblep

round dock
#

Hi chu/e is the pass mail file on CP? SDVpuffertbh

lucid iron
#

And I wouldn't particularly mind if you just yeet my stuff into lost and found if I undo a renovation

#

Yes it's Data/LocationContexts.json in the unpack

gaunt orbit
#

That is a good point

lucid iron
round dock
#

But you can run the mod thru CP?

#

Oooh unpacked!

gaunt orbit
#

It's been ages since I did a renovation, does the preview not show what it would look like if you built it?

lucid iron
#

yea its like any other data Bolb

#

yes for like a few sec

#

but prior to pressing the button it's there to show where the renovation will be, and what placed items you potentially need to clear

round dock
#

Hypothetically.... if one were to make a mod to remove Harvey billing you if you married him, it wouldn't be too tedious no?

gaunt orbit
#

Oh that's... Not as useful as I thought

round dock
#

(for a beginner mod author)(Emphasis)

lucid iron
#

yea but i love burning the crib down it's top tier animation

gaunt orbit
#

So you just have to guess what it looks like before you buy it huh

lucid iron
#

you know what GameStateQuery/Condition do right

round dock
#

Some mod authors told me about it when I was talkiing about making an event mod but I haven't messed with it just yet.

lucid iron
#

for harvey u just need PLAYER_NPC_RELATIONSHIP Target Harvey Married

#

the current one has a ! in front, meaning negation

round dock
#

Oooh, does is it kind of the same way as that mod where your NPC spouse saves you from the mines and reacts to your death, kinda way?

#

Isolated to harvey minus healthcare billings

lucid iron
#

no idea never looked at that

#

i believe your edit should be this

{
  "Id": "{{ModId}}_FoundByHarveyMarried",
  "Condition": "PLAYER_NPC_RELATIONSHIP Target Harvey Married",
  "Mail": "{{ModId}}_passedOutHarveyMarried",
  "MaxPassOutCost": 0,
  "SkipRandomSelection": true
},

and then write a matching {{ModId}}_passedOutHarveyMarried mail

ornate trellis
#

scratches head

lucid iron
#

it has to go before the vanilla FoundByMarlon entry

ornate trellis
#

anyone ever...lost their cursor

lucid iron
#

so you would want a MoveEntries

latent mauve
lucid iron
#

do you mean losing the game cursor or losing LooseSprites/Cursors.png?

ornate trellis
#

no like uh

#

I am still testing festival spots for constance so i ofc warp and change times a lot

#

and everytime I do that during spirits eve something weird happens

#

and just now i warp back home and my cursor was just gone

stone crypt
#

Hey modding veterans, is there a limit on the length for event scripts?

ornate trellis
#

I had no cursor in any shape or form to click anything

round dock
#

Oh yeah Marlon's passed out mail is the 4th one. Harvey's billed one has this I've billed you {0}g

latent mauve
#

...This is probably way too much effort for me to be considering, but I am now pondering the though of a 'showroom' for Robin's that just has all of the renovations dumped on one map together to let people walk through before making a choice to buy one

ornate trellis
#

it somehow fixed itself when a random farm event played but idk what happened?

latent mauve
#

Since I want to do prefab rooms, I may do that anyway >_>

lucid iron
#

Where does Robin get all that space bolbonfire

latent mauve
#

She dug into the mountain, clearly

#

Or got the wizard to do her a favor once and there's a warp circle

#

I mean, the renovations are already instantly built, there's gotta be some magic involved there, right? SDVkrobusgiggle

lucid iron
#

Will you stop ppl from filling it with kegs monS

calm nebula
#

Sorry chu/e

#

This game is anti alcoholism but pro breweries

#

And anti capitalism except on the farm

brittle pasture
#

extra greenhouses? kegs
east scarp meadow farms? kegs
rsv summit farm? believe it, kegs

calm nebula
#

I'm married to Penny and my house is kegs

brittle pasture
#

"Don't worry honey, these are for making potato juice! Just ignore the crates with the, uh, blue fruits next to it"

calm nebula
#

Try to not go above int.maxvalue characters

finite ginkgo
#

Is that a challenge?

next plaza
#

I'm still tempted to try making a framework to let you run Yarn event scripts

pine ermine
#

But why?

finite ginkgo
#

Why not

next plaza
#

Exactly, EnderTedi

#

Also it would let you do cool things you couldn't do otherwise in events (in theory)

finite ginkgo
#

Oh?

#

I'm listening, I'm sat

pine ermine
#

Wait, what yarn are you talking about?

next plaza
pine ermine
#

Oh, so not the JS Package manager, got it.

#

XD

uncut viper
#

(i was also thinking of the package manager and very confused lmao)

pine ermine
#

No, that actually seems like a good idea imo

lucid iron
#

so would you transpile it to sdv event script?

next plaza
#

I'd be reluctant to include it in SpaceCore since that's kinda a big dep to add for something nobody may use

lucid iron
#

or just write your own event system

pine ermine
#

transpiling? eww

next plaza
#

I'm thinking either a custom event command that triggers it, or a C#-powered event (SDV already does this for the green tea event)

lucid iron
#

(transpile in the typescript to javascript sense, not harmony)

pine ermine
next plaza
#

It's ICustomEventScript for the curious

#

EventScript_GreenTea being the vanilla use

lucid iron
#

wow i had no idea this existed

#

what is up with all those minigame events then

next plaza
#

Like the boat journey? No clue

#

Maybe becuase those don't need the normal event scaffolding like actors

next plaza
#

Basically you can set variables and do things based on that

lucid iron
#

there sure is a draw function of all time in EventScript_GreenTea

next plaza
#

Mid-event

vestal gorge
#

I have a really silly question but I need some suggestions:
So I'm modding myself and my bf into the game as NPCs, and I'm stuck on a name for my bf because his name irl is Alex. His other favorite shortening of Alexander is "Sandy" but ofc there's one of those in Stardew already 😭 I've got an alternative BUT I'm absolutely dying to use Sandy as his name because I find it adorable. Should I just roll with it and have 2 Sandys? Canon-Sandy isn't that important to the game so I feel like I could maybe get away with it? Should I address the double names at all?
On a technical level, will it cause issues? If I have to, I'll give up on using the name Sandy but I really don't want to 😭

next plaza
#

Technical level, just prefix the NPC ID with your mod ID and you'll be fine

lucid iron
#

if you want other people to play your mod they may get confused

vestal gorge
lucid iron
#

perhaps spell it Sandey?

#

this is all writing/lore level concerns, not tech

velvet narwhal
#

On a technical level, I have fought with the idea of screwing with multiple viewports for events, in realistic terms, I will probably blow up the game

#

"Xandi"

vestal gorge
ornate trellis
#

so....is there something special with the festival of ice or why dodnt i get constance in there, shes yet again staying home

velvet narwhal
#

Prefixing the internal name is just you remembering to reference it every time, gameplay perspective from people will think you're replacing sandy

round dock
#

(also hi Avi I might ask you more on this mod idea someone brought up, chu/e alr guided me with what to do) SDVpufferlurk

velvet narwhal
#

Link's reverse transpiler haunted my dreams

vestal gorge
#

My silly goose self is considering having it both ways. Like making an optional content patcher patch where it can be Sandy. I don't care if it's more work, I'm just so internally hung up on having a fitting name for the character even though literally everyone else would just choose the main file because why would any normal person want 2 same name NPCs 💀

canon Sandy's name isn't even Sandy it's just good for business 😭 why must she do this to me /lh

#

Sorry gang I realize I'm not taking suggestions very well and it just boils down to me making a choice, I appreciate you guys listening

velvet narwhal
#

"This my brother mark" and my other brother, "marc"

velvet narwhal
#

I can't search in discord on mobile it'll blow up, but it woke me up an hour before my alarm because my dream was an assignment of creating a reverse transpiler imma blame link for that

gaunt orbit
#

Do you mean like a transpiler on a reverse patch?

velvet narwhal
#

Is this it I can't see

gaunt orbit
#

Oh yeah that's it

calm nebula
tiny zealot
velvet narwhal
#

Haunted me

gaunt orbit
#

It's not that complicated

tiny zealot
#

excuse me, it's for main event. all other festivals use MainEvent_additionalCharacters; winter8 uses Main-Event_additionalCharacters (hyphen)

deep cypress
#

Hi loves! Any idea what's going on when this happens? Like, is something not loading? I managed to figure out exactly where in my code the problem is happening, but I cannot seem to comprehend the why. Any insight into this would be deeply appreciated!!!

[SMAPI] An error occurred in the game's draw loop: IndexOutOfRangeException: Index was outside the bounds of the array.
   at xTile.Layers.Layer._RebakeRow(Int32 y) in D:\GitlabRunner\builds\Gq5qA5P4\0\ConcernedApe\stardewvalley\Farmer\xTileSource\xTile\Layers\Layer.cs:line 393
   at xTile.Layers.Layer.DrawNormal(IDisplayDevice displayDevice, Rectangle mapViewport, Location displayOffset, Int32 pixelZoom, Single sort_offset) in D:\GitlabRunner\builds\Gq5qA5P4\0\ConcernedApe\stardewvalley\Farmer\xTileSource\xTile\Layers\Layer.cs:line 462
   at StardewValley.Game1.DrawWorld(GameTime time, RenderTarget2D target_screen) in D:\GitlabRunner\builds\Gq5qA5P4\0\ConcernedApe\stardewvalley\Farmer\Farmer\Game1.cs:line 15475
   at StardewValley.Game1._draw(GameTime gameTime, RenderTarget2D target_screen) in D:\GitlabRunner\builds\Gq5qA5P4\0\ConcernedApe\stardewvalley\Farmer\Farmer\Game1.cs:line 15248
   at StardewModdingAPI.Framework.SGame._draw(GameTime gameTime, RenderTarget2D target_screen) in SMAPI\Framework\SGame.cs:line 227```
lucid iron
#

is this multiplayer

next plaza
#

New feature for next SpaceCore version - opt-in separate NPC datability for host and farmhands

#

(It's on a per NPC basis, so doing it for your NPCs won't affect everyone's)

deep cypress
lucid iron
#

what are the conditions for this to happen?

brittle pasture
#

(note: no idea how NPCs data and multiplayer data interact, if any)

next plaza
brittle pasture
#

aaaaah TIL

next plaza
#

So if you want it depending on player characteristics, or story progression, or anything like that, it won't work properly with MP

deep cypress
#

The condition of making this happening is when one enters the farmhouse. The game loads the farmhouse, which then, looks to load the spouse rooms.

ivory plume
lucid iron
deep cypress
#

Thanks! I am going to try to look in the Xtile code, to see if I can see exactly what it is coming in wrong.

finite ginkgo
deep cypress
#

What is funniest about this, is when I had a delay set to load the spouse room until after marriage, it would explode even after marriage, but then, when reloading, it would decide to work.

deep cypress
#

Lemem go see where I am extending the map... hold on...

deep cypress
#

I tried arbitrarily extending the map by 100... still broke.

lucid iron
#

what does keg_juice context tag mean

calm nebula
#

It's the juice of a keg

lucid iron
#

but how does it get onto things think

#

i didnt see any object that innately have keg_juice

calm nebula
#

(Yeah I think it's for mods.)

brittle pasture
#

brb making a mod to add that tag to all fish

hybrid scarab
#

hi so I was kinda frustrated while playing sv cause I wanted a certain haircut and a certain dress,how hard would it be to make them in game by modding the game? do I need to change the code or just a haircut and a dress' skin?

calm nebula
#

It's really easy

#

Barely any code at all

hybrid scarab
#

what code do I need to change then? cause barely isnt 0

calm nebula
#

It Depends imo on whether or not you'll fit in the sprite boundaries

#

But we can cross that bridge after you have art

ornate trellis
#

cant believe it but besides festival of ice i managed to get the festival positions to work (idk why the main event part of said festival doesnt want to have her appear tho)

hybrid scarab
ornate trellis
#

oh! thanks! I totally missed that when I fixed some other stuff

#

ok so another question: i jsut got a comment telling me they had constance as a winter star recipient but didnt supply any more info besides NOT having met her yet. I thought it would be enough to have her as hidden in the social tab and intro quest...did I miss something to exclude her? (also, on the same note, if excluded, how can i change her being in the gifteee pool of winter star again after watching an event)?

brisk birch
#

I'm so glad there's an option to let you dance at the flower dance w non-romanceable NPCs, I just found this out and ooogh baby

#

thank you disposition page of the sdv wiki

finite ginkgo
ornate trellis
#

i see

brittle pasture
hybrid scarab
#

her haircut is my reference for the one Im trying to put into the game,which method do you recommand?

#

(also her dress is also the one Im trying to make)

ornate trellis
brittle pasture
#

you can probably do both her hair and clothes with Content Patcher, but it comes down to preference. Fashion Sense do allow for more elaborate accessories that go beyond the vanilla boundaries so most hair/clothes modder nowadays use it

ornate trellis
#

if thats possible that is

uncut viper
hybrid scarab
finite ginkgo
#

PLAYER_HAS_SEEN_EVENT <player> <event>

ornate trellis
#

wait, how would i put that...

finite ginkgo
#

The WinterStarParticipant field takes a game state query, so just "WinterStarParticipant": "PLAYER_HAS_SEEN_EVENT Current <event id>"

ornate trellis
#

ohh

#

so until the event is seen itll be seen as false then

tiny zealot
#

you can invert the condition by starting it with !, so "!PLAYER_HAS_SEEN_EVENT Current <event id>"

#

if you need it to go the other way

ornate trellis
#

hm

#

but when I want them to participate after seeing the event without ! is right?

tiny zealot
#

yeah, should be. sorry for the confusion, i misremembered something you said earlier

#

but i think it's still useful to know you can invert any game state query with !

ornate trellis
#

yee

hybrid scarab
#

hi I dont understand what am I supposed to do here

#

I dont understand anything code related wth...

#

first of all what does the colors mean ?

#

and second version is the version of the mod or the version of stardew?

brittle pasture
#

have you downloaded the example FS pack? It has premade hair.json files that you can just edit

rancid temple
#

If you hover over the red it should pop up saying what it thinks is wrong, that said, you're missing a comma after each line

brittle pasture
hybrid scarab
#

ohh you mean this , ?

rancid temple
#

Yeah

hybrid scarab
#

thats called a comma in english? thats strange

rancid temple
#

English is a terrible language, I am deeply sorry

hybrid scarab
#

dw mine's worst

hybrid scarab
#

oh damn it what I have been doing all this time was for the manifest.json

#

not the hair.json

lucid iron
#

have you made the hair sprites yet?

hybrid scarab
#

what does that mean

hybrid scarab
#

I think I mean I made a pixel art of smt in png

lucid iron
#

according to the format desired by fashion sense?

hybrid scarab
#

and then put it in the folder under the name hair.png

hybrid scarab
#

so I just scraped smt

brittle pasture
#

A good idea to get started is to copy manifest.json, modify it to add your own name and mod id, make a new hairstyle by mimicing the Hairs/HairTemplate folder in the example, and try to get it to load in game

#

using the link I posted above

hybrid scarab
#

whats a mod id?

brittle pasture
#

this line
copy the file, change Name, Author, Description and UniqueID to something unique to you

hybrid scarab
#

is an update key required?

brittle pasture
#

you can get to that once you're ready to upload your mod to Nexus

hybrid scarab
#

so this version of my manifest.json works?

brittle pasture
#

should work SDVpufferthumbsup maybe change Version to "1.0.0" or something to reduce confusion

velvet narwhal
#

version under author is your mod's specific version, not the framework you're using

hybrid scarab
#

I took the version in the manifest.json of the FS mod pack

lucid iron
#

its also recommended to do <author>.<mod> for mod id

#

so like Yuko.SoifonHaircut

brittle pasture
velvet narwhal
#

tbf probably could use a bit of updating for the non-coders

#

i feel we do this same song and dance every time SDVkrobusgiggle

hybrid scarab
#

I feel like my first time on elden ring,no shit explained just go out and try to understand

rancid temple
#

Better than the first time in Dark Souls

velvet narwhal
#

it's not necessary to have a background in programming language, but it helps understand syntax

hybrid scarab
rancid temple
#

Go out and- GET PUNCHED OFF A CLIFF

#

Remember to dodge the guy who punches you off the clif- GET PUNCHED BY THE SECOND GUY WHO DOES THE SAME THING

hybrid scarab
#

so this is the final version of my manifest.json

#

things to change or good enough?

velvet narwhal
#

flip the versions

#

ContentPAckfor needs to stay 6.6.0

#

or you can just yeet it entirely

#

fashion sense recognizes itself

hybrid scarab
#

Im just gonna keep it like that then

#

ok if this is good enough now onto the next thing to burn my head,which now should be the sprite

hybrid scarab
velvet narwhal
#

did ya'll do the song and dance about unpacking already? i just got home and i'm eating mcdonalds

hybrid scarab
#

unpacking?

velvet narwhal
#

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

brittle pasture
#

(it's probably not specifically useful for knowing the structure a FS pack, but it helps for getting references from the game's own hair styles)

velvet narwhal
#

has the bald farmer sprites in there so you can have a foundation to work off of

rancid temple
hybrid scarab
#

except once beaten

velvet narwhal
#

beyond that, how to set up a fashion sense .json is beyond me, i stare at it eyes glazed

velvet narwhal
teal bridge
#

Huh, I never perceived DS that way at all. But it's been a long time since I played the 1st title.

hybrid scarab
#

there is indeed that but what can I do with that now

hybrid scarab
velvet narwhal
#

you can throw that .png into an art program of your choice, set a layer above it and you have yourself a head model

hybrid scarab
#

oooh

velvet narwhal
#

you'd just need the front, left/right sides, and a back

hybrid scarab
#

genius

teal bridge
#

I mean I never perceived it as "remembering bizarre enemy placements and attack patterns".

hybrid scarab
#

but I dont have an art program at all

velvet narwhal
#

what is it?

#

!software

ocean sailBOT
hybrid scarab
#
  • the occasional skeleton hidden behind a wall or a door
#

I used pixilart online to create my first view on the thing

#

funny thing to think I now need to use it again and do everything over again

#

do I need to do the haircut for all 4 direction ?

velvet narwhal
#

if it looks the same for the sides, you only have to do 3 and just duplicate/flip the side

hybrid scarab
#

I have a file already but how do I compare it to the ingame haircut

#

if I could just adapt the drawing I already made to the standard of the game it would be nice

velvet narwhal
#

uh depending on the art program you can keep the scaling the same and not have it turn into a blurry mess

#

i honestly don't know what dimensions hairstyles are supposed to be

hybrid scarab
#

I used pixilart and honestly I dont have the strengh to redo the first one I made into a new version

#

if I dont have a choice I will do it

#

so this is the required set up to work on the haircut skin now?

drowsy pewter
#

for hairstyles there will only be four images, front, back, left, and right

#

so these are the only ones you need to draw hair on. Just to make sure you dont do any extra work

hybrid scarab
drowsy pewter
#

when you're done with that, you also have to move the hair around until it fits the template. to be honest it might be easier to just get someone else to make the mod for you

#

oh yeah whoops sorry

#

You can just do front back and right

hybrid scarab
#

ok now nightmare begin

drowsy pewter
#

if you dont have a left sprite, the game will mirror it

hybrid scarab
#

I just hope it doesnt make out a weird result

#

how do I get it to keep two of my canvas opened at the same time

#

is that too precise for the game?

marsh wraith
#

hi all 👋👋 i’m trying to make seasonal outfits for my Leo arts mod coz i got requests for that; does anyone know of a tutorial or existing mod i could look at for reference? like for what outfits they’re expecting me to draw, and also how to make it functional in-game?

fiery cobalt
#

Alrighty time to sit down and update Forage to Farm

hybrid scarab
#

Just to understand but width 100 height 100 means 100x100 right? So can I transform it into a 16x16?

hybrid scarab
#

(And Im poor so no comission possible)

pine ermine
# marsh wraith hi all 👋👋 i’m trying to make seasonal outfits for my Leo arts mod coz i got re...

This is how you would do that with content patcher:
https://github.com/Pathoschild/StardewMods/blob/stable/ContentPatcher/docs/author-guide/tokens.md#FromFile
The {{Season}} part will be replaced with spring, summer, fall, or winter when content patcher loads the file. You would name your PNG files something like spring_Leo.png, etc.

Also, you may have thought about this already, but there are no seasons on Ginger Island. The technique above will still work, but thematically, there are no seasons.

GitHub

Mods for Stardew Valley using SMAPI. Contribute to Pathoschild/StardewMods development by creating an account on GitHub.

marsh wraith
lone ice
#

Hi does anybody know of a good up to date guide for adding a new food item (meat) to the game?

#

I'm using the existing sprites

#

but I tried to follow the guide and I'm persistently getting the same error

#

"🚫 Error Item (659) "

#

{
"Action": "EditData",
"Target": "Data/Objects",
"Entries": {
"1000": {
"Name": "Pork",
"DisplayName": "[LocalizedText Strings\Objects:Pork_Name]",
"Description": "[LocalizedText Strings\Objects:Pork_Description]",
"Type": "Basic",
"Category": -5,
"Price": 600,
"Texture": null,
"SpriteIndex": 659,
"Edibility": 15,
"IsDrink": false,
"Buffs": null,
"GeodeDropsDefaultItems": false,
"GeodeDrops": null,
"ArtifactSpotChances": null,
"CanBeGivenAsGift": true,
"CanBeTrashed": true,
"ExcludeFromFishingCollection": false,
"ExcludeFromShippingCollection": false,
"ExcludeFromRandomSale": true,
"ContextTags": [
"color_pink"
],
"CustomFields": null
}
}
},

deep cypress
#

!CP

ocean sailBOT
deep cypress
#

Follow these, this is the way! ❤️

lucid iron
#

Your item id is 1000, but the error item is 659?

lone ice
#

Yeah that's based on the tile number on the springobjects.png vanilla item sheet

#

The id I've tried different names

#

Doesn't seem to matter to that error

lone ice
lucid iron
#

As of 1.6 the item id and the parentsheetindex are separate

#

Should be able to find the pork item with (O)1000

#

Tho it's actually recommended to do <modid>_<name> for your items

lone ice
#

So I did find in the SMAPI output that pork existed

#

I think specifically it's confused about what icon to use

tiny zealot
lone ice
#

And i tried several different types of phrases in "textures" to tell it to use the same tile sheet as every other object

tiny zealot
#

you don't have to but it's polite

deep cypress
#

Here's an example of an item:

  "ApryllForever.RiseMermaids_Sapphire": {
    "Name": "Sapphire",
    "DisplayName": "Sapphire",
    "Description": "A deeply blue, glistening gemstone; sapphic women are known to give these to their lovers in the areas around Rest Stop.",
    "Type": "Mineral",
    "Category": -2,
    "Price": 696,
    "Edibility": -300,
    "IsDrink": false,
    "Buff": null,
    "ContextTags": [
      "color_blue",
      "not_museum_donatable",
      "item_sapphire"
    ],
    "Miscellaneous": null,
    "Texture": "Mods/ApryllForever.RiseMermaids/Objects",
    "SpriteIndex": 0
  },```
lucid iron
#

Hmm I feel like null is correct for your case, since you just want Maps/springobjects

#

But I suppose you can try explicitly putting that in

lone ice
#

Same result

lucid iron
#

And double check the sprite index perhaps Bolb

uncut viper
#

are you spawning in new pork items every time you make your changes?

iron plaza
#

dunno if there are any sound people here atm, I need to raise a pitch an octave and a half but the game only lets me do one octave up. Should I raise it in audacity and then lower it to the 'normal' range in game, or make a higher pitched version of the sound that I use when it breaks an octave?

lone ice
lucid iron
#

Follow what button said as well

#

Always spawn a new item when you reload

uncut viper
#

even if the sprite index was wrong it should still show something id think

lone ice
uncut viper
#

if you edit your content.json, then you need to delete all your existing pork items in game

#

and then spawn new ones

lone ice
#

I've been checking a recipe that calls for it

uncut viper
#

the old ones wont be changed

lucid iron
#

Spawn like cheat in one Bolb

#

Oh are you updating the recipe too

#

As you been changing the item id

lone ice
#

OH

#

OMG

#

I GET WHAT I DID WRONG

lucid iron
#

🫂

lone ice
#

I feel so stupid but thank you very much 🤣

#

I didn't update the damn id in the recipe 😅

lucid iron
#

This kinda thing is why u should cheat in your item first to validate it is good

#

And then deal with places using the item

lone ice
#

Yeah very smart thank you

#

I should have come and asked for help three hours ago

worthy goblet
#

Hey there, I'm just a sprout trying to make Baby's First Content Pack following this guide here: https://stardewvalleywiki.com/Modding:Content_packs#Create_a_content_pack but I have a question about the wording of one of the steps, or perhaps I missed some other context somewhere that I'm trying to clear up.

Under the "Create a content pack" section, I have done steps 1-3 and the substeps under step 3. I've made my mod folder, made my .jsons in it, all that.

Step 4 says: "Add the files needed by the content pack framework (see its mod page for details)." Is this referring to the Content Patcher framework I plan to use? I'm not sure what files this step is referring to. Does this just mean "have Content Patcher downloaded" or something else?

Stardew Valley Wiki

←Index

inland cedar
#

is there a way to draw a "special" charater in chat box / bubble text? for example 🍓

uncut viper
inland cedar
#

How to check if the current game is the local split screen farmhand?

worthy goblet
uncut viper
#

if whatever framework you're using requires any specific files, you need to add them. this will be different depending on the framework

#

The documentation for the framework you are using tells you what files you need

split ermine
spice inlet
uncut viper
split ermine
uncut viper
inland cedar
#

is this correct?

"Target": "Maps/Custom_MT_Island_House",
"FromFile": "Assets/Custom_MT_Island_HouseEdit.tmx",
"PatchMode": "Overlay",
"When": {
  "HasReadLetter": "{{HasFlag: anyPlayer}}MT.IslandBedroom"
}```
split ermine
onyx mural
#

Hello! Since im far from being a genius, but determined to make unofficial update for the clothes/hairstyles mod I totally love to ver 1.6, Im humbly asking for your help ;-; because i never did touched anything mod related for sdv. https://www.nexusmods.com/stardewvalley/mods/4154?tab=description aaalso i created a post #1278646044560855051 unsure where it would be better to write about this. Can someone help me with this? I dont even know where to start

Nexus Mods :: Stardew Valley

Hair, clothes, kimono and hats based on the characters of Sailor Moon. Comes with character hairstyles and 200 new clothes to choose from!

vernal crest
#

I'm not familiar with doing farmer clothing so I probably can't help much but the first thing you'd want to do is decide whether you want to convert it to Content Patcher or Fashion Sense.

onyx mural
#

Fashion Sense i guess

hallow prism
#

then your best approach is to look at fashion sense mods and tutoriels

onyx mural
#

aye, ma'm!

hallow prism
#

and while the author is not updating, i believe she is around still
remember you can't publish such update without permission (mod may already allow for such, but you'll need to check), personal use is ok however

onyx mural
#

its for personal use only!

hallow prism
#

good! (i prefer to clear that from the start, some people aren't familiar with how it works)

onyx mural
#

like sure if i manage I can share via giving it to someone but not like creating mod in nexus and claiming it or anything

hallow prism
#

(it wouldn't be personal use then)

vernal crest
onyx mural
vernal crest
#

That still counts as not being personal use anymore. I'm not going to try to police that or anything, just letting you know.

onyx mural
#

ooooh

#

gotchu

#

didnt know

vernal crest
onyx mural
#

Thank you, ill check this!

verbal narwhal
#

@vernal crest sorry for the ping, but I think I should move my question here, do you know if AT would recognize the gate if I only use the item name gate? and then do a wide spritesheet for all the different angles/closing variations it can have next to eachother?

vernal crest
#

Don't know, I'm sorry. I've only used AT as a player and never looked at the docs or at how the code works.

#

Are there not fields in AT for specifying spritesheet dimensions?

hybrid scarab
#

anyone got the dimension of the stardew haircut?

verbal narwhal
vernal crest
#

Mmm yeah I don't know, sorry

#

I'd have to do a lot more reading and experimenting to be able to understand the docs and I'm trying to not get sidetracked anymore from my nested questions tutorial.

verbal narwhal
#

please dont feel responsible for helping me here, I am so happy that you took so much time for me already!!

vernal crest
verbal narwhal
#

I dont mean to bother you

vernal crest
#

You aren't bothering me! I am just sorry I can't help. Hopefully looking at Void's mod might be more useful.

verbal narwhal
#

thanks!! it is useful! and also still a bit confusing, but I will figure it out!

vernal crest
#

I wonder why fishtank isn't listed as a possible furniture type on the wiki.

rancid temple
#

Which wiki?

vernal crest
#

Official

calm nebula
#

Because it's hardcoded I would bet

#

Like TVs

rancid temple
#

Yeah, looks like it's not an accepted type

vernal crest
#

Odd that they are in furniture.json with type "fishtank" then

rancid temple
#

I think the _ => 9 means anything that's not one of the previous is 9, so if you put fishtank it becomes other

#

Then there's this, called when placing objects

calm nebula
#

...huh

rancid temple
#

So anything that needs the int will just get 9 but you can manually check for fishtank lol

calm nebula
#

Nah, it's its own subclass!

#

I wonder how it calculates the fish tank boundaries though

#

That's why I thought it was hardcoded

#

Also see TVs right before it

hybrid scarab
vernal crest
#

The fish tank boundaries thing was why I was looking at it in the first place because camiska wanted to know if changing the amount of glass compared to other bits of fishtank would do weird things with the fish #making-mods-art message

calm nebula
#

Wouldn't be hard to test

#

That's a layering question more than anything else

#

I would just draw a big X over a fish tank and yeet it into the game

rancid temple
#

Yeah, I think it would be a lot easier to just test than try to figure out through the code lol

vernal crest
#

Yeah that is what I told them to do

#

But I also thought I'd just see if the wiki had anything to say and then got sidetracked about the type thing lol

vernal crest
# hybrid scarab its just .png with no dimension

I would personally look at the size of the image and then divide that by the number of hairstyles on each row and column to get the allowed space for each individual hairstyle frame and then use that as a starting point to experiment with. But there's probably actually documentation on the wiki that explains it instead.

lucid iron
#

There's a mod that adds invisible fish tanks that accept fish ok

hybrid scarab
rancid temple
#

@vernal crest @latent mauve Looks like it's in the beta now

vernal crest
hybrid scarab
#

cause Idk what to use

rancid temple
#

Gimp or paint.net I see suggested for free often

vernal crest
#

!software

ocean sailBOT
vernal crest
rancid temple
#

Aseprite is my go to, but it's $20 unless you want to try to compile it yourself (this can be difficult)

vernal crest
#

I looked at the compile instructions and decided maybe I can afford 30 bucks lol

hybrid scarab
#

ok thx

hybrid holly
#

k a bit weird question, how hard is to make map mod by my self?

vernal crest
#

In as far as the json goes it's probably one of the easier things to do. Making your map correctly is a bit harder but it's okay if you pay attention to detail.

hybrid holly
#

is there any sepcific guide for that?

#

google doesn't seem to help me yet..

hallow prism
#

some here andthere

#

and making map depend of scope too

#

farm maps are more overwhelming

vernal crest
#

There's no up-to-date step-by-step tutorial that I know of.

hybrid holly
#

🤔

vernal crest
#

I learned by reading the official wiki page (https://stardewvalleywiki.com/Modding:Maps), looking at vanilla maps, and looking at other people's map mods. And like Lumi said, farm maps are harder than other ones.

hybrid holly
#

ty!! i'l for sure look into this

vernal crest
#

I had better use a million questions in Hiria's dialogue to justify the amount of time I am spending investigating all the ways you can modify the commands >_<

rancid temple
#

Gonna have to make them a private investigator

vernal crest
#

I have nearly 200 lines just for slightly tweaked repetitions of the same question 10 times so far.

spice inlet
#

Still have to decide how to implement page shopevents and item rewards

lone ice
#

does anybody know where the animation for monsters are programmed in? (which .json)?

#

i'm trying to make a custom monster

spice inlet
vernal crest
#

Yeah - they are reskins of existing monsters though so they have the same behaviour as the vanilla ones. I don't think you can make custom monster behaviour easily.

vernal crest
verbal narwhal
#

yeah I think I might make a quick tutorial page about it on the modding wiki

lone ice
#

What i'm really trying to do is add occasionally spawning wild boar to the forest

#

that when you kill them, drop ham

#

I animated it, I made a ham a food in the game, I just need to figure out how to make the boar spawn and be killable and drop ham

brittle ledge
#

Yeah, you'll basically need to reskin an existing monster.

#

And add that reskin with FTM.

calm nebula
#

Or program new behavior with c#

brittle ledge
#

(I'm assuming that would be pretty difficult, given that no one's done it before?

lone ice
#

I got this far 🤣

#

{
"Action": "EditData",
"Target": "Data/Monsters",
"Entries": {
"ShipsAhoy_Boar": "200/5/0/0/false/1000/ShipsAhoy_BoarMeat/5/.01/4/3/.5/false/5/Wild Boar"
}
},

#

but I'm not sure that's allowed

calm nebula
#

Casey also has Monsters, the Framework

calm nebula
#

The real problem is that (a) it requires a twofer (art AND code skills) and (b) stardew combat is too shallow to really support much anyways

#

And very few people want to rework the entire combat system

lone ice
#

I did already animate the boar sprite so that's not an issue

#

and I'm not looking for crazy combat, just that it will damage the player on collision sometimes like most mobs

sharp hornet
#

When publishing a mod on Nexus, does the "mod language" option matter when the mod only edit data ? I set it to English because the mod description is in this language, is it right ?

tiny zealot
#

following the language of publication seems like a good choice in this case

brittle pasture
lone ice
#

I'm okay with doing C# but do you know if there is a guide for that anywhere?

brittle pasture
#

Not sure of any beyond just reading the decompiled code

tiny zealot
#

there are some very basic examples of setting up a C# mod on the wiki, but nothing especially complicated

brittle pasture
#

look at the classes in the StardewValley.Monsters namespace probably. And the spawning logic in the location classes

tiny zealot
#

you can also look at open-source mods to see how they are structured for hints

lone ice
calm nebula
#

!decompile

ocean sailBOT
lone ice
#

oooh ok

#

thank you!

#

I'll do both those things then

dusk terrace
#

does AT expose an API to register textures by c#? I'm not seeing any mentions, but just wishful thinking

dusk terrace
#

ahhh, nice! thank you

plucky reef
#

quick question, so there's this bit of base game code (mostly at least):

Can I do that but for custom animations and anywhere that a draw would happen?

#

like for this piece,

              //  Projectile.projectileSheet,
                projectile,
                Game1.GlobalToLocal(Game1.viewport, this.position.Value + new Vector2(0f, 0f - this.height.Value) + new Vector2(32f, 32f)),
                new Rectangle(0, 0, 24, 24),
                this.color.Value,
                angle,
                new Vector2(8f, 8f),
                projectile_scale,
                SpriteEffects.None,
                (this.position.Value.Y + 96f) / 100000f
                );```
I could make the custom projectile into a tilesheet and animation?
#

Asking because spawning the projectile above the monster's head looks awkward, having a 4-frame animation of it coalescing and then a 4-frame tail of it dissipating would look way cooler.

pine ermine
#
multiplayer.broadcastSprites(location, new TemporaryAnimatedSprite("TileSheets\\animations", new Rectangle(448, 256, 64, 64), 60, 5, 1, base.position.Value + new Vector2(16, 256), flicker: false, flipped: false));
b.Draw(
              //  Projectile.projectileSheet,
                projectile,
                Game1.GlobalToLocal(Game1.viewport, this.position.Value + new Vector2(0f, 0f - this.height.Value) + new Vector2(32f, 32f)),
                new Rectangle(0, 0, 24, 24),
                this.color.Value,
                angle,
                new Vector2(8f, 8f),
                projectile_scale,
                SpriteEffects.None,
                (this.position.Value.Y + 96f) / 100000f
                );
pine ermine
plucky reef
#

sick.

#

What's the difference between Draw and multiplayer.broadcastSprites? Does Draw not create the sprite for other players in a multiplayer game?

paper sundial
#

Draw draws the sprite to the spritebatch of the current players game instance and has no influence on multiplayer

pine ermine
#

Inside that projectile class there will be a virtual draw() function that you can override. Each frame, the render pipeline will call the draw function on your projectile giving it a SpriteBatch b as an argument. You would call the method b.Draw to tell the renderer what sprites to draw for your projectile and where to draw them on the screen.

plucky reef
#

huh

paper sundial
#

Make custom projectile type -> add to multiplayer projectiles -> sprite is drawn for everyone

plucky reef
#

so in multiplayer, that second code block would be visible on the caster's screen only, but the explosion animation (first code block) would be visible to all.

#

I am pulling in the base game Projectiles bit

pine ermine
#

The projectile object would be replicated, and since the projectile object draws it's own sprite, other players will see the sprite.

plucky reef
#

ah alright

#

the explosion animation is not an object so it needs to be specifically drawn as multiplayer

pine ermine
#

Exactly

plucky reef
#

the other option is to make it not a projectile and just play the animation and apply damage/debuff but I've made it work with projectiles so far so it feels bad to redo it.

#

dunno if that will bite me later.

lone ice
#

If we want a mod to include content patcher and C# files is it really two separate mods?

#

in terms of file structure

#

or can I have them all in the same Visual Studio project folder?

final arch
#

both

#

you can have them in the VS project folder in a way they're deployed automatically (dont ask me how tho :p)

#

but yeah when users use it they're 2 separate mods

lone ice
#

I don't get why it doesn't recognize the manifest

paper sundial
#

Look inside the folder in your mods folder

lone ice
#

what am I looking for?

paper sundial
#

a manifest.json file

lone ice
#

it's there but I created my project in that folder to begin with

#

and it's three levels deep

plucky reef
#

I feel the manifest should be one level up, not under dependencies, but I"m not on my home computer to check how mine is set up.

lone ice
#

I don't know why visual studio generated so many folders within a folder of my mod name

calm nebula
#

Manifest should be next to modentry yes

#

(Well, at the root)

lone ice
#

it's on the same level as dependencies I think though?

#

Every time I try to follow the most basic C# tutorial for modding I wind up with this weird three-levels-deep of the same folder situation

unique lion
#

Would anyone be able to give me a high level overview on what it would take to create a smaller fish pond mod? The Smaller Fish Pond mod that's been created and refreshed for 1.6 is quite bugged and a new one probably just needs to be built from scratch for 1.6

royal stump
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.

lone ice
#

oh ok

calm nebula
#

(Tbh I would probably just harmony patch draw function of normal fish pond class)

royal stump
#

SMAPI's nuget package should auto-generate a "wild game" mod folder when you build the project, but the code/project itself should be anywhere else

calm nebula
#

But it's fussy

#

Ie, i vague recall possible moddata sync issues

#

Wait I be dumb

brittle pasture
#

(with the new Data/Buildings I wonder if a 3x3 fish pond can just work or are there still hardcoded stuff)

calm nebula
#

Hardcoded draw stuff mostly

#

That's basically it

spice inlet
#

theres a hard coded check for fish ponds in the getfish function

#

probably still there in 1.6

calm nebula
#

Yeah

royal stump
#

making a data/buildings entry that uses the BuildingType and has appropriate patches might work, I guess? SDVpufferthinkblob

foreach (Building building in this.buildings)
{
    FishPond pond = building as FishPond;
    if (pond != null && pond.isTileFishable(bobberTile))
    {
        return pond.CatchFish();
    }
}```
calm nebula
#

My guess is if you (a) make sure it is instantiated as a fish pond and (b) check draw and collisions you're most of the way there

velvet narwhal
#

1.6.9 does have the fish pond shadow too-- you might have to redraw that?

unique lion
#

@royal stump @calm nebula Thank you both. Sounds like it could potentially be as easy as I'd hope it could be

lone ice
royal stump
spice inlet
#

Personally I wouldn't recommend using VS to edit CP mods as from my experience it does a really poor job when editing .json files

royal stump
#

yeah, I've seen some people have weird errors due to UTF settings or some such SDVpufferdizzy
(I have one VS project with CP bundled in, but it's 4 years old and idr how it's even set up now)

lone ice
pine ermine
#

@lone ice Double click on the [C#] Wild Game and copy & paste the file that it opens.

royal stump
#

SDVpufferthinkblob I'm not sure offhand then; reinstalling the nuget package might help it figure out what folder it's in, now, but that's my best guess

lone ice
#

what folder should the nuget package be in?

#

Mods?

hollow dust
#

when relocating the farmhouse, you can't put it in it's original place again:(

royal stump
lone ice
#

I set it up how I was supposed to then I tihnk

#

<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<RootNamespace>Wild_Game</RootNamespace>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Pathoschild.Stardew.ModBuildConfig" Version="4.1.1" />
</ItemGroup>

royal stump
#

that should be right, but iirc it would complain if it can't find Stardew Valley/Mods to put the output folder in SDVpufferthinkblob I'm not sure what else to suggest

lone ice
#

yeah this most basic step went wrong last time I tried so I was doing Content Patcher for a month

#

but I really can't do what I want now without C# 😅

pine ermine
#

Are there any build errors

lone ice
#

no

pine ermine
#

What happens when you hit the play button?

lone ice
#

it builds to the wrong location

#

OneDrive\Wild Game\Wild Game\bin\Release\net6.0\Wild Game.dll

pine ermine
#

Is that where you keep your project?

pine ermine
pine ermine
royal stump
#

the files (and a zipped copy of them) should appear in the bin/Debug or bin/Release folder anyway, but they should also appear in the Mods folder

lone ice
#

yeah they're just not doing that

#

maybe I have the wrong one?

royal stump
#

pathos's mod build config should be the correct package

lone ice
pine ermine
#

Yeah that's right

vernal crest
hollow dust
#

it's bcuz I checked the building layer and deleted all the possible tiles that could be blocking but no luck, that single tile is impassable, not buildable too

#

@velvet narwhal helped me removed the previous invisitiles but it seems like they missed a little one, and they're offline now

vernal crest
#

You can remove invisible tiles yourself. Just use the eraser on the Buildings layer on that spot.

teal bridge
# lone ice it builds to the wrong location

Keep in mind that the build and deploy are two separate things. It will always build to a bin\Debug or bin\Release, that's expected. However it should also create a .zip file and deploy the contents of that file to your mods directory.

#

If you see a zip file in your bin\debug or bin\release, but it's not ending up in your mods directory, then it means ModBuildConfig can't find your game. If the zip file isn't there (and you haven't disabled it, which according to your csproj you haven't) then there's something else wrong.

lone ice
vernal crest
hollow dust
#

alr thank you

teal bridge
#

I saw a little exclamation mark next to the "Analyzers" in your project tree. Can you expand that to see which analyzer is complaining?

#

ModBuildConfig is an analyzer. It would appear to have some error and is not running at all.

teal bridge
#

Like I said, expand the UI where the exclamation mark is showing next to analyzers.

#

See if ModBuildConfig is the one that's broken.

lone ice
#

yeah I just don't know what part of the interface is showing an exclamation mark

frosty hull
#

@next plaza HI, i have question about mod Space Core Version 1.17.1 on SV 1.5.6
what is "Type[] VanillaMainTypes"?
and how can i update type for android version?

ocean sailBOT
#

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

teal bridge
#

It was in the first screenshot you posted.

#

Under "Dependencies"

lone ice
#

you mean those black circles?

#

I didn't realize those were exclamation marks

teal bridge
#

That's what they look like to me, anyway... but expand the ModBuildConfig one, what does it say?

lone ice
#

oh it's upset about a LOT

teal bridge
#

Some of what's there might be noise, Visual Studio adds its own "comments". But if there's a real error it should show up.

lone ice
#

yeah they're like 4 pixels high on my screen, I just couldn't see any exclamation marks until I got another few levels deep

teal bridge
#

Those particular ones are just warnings, not actually breaking stuff.

ashen oak
#

TFW your prefix patch doesn't get called unless you completely rip the code from the calling function into your own function and use that as another prefix

lone ice
teal bridge
#

At this point it might be easiest to just post a zip of the solution, if you can - I suspect there's something higher level that we're overlooking, maybe a problem in the manifest or just something off about the overall solution structure.

#

System.Text.Json is not involved in Stardew mods at all, not sure why it even shows up there.

calm nebula
#

(Or the build output)

#

I don't recall how to

#

But kt should be logging quite a bit

ashen oak
calm nebula
ashen oak
#

The original function? Not large

teal bridge
#

That too, you can check the Output tab in VS to see what ModBuildConfig is doing as it does log its output - though I sorta suspect it's doing nothing at all.

ashen oak
calm nebula
#

If a function is inlined harmony can't patch it

next plaza
lone ice
#

Build started at 1:41 PM...
1>------ Build started: Project: Wild Game, Configuration: Release Any CPU ------
1>Skipping analyzers to speed up the build. You can execute 'Build' or 'Rebuild' command to run analyzers.
1>Wild Game -> C:\Users\XXXX\OneDrive\Wild Game\Wild Game\bin\Release\net6.0\Wild Game.dll
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
========== Build completed at 1:41 PM and took 00.293 seconds ==========

#

that's what it outputs

teal bridge
#

Well, that confirms ModBuildConfig isn't running at all.

next plaza
#

I wonder if it's because it's having problems from being on onedrive

teal bridge
#

Whether that's because it's configured incorrectly or due to that "Skipping" line, I'm not sure.

lone ice
#

It had hte same problem in other folders too

ashen oak
teal bridge
#

(Can't remember if I've seen that message before)

lone ice
#

I've tried putting it in multiple places, not just one drive

next plaza
#

I've seen the skipping line before, it seems like it happens when you directly right click and run? Or I've not noticed it otherwise

teal bridge
#

Try doing what the message says and run a Rebuild.

calm nebula
#

Not Roslyn

#

You can't tell from the IL

teal bridge
#

If you still see no ModBuildConfig messages in the Output tab, then there's something wrong with the way the project is set up and it'll probably be easiest to track down if you post a zip of the whole thing.

ashen oak
teal bridge
#

(There are just so many reasons why an analyzer might not run in this case, and it's way slower to go back and forth for each possibility...)

ashen oak
teal bridge
#

Also, regarding the other conversation going on here, if you need to patch the calling method I'd say it's better to put in a transpiler than to prefix that entire caller.

calm nebula
ashen oak
calm nebula
#

But I can understand why people don't want to jump to a transpiler

#

I really enjoy transpilers

#

Tbh

teal bridge
#

If you find yourself copying the body of an entire decompiled function and pasting it into a prefix, that's the time to write a transpiler.

calm nebula
#

Maintenance isn't fun but they are fun to write

ashen oak
lone ice
ashen oak
calm nebula
#

Which mod?

ashen oak
calm nebula
#

Ah

teal bridge
#

A mod Harmony-patching another mod's functions? (<looks sideways at Atra>)

calm nebula
#

Lol

#

It's a thing! You can do it

teal bridge
#

Believe me, I know it's a thing.

calm nebula
#

It's fragile though

ashen oak
teal bridge
# lone ice

Huh, it actually works on my machine. Although I do notice your RootNamespace is wrong in your manifest, it says Wild_Game and should actually be WildGame per your code. But that doesn't seem to be the main issue.

#

You tried the "Rebuild" option in VS already?

lone ice
#

I tried build and rebuild multiple times

next plaza
frosty hull
next plaza
ashen oak
# ashen oak In this case, the fragility is a feature

(Context: So Aquarism adds some metadata (and management of same) to fish ponds to track fish quality and uses a patch to decide which individual fish you get back when retrieving. This worked in MARGO pre-1.6, but now not so much. I'm pretty sure at this point (based on patching the same function) that the patch just isn't getting called even though the calling code is reached (based on extracting the entire calling function into a prefix and breakpointing it)

grizzled rain
#

hello, I'm trying to make a mod where you can obtain refined fire quartz from smelting regular fire quartz, I'm not sure how to go about doing this, can someone give me some pointers please?

teal bridge
ashen oak
#

(side note: there are probably better tools for figuring that out than extracting in such a manner--maybe reverse patch?)

#

(or breakpointing the IL instead of the C#?)

calm nebula
ashen oak
teal bridge
#

Huh. To be honest, I have no idea. Wonder if Pathos has run into this.

calm nebula
#

(For debugging, like. I'll just throw in a new StackTrace or whatever)

teal bridge
#

Everything about the project/solution is set up fine. Whatever the problem is, has to be related to your VS instance or machine setup.

ashen oak
calm nebula
#

So it was the fast way to figure it out

#

I say "mine"

teal bridge
calm nebula
#

It wasn't mine, Elizabeth was doing the real debugging I just was offering advice over the phone

lone ice