#making-mods-general

1 messages ยท Page 18 of 1

rancid temple
#

Yeah, that's how the system is designed, so it's the easiest way to leverage it

surreal trout
#

I did the maps just for fun, so I won't pay for the mod design anyway

#

Compared to the fare system, I prefer to introduce the time-lapse mechanism first

rancid temple
#

Yeah, sorry tired, forgot my tone indicator (/j)

glad grove
#

are any events transferring those args? I guess "DayEnding" happens before, so that doesn't?

rancid temple
#

What args?

surreal trout
#

You now travel to anywhere without consuming time. That's pretty unrealistic

glad grove
#

the profit variables, like farming, total etc.

naive wyvern
#

to be fair, stardew isnt a very realistic game to begin with kamo_laugh

rancid temple
#

Yeah, most of the game opts away from realism

#

That's my preference too, when it comes to games in general

lucid iron
#

Minecart warp but you have to beat junimo kart to go anywhere

rancid temple
surreal trout
#

You can have real-time travel in game using totems and warp towers. The minecarts, bus and boat should not be such a convenience

rancid temple
#

And by walk I mean, speed 10 buff forever

lucid iron
#

At least minecart warp is all in a particular function, in GameLocations

#

U can patch that to do whatever

hallow prism
#

is "anecdote" a common enough english word?

lucid iron
#

Yeah

rancid temple
#

Yeah, I think so

hallow prism
#

good ๐Ÿ™‚

#

(i only moderatly trust google translate)

lucid iron
#

Anecdote like a story right Bolb

surreal trout
#

I'm not a native speaker and I know this word. Common enough.

hallow prism
#

(one day it told me the equivalent of french "angine" was english "angina" and people were super worried!!!
(i had a sore throat)

#

yes, like small facts about something or short story

lucid iron
#

English has a big ol using <francais> on top so if u sneak in a french word I would never know

rancid temple
#

English loves to steal words and twist their meaning

hallow prism
#

there's definitively cases that went "you used word X, but i think you meant word Y" because i used a word like "reunion" but it has a slight different meanting/no one use it in this context

calm nebula
#

(In French it's sore throat.)

rancid temple
#

I wonder how we fucked that up so bad, the root of the word is Latin and Greek for "choke" and "strangle" and at some point we were like "heart pain"

hallow prism
#

luckily you were around to say "lumi i believe you mean another word" because you had enough knowledge to be "hmm, wait a minute"

lone ice
#

hello! does anyone know the right way to add "percentchancespawn" to "Loot" in Farm Type Manager mods?

#
{
   "MonsterName": "slime",
   "Settings": {
     "SpawnWeight": 2,
     "RelatedSkill": "Combat",
     "MinimumSkillLevel": 2,
     "Loot": [
       "ShipsAhoy_Poultry"
     ],
     "ExtraLoot": false
   }
 }
#

I have this which all works

rancid temple
lucid iron
#

!codeblock

ocean sailBOT
#

You can embed code in Discord using a series of three ` :

Your code can go here
Even if not a haiku
Just an example

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

lone ice
#

It's this I don't understand how to format in relation to the poultry

#

and still be able to add other drops

#

I don't know how to do either one

dense jolt
#

Is there any framework or something I can use to create a custom collections page?

finite ginkgo
#

No

ornate trellis
#

I wanna add my traffic cone

finite ginkgo
ornate trellis
#

i mean hat

rancid temple
dense jolt
rancid temple
lucid iron
#

Hm do you have to just make multiple versions of the monster think

rancid temple
#

I was trying to find an example, I can never remember which mods have the packs of examples but I guess FTM isn't one

lucid iron
#

Or make a separate item setting entry

#

And use the name of that entry in the loot list

hallow prism
# lone ice

pretty sure this is not for monsters, hence monsters not being listed

lucid iron
#

Lumi do you have example of random chance monster drop in vmv bolbwawawa

rancid temple
#

I think you just create a model with the choices you want

hallow prism
#

no

#

because there's no random chance for monster drop

#

the only way to emulate that is to have the monster weight and have some of the variation drop stuff and other don't

rancid temple
#
"Loot": [
  {
    "Category": "Object",
    "Name": "ShipsAhoy_Poultry",
    "PercentChanceToSpawn": 50
  }
]
#

Woops, that's gotta be the item ID (I guess it can be the name too, that seems like a bad way to match the item though)

hallow prism
#

Esca knows its not the most convenient stuff, but it's not easy to change because lot of stuff in FTM would need to be reworked and it's an exhausting task

ornate trellis
rancid temple
#

Anyways, my example is based on an example directly below that table

#

That's literally for adding things from this table to the Loot of a monster

naive wyvern
#

Lumiii how did you make your mines?

rancid temple
#

(Looks like the Notes in the table will tell you which types of things it can be used for as well)

hallow prism
#

hmm, it is strange, i'm pretty sure there wasn't that when i did my monsters (otherwise things would have been easier), but i don't see when it was changed in changelog

rancid temple
#

Silent update /j

hallow prism
#

which part of them?

royal stump
#

SDVpufferlurk as far as I know, percent chance should work on monster loot lists, and I think it has since I added those

naive wyvern
#

I was looking through your mod page just now and I was wondering if you made a custom area that functions like the mines

#

i havent actually played through yet ๐Ÿ˜ญ I dont have time to sit down and play :( so I kind of just guess from images uighdsfiugsf

hallow prism
hallow prism
naive wyvern
#

ohhh I see, so its not auto-generated like base game mines

#

okay thank you!! SDVpufferheart

rancid temple
#

I was trying to think how you could use CP and FTM to make a vanilla-like random mine system and the amount of work required is making me tired just considering it

naive wyvern
#

i was gonna ask about that too actually ghdsuigdfs our wavelengths roku

hallow prism
#

there's spacecore dungeon feature

#

you may be interested in looking into that

lucid iron
#

That one is more like volcano I think?

royal stump
#

I try not to think about dynamic levels too much, but generally my conclusions are "clever randomized map patches" or spacecore's new thing, yeah SDVkrobusgiggle

hallow prism
#

(i definitively am, but it'll requires some mental preparation because it's lot of things to process)

lucid iron
#

Fixed floors that u draw as tmx

rancid temple
#

As with most things SpaceCore related, I look forward to the new docs lol

naive wyvern
#

can you, theoretically, reskin the dungeon levels to be more like the forest instead of caverns? (spacecore)

hallow prism
#

it's already in the docs

royal stump
#

my next project when I get time to mod again is adding trigger action controls to FTM, which will be similar but not as "set piece" oriented as spacecore, at least from what I've seen

hallow prism
#

and there's an example pack

royal stump
#

so for dungeon stuff, figuring that out would probably help anyway

naive wyvern
#

oh! yay example pack

rancid temple
#

Example pack is very nice. Walls of nearly unbroken text trigger my fight or flight

finite ginkgo
naive wyvern
#

that is nice to know, thank you EnderTedi SDVpufferheart

hallow prism
#

oh, now i remember what the issue with loot was. Sorry for mixing things up! What happened that needed me to multiply monsters entry was that the new loot erased all classic loot (which i believe is still the behaviour ?), but i have no idea how it works with randomised stuff.

royal stump
#

ah, yeah, if you set "Loot" to anything, FTM clears the monster's vanilla loot list
(but not the "extra loot" generated by other code, so that became a separate toggle SDVpufferdizzy)

supple jackal
#

I have the JSON schema checker in VS Code โ€” canโ€™t figure out why itโ€™s upset with my version number. Having a similar issue with update key. I know it doesnโ€™t really matter that much but it bugs me lol

calm nebula
#

Will you make it out alive with your new 55" TV?

hallow prism
rancid temple
#

For manifest, I usually put the schema in there, set up my manifest, then remove it so it stops complaining lol

rancid temple
#

Just keep in mind what Esca and Lumina have said and that if you're editing a vanilla mob you'll lose the vanilla drops

hallow prism
#

(sometimes it IS a good thing, depending of what you want)

#

(i'd just wish there would be a "inherit vanilla drop" thing or something)

latent mauve
#

Best option would be if there was a way to use the append text operation to add rather than it completely replacing for monster loot :/

hallow prism
#

it should be doable

#

but then it's not in FTM itself

latent mauve
#

Yeah, append is a CP thing

hallow prism
#

and while it may work for some cases, i was a bit wary in VMV of using it in fear of having a lot of reloading of assets (even if it's likely fine if it doesn't change too often)

royal stump
#

re: FTM at least, I've made a note to add an "OriginalLoot" setting or some such to allow custom loot while keeping w/e the monster's original drops were

wanton pebble
#

pokes head in with the PLAYER_HAS_SEEN_EVENT GSQ, are you able to put multiple event IDs after it to check any of the events, or do I need to use ANY for this?

royal stump
#

it'll be a but unintuitive for backward compat, but it's pretty simple to add either way

#

stepping out for a sec, but I think the event GSQ only takes one event ID, glancing at the code

rancid temple
#

Couldn't you just default it to false for backward compat?

royal stump
#

wiki would probably say if there's an <ID>+ option

wanton pebble
#

mehhhh okay

royal stump
#

the original loot will still get cleared unless the new option is toggled, yeah

hallow prism
#

thanks esca for considering that ๐Ÿ™‚ and to be clear, i love FTM and what it allows

wanton pebble
#

grumbles about it a little, then gets back to coding the minor stuff needed to do a few days of play hopefully followed by ideas for modding

hallow prism
#

being a content modder is all about mastering workaround anyway so i am grateful for all the cool feature framework modders add

wanton pebble
#

I'd need a better example than "Lyoko wants a music cue that would otherwise be lost in migration" for that, I think XD

royal stump
#

(okay back, can confirm "player has seen event" only looks at 1 ID and ignores everything after the space SDVpufferpensive)

rancid temple
#

You'll only take emotional damage if Pathos says no

hallow prism
#

if it has regression risk, then no amount of usefulness will make it happen if it's mod only

#

if the risk is low then it can happen even if your current example is minor

wanton pebble
#

... I guess you're both right

#

@ivory plume would it be possible to let the GSQ PLAYER_HAS_SEEN_EVENT allow multiple arguments for 1.6.9, assuming it has extremely low to zero regression risk only? Running into a case where a song is heard in multiple previous events with different preconditions in a mod update, so making a migration trigger action's a little annoying with basically needing to do an ANY. A similar use case would potentially be a mod with multiple paths to get something done via trigger action, if that's helpful.

hallow prism
#

(by the way pathos thanks for the answer about the debris stuff! i understand why it can't be done)

ivory plume
#

I'll take a look soon. Thanks for reporting it!

warm egret
#

I want to display the duration of buff, however, if all values under CustomsAttributes are equal to 0, then the duration will not be displayed. How to solve this?

lucid iron
#

you need to make a Data/Buff entry

#

follow the wine "Tipsy" format

rancid temple
#

Or don't use BuffId and it will use the Duration from Data/Objects

lucid iron
#

(also ้šๅฃฐ -> ้š่บซ blobcatgooglyblep)

glad grove
warm egret
lucid iron
warm egret
lucid iron
#

ah but when you do get the buff

#

the icon works and shows duration?

#

you may just have to transpile IClickableMenu.drawToolTip to remove the effects.HasAnyValue() check

pine ermine
#

Does the wiki not have an example of a event script?

#

Content Patcher doesn't have one

pine ermine
#

Can I have a link to that?

brittle pasture
#

you can also unpack the game files

pine ermine
#

That page does not have what I see in that image

#

Oh

#

I'm dumb

#

It's collapsed

#

Is there a way to make a link that has it unfolded automatically?

final arch
#

no

pine ermine
#

This is for a mod-author-facing example.

#

not just for me

#

I'm not being picky for no reason.

plucky reef
#

So... when it comes to using other modder's assets (in this case a harp sprite)... the mod is on a copyleft license, but I assume it's still required to request permission from the mod author. But what if the only reference to the mod is the redux version and the person who ported it forward?

lucid iron
#

You are unable to make that other mod a dependency?

plucky reef
#

I don't want the other mod as its core function is mutually exclusive to mine (probably maybe). And it's broken.

lucid iron
#

Well if it's copyleft (open permission to use and modify assets) then asking is a courtesy, not requirement

plucky reef
#

If I need to make my own harp sprite that's fine, was just wondering if that's uncommon to use assets from other mods in that fashion.

#

That or I need to sift through all the tilesheets to see if the cutscene with the harp is something usable.

lucid iron
#

Is that cursors monS

brittle pasture
#

wasnt it like part of the farmer sprite

#

in the event

plucky reef
#

aha yes, farmer_base.png

#

would work except it has the farmer's hands all over it

#

but easy enough to pull out and modify

#

I need to find a way to isolate the modding stuff into another desktop that I can fold down to free up resources, between all the tabs and tools and two copies of VS22 (one for the mod and one for decompiled base game lookups) and 10 tilesheets open...

teal bridge
plucky reef
#

the distinction that copyleft requires that any subsidiary/modification is also copyleft?

teal bridge
#

Yes, more or less, although "copyleft" is a broad category and the actual license usually has more specific restrictions.

#

While it's mostly only a concern for businesses, you do have to be careful even with hobbies and personal projects because if you somehow end up depending on GPLed code, you not only can't release as closed-source, you can't release as completely open source either (like MIT/Apache).

#

It's a headache which is why (as far as I know) we basically all use MIT here. I don't think I've ever run into a GPL mod.

uncut viper
#

(coincidentally i did just yesterday)

plucky reef
#

Mystical Buildings, Harp of Yoba Redux, BetterMeowmere, all have GPL.

teal bridge
#

Ick. You could probably make the argument that copying their API into your project (assuming they have one) does not constitute a true derivative/source dependency because the API is just a specification and does not even contain any executable code. But, it's dicey.

lucid iron
#

Huh what's the details of "not completely open source" per gpl?

teal bridge
#

If they don't have APIs then it's pretty much irrelevant anyway.

uncut viper
#

i looked at better meowmere out of curiosity just now and apparently its not just GPL but "Affero GPL" that i hadnt heard of before which adds a network use clause that i dont fully understand (or at least not understand how it'd apply to a stardew mod)

plucky reef
#

I don't think they do... mystical buildings is the only one that acts as a framework for creating things and doesn't create any buildings itself anyway.

teal bridge
# lucid iron Huh what's the details of "not completely open source" per gpl?

Each version of the GPL is more restrictive than the last, but in general it's what I said: you cannot use GPL in anything closed source, literally no individual part of the project can be closed source no matter how small, and you cannot include it in any project that has a less-restrictive license either (i.e. that would permit your code to be used in something closed-source).

plucky reef
#

my guess is the network bit is that the meowmere projectile uses Netcode?

teal bridge
#

There've been a lot of cringey legal battles over this stuff, GPL authors suing companies because their frontend used an open source library but their backend code is closed-source (like, obviously, otherwise they don't have a business).

uncut viper
#

"When a modified version is used to provide a service over a network, the complete source code of the modified version must be made available"
thats what github has to say about the network clause, so i guess a multiplayer server would count?

teal bridge
#

It's an area you don't want to get into unless you're a lawyer. Even if you are a lawyer.

lucid iron
#

oh i been interpreting that as "if you use GPL your whole project has to be open source"

#

making GPL more open sourced than MIT

teal bridge
#

Yes but it's not just about your project, it's about your project's license.

#

GPL makes statements about how you can license your own work that depends on the GPLed thing.

uncut viper
#

it means you cant let other people use the parts YOU made in your project with something like MIT to do with as they see fit, bc your project is nmow all GPL

teal bridge
#

Right. I had to change one project from MIT to GPL because I didn't realize one tiny component was GPL.

#

GPL and copyleft is "viral".

uncut viper
#

i was about to ask what the term was for those kinds of licenses again, read my mind

teal bridge
#

I don't think viral is an official legal term, but it's the most descriptive one to me. If it's anywhere, it's everywhere.

uncut viper
#

i doubt it but its also the one ive always heard

#

just couldnt remember it in the moment there

wide lake
plucky reef
#

Well it sounds like I need to change my license to MIT and make sure I'm not using any GPL components from other mods, which I don't think I am but it does bring up a question.

Mod A adds, say, a projectile. I look at that code and use it, with various changes (change number of arguments, use different variables, different art, different override behavior but same general template), to make my own projectile. To what extent does it need to change to be considered "mine"?
I do not believe that anyone running my mod at its completion will make any connection to any other mod.

#

Projectile is maybe a bad example since stardew base has the template as well.

#

Or I add a weapon, but the method of doing so is using the asset requested thing so that doesn't count since it is literally fill in the blank.

uncut viper
#

as always take this with a grain of "i am not a lawyer" but to my understanding no amount of changes will remove the original copyright holder's claim to it

plucky reef
#

That's fair.

uncut viper
#

maybe if you changed literally every line so that it was indistinguishable (but at that point, why use theirs at all?) and also did it in one single commit so that none of the original showed in your commit history, then probably no one would notice. but you would be, technically, still transforming the original work

#

at that point its probably more a matter of enforcement

lucid iron
#

We r in big grey area with modding anyways

plucky reef
#

I'm not feeling pressed about it at the moment because right now, I have made some api calls, added a projectile that's been rewritten five times and at some point I deleted the project and grabbed the base game bits, and added a weapon through the assetrequested function, so not really super novel code.
On rethinking regarding art, I'll just do all custom art.

dense jolt
#

As a major fan of FOSS software I release everything under GPL

velvet narwhal
#

i was honestly just going to dig into content packs for if people wanna replace art SDVpufferrad i make base ones and go, "if you don't like it, make a content pack"

plucky reef
#

I've been finding mods that do a small component of what my end product will to understand how it's doing what it's doing but most of the time it's, write in the bits that are useful, run it and iterate until there's no errors, which hopefully gets me to a level of understanding that I can do my own, strip and rewrite to my own desire, add in other functional bits.

#

Basically the same way I learned sql.

velvet narwhal
#

yeah gray area of copyright because there's a lot of innovative ways to do things but you could also just do a bunch of if:else statements until it works properly so i mean SDVpufferflat

dense jolt
#

Would probably use a switch statement instead of if else ๐Ÿ˜…

velvet narwhal
#

listen if toby fox can do it --

lucid iron
#

Smh just use goto

dense jolt
#

One of my teachers gets mad if I don't use switch statements lmfao

velvet narwhal
#

i did an entire randomizer in if:else to prove a point

#

christ though chu the IMinigame is a pain in the ass SDVpufferflat

dense jolt
#

Btw anyone wanna help me write a mod that adds a collection tab for hats ๐Ÿ˜…

#

The moment I have to do things with UI I give up ๐Ÿ˜”

old edge
#

finally got my code to work somewhat. I am implementing a custom rescue event that occurs when the player is swimming in water and they are defeated. So far I got a dialogue box to appear and they are warped but not before the game freezes a bit and spits out logging rapidly for a few minutes.

sleek aurora
#

I have a question)) I don't like the appearance and localization of several flowers from SWE. How can I make changes using my mod so that the image and localization do not change with each SWE update? Should I just create the same objects in my mod or should I make a link to the change in the SWE file (if such a thing is even possible)?

velvet narwhal
#

dependency=false, iirc, it will load the dependency then yours will overlap *in manifest

lucid iron
#

Textures you can just patch over, inspect the SVE content patcher part to see what the targets are

#

I am not sure about localization, don't think you can patch i18n

#

Would it require replacing the i18n key?

velvet narwhal
#

i think you just have to target the same i18n key

#

works for me SDVpufferwoke

wanton pebble
#

Neither, technically.

lucid iron
#

Ok cool ukimasu2

wanton pebble
#

If we're talking about Flower names, you'd just edit the display name field

lucid iron
#

Yeah this case is like

#

There's existing i18n

wanton pebble
#

so I could make it a non-i18n thing and it'd work perfectly, as long as it's not, y'know, public

#

yeah but existing i18n doesn't matter if you're not changing it in-mod

lucid iron
#

I feel like replacing the name field would remove all existing translations, tho I suppose that's unimportant

wanton pebble
#

Example. My (theoretical) dialogue patch to Characters/Dialogue/MarriageDialogueAbigail uses "fun_Leave": {{i18n:Abigail.FortuneMarriage}}. If I'm changing it in-mod, you edit the Abigail.FortuneMarriage key. But if it's outside the mod? Screw it. Just edit it as "fun_Leave": "Huh, I guess this is a dialogue key!"

#

The same applies for display names of items

sleek aurora
#

For translation I will put my own key, the main thing is that my mod runs on top of SWE

wanton pebble
#

you'd field edit the display name with "DisplayName": "Pufferchick Statue", or w/e while having a true dependency on SVE*
* edit due to your mod requiring SVE

lucid iron
#

All u need is the dependency

#

Set that up in manifest

#

It tells smapi to load your mod after smapi

wanton pebble
#

That'd be correct. Once you have the dependency, the rest is irrelevant - translations are up to your mod, not SVE's keys

#

Dependencies my beloved

sleek aurora
#

Thanks, I'll try it))

lucid iron
#

I think this situation means it's a required (true) dependency tho

#

If your mod otherwise does nothing without sve

wanton pebble
#

....yep. One sec, I'll fix

sleek aurora
#

My mod is essentially a CP-based assembly of my objects and objects from other mods. Just to minimize the number of downloaded mods and for convenience)) And yes, it looks like dependency is what I need))

ornate trellis
#

hm, quick question but...did I do something wrong to this edit? I wanted to add my hats to hat mouse (conditioned // cuz I jsut wanna see if they pop up before I do them)

{
            "Action": "EditData",
            "Target": "Data/Shops",
            "TargetField": [ "HatMouse", "Items" ],
            "Entries": {
                "{{ModId}}_FishmongersHat": {
                    "Id": "{{ModId}}_FishmongersHat",
                    "Price": 2000,
                    //    "Condition": "HAS_SEEN_EVENT <ID>",
                },
                "{{ModId}}_MermaidCirclet": {
                    "Id": "{{ModId}}_MermaidCirclet",
                    "Price": 2000,
                    //    "Condition": "HAS_SEEN_EVENT <ID>",
                },
                "{{ModId}}_TrafficCone": {
                    "Id": "{{ModId}}_TrafficCone",
                    "Price": 2000,
                    //    "Condition": "HAS_SEEN_EVENT <ID>",
                },
                "{{ModId}}_PearlCirclet": {
                    "Id": "{{ModId}}_PearlCirclet",
                    "Price": 2000,
                    //    "Condition": "HAS_SEEN_EVENT <ID>",
                },
                "{{ModId}}_FishmongersFishHat": {
                    "Id": "{{ModId}}_FishmongersFishHat",
                    "Price": 2000,
                    //    "Condition": "HAS_SEEN_EVENT <ID>",
                },
                "{{ModId}}_FishmongersFlowerCrown": {
                    "Id": "{{ModId}}_FishmongersFlowerCrown",
                    "Price": 2000,
                    //    "Condition": "HAS_SEEN_EVENT <ID>",
                }
            },
        }

I used the fishshop example from the wiki

marble verge
#

Good evening. Is there a way to apply EditImage to an array of images? I.e. multiple FromFile?

brittle pasture
#

You didn't specify ItemId

ornate trellis
#

ah, frick

stable grotto
#

is the line Join us. Thrive. in any other file besides 1_6_Strings?

wanton pebble
#

I.e. give us an example of what you're trying to do

marble verge
#

{
"Action": "EditImage",
"Target": "[Array]",
"FromFile": "Recolors/{{Recolor}}/{{TargetWithoutPath}}.png",
"PatchMode": "Replace",
"When": {
"HasFile:Recolors/{{Recolor}}/{{TargetWithoutPath}}.png": "true",
"Recolor |contains=(None)": false
}
}

#

Would this work?

lucid iron
wanton pebble
#

I should specify, Luke. What do you mean by [Array] in this instance

#

the rest is normal to me, but [Array] isn't valid syntax so I need whatever that is specified.

finite ginkgo
marble verge
#

That'd be a bunch of Maps/[Loaded Tilesheet]

wanton pebble
#

then what Ender said

#

you can specify multiple targets e.g. "Target": "Portraits/Abigail, Portraits/Leah" and then {{TargetWithoutPath}} would be Abigail first, then Leah, and all would apply at the same time

stable grotto
# lucid iron it's on town buildings image

that I know; I meant as in any other text reference?
trying to swap the German Macht mit. Entfaltet euch. with Tritt bei. Gedeih' (cause that one fits on the Joja sign)

wanton pebble
#

Hell I think I have an example in my personal mod or in the SCA code I did

marble verge
#

Okay, great. That'll cut the number of Includes way down.

wanton pebble
#
            "LogName": "Load Abigail's (DSV and SCA) Closet",
            "Action": "Load",
            "Target": "Portraits/Abigail_BlockParty, Portraits/Abigail_DesertFestival, Portraits/Abigail_EggFest, Portraits/Abigail_Ember, Portraits/Abigail_Fair, Portraits/Abigail_Fall, Portraits/Abigail_FallPyjamas, Portraits/Abigail_FallPorchPyjamas, Portraits/Abigail_FallRain, Portraits/Abigail_FallWind, Portraits/Abigail_FashionFestival, Portraits/Abigail_Fireworks, Portraits/Abigail_FlowerDance, Portraits/Abigail_Gathering, Portraits/Abigail_IceFestival, Portraits/Abigail_Jellies, Portraits/Abigail_Luau, Portraits/Abigail_NightMarket, Portraits/Abigail_NightMarketOutside, Portraits/Abigail_Pyjamas, Portraits/Abigail_Snowy, Portraits/Abigail_SnowyIndoor, Portraits/Abigail_SpiritsEve1, Portraits/Abigail_SpiritsEve2, Portraits/Abigail_Spring, Portraits/Abigail_SpringRain, Portraits/Abigail_SpringWind, Portraits/Abigail_SquidFest, Portraits/Abigail_Summer, Portraits/Abigail_GreenRain, Portraits/Abigail_SummerPyjamas, Portraits/Abigail_SummerRain, Portraits/Abigail_TroutDerby, Portraits/Abigail_Winter_Indoor, Portraits/Abigail_Winter_Outdoor, Portraits/Abigail_WinterPyjamas, Portraits/Abigail_WinterStar, Portraits/Abigail_Island, Characters/Abigail_BlockParty, Characters/Abigail_DesertFestival, Characters/Abigail_EggFest, Characters/Abigail_Ember, Characters/Abigail_Fair, Characters/Abigail_Fall, Characters/Abigail_FallPyjamas, Characters/Abigail_FallPorchPyjamas, Characters/Abigail_FallRain, Characters/Abigail_FallWind, Characters/Abigail_FashionFestival, Characters/Abigail_Fireworks, Characters/Abigail_FlowerDance, Characters/Abigail_Gathering, Characters/Abigail_IceFestival, Characters/Abigail_Jellies, Characters/Abigail_Luau, Characters/Abigail_NightMarket, Characters/Abigail_NightMarketOutside, Characters/Abigail_Pyjamas, Characters/Abigail_Snowy, Characters/Abigail_SnowyIndoor, Characters/Abigail_SpiritsEve1, Characters/Abigail_SpiritsEve2, Characters/Abigail_Spring, Characters/Abigail_SpringRain, Characters/Abigail_SpringWind, Characters/Abigail_SquidFest, Characters/Abigail_Summer, Characters/Abigail_GreenRain, Characters/Abigail_SummerPyjamas, Characters/Abigail_SummerRain, Characters/Abigail_TroutDerby, Characters/Abigail_Winter_Indoor, Characters/Abigail_Winter_Outdoor, Characters/Abigail_WinterPyjamas, Characters/Abigail_WinterStar, Characters/Abigail_Wedding, Characters/Abigail_Island",
            "FromFile": "assets/Art/{{TargetPathOnly}}/Abigail/{{TargetWithoutPath}}.png"
        },```
#

that's a super long example but still

ornate trellis
#

heck yeahhh hats ingame...just need to write down to do conditions once i did the events that are supposed to unlock them

marble verge
#

Making it conditional by checking if the file exists won't hurt?

lucid iron
marble verge
#

As in, it'll do the check for each file?

wanton pebble
#

I mean it won't hurt to do but I'd be more concerned if the files DNE when you upload it

marble verge
#

I start by loading a vanilla tilesheet, and only edit the ones that actually have a recolor file available. That's the idea, anyway.

wanton pebble
#

Uhm

marble verge
#

How can I turn something I post into a code block?

wanton pebble
#

you're loading a vanilla tilesheet?

#

I don't know if that's advisable

#

editing it, sure

#

Loading.... concern.

#

and you use three backticks

marble verge
#

Ah, I mean a tilesheet provided by a mod

#
    "Changes": [
        {
            "Action": "Load",
            "Target": "Maps/AbandonedStore",
            "FromFile": "assets/.AbandonedStore.png",
        },
        {
            "Action": "EditImage",
            "Target": "Maps/AbandonedStore",
            "FromFile": "Recolors/{{Recolor}}/AbandonedStore.png",
            "PatchMode": "Replace",
            "When": { 
                "HasFile:Recolors/{{Recolor}}/AbandonedStore.png": "true",
                "Recolor |contains=(None)": false
            }
        }
    ]
}```
wanton pebble
#

there ya go

marble verge
#

That's an example

wanton pebble
#

yeah that's all good then

marble verge
#

But I want to do all tilesheets in one fell swoop

wanton pebble
#

Seems doable with the right naming conventions

marble verge
#

It'd be even better if I could pass Replace or Overlay as a variable, but I guess that's not happening.

lucid iron
#

I think you could use dynamic token there, maybe

marble verge
#

But I'd need some way of knowing if a recolor tilesheet that was included wants to replace or overlay

velvet narwhal
#

an outside include? or from your own mod?

marble verge
#

Hypothetically, if someone else also wants to throw a recolor into the mix

#

This is equal parts doing and learning

#

Took me long enough to escape InternalAssetKey, now I'm trying to see how far I can take it

valid folio
#

Hi, me again. Does anyone know how to put any egg and any milk into a recipe?

ornate trellis
#

-6 for milk, -5 for eggs

#

aka, use the category (doesnt work for all tho, I believe)

hallow prism
#

eggs, milk and fishes i believe are the one supported

valid folio
brittle pasture
marble verge
#

Interesting. If I have a map file and a tilesheet with the same name, loading the map and then loading the individual tilesheet works - but when I try to batch load the tilesheets, I get crashes.

#

Does InternalAssetKey not care about different types of assets having the same filename?

gaunt orbit
marble verge
#

Yeah, that's what the would-be crashes are telling me.

gaunt orbit
#

I recommend not using InternalAssetKey in this case because it will make it easier to see how it works and understand what's broken

marble verge
#

I'm not using it, I'm trying to work around a mod that does

gaunt orbit
#

Ah sorry my bad

marble verge
#

This mod has Airport.tmx and Airport.png, for example

#

The Airport.tmx gets loaded into Maps/Airport

#

But I guess InternalAssetKey ensures that Airport.png gets used without being loaded

gaunt orbit
#

Oh so in that case loading replacement tiles won't work anyways

marble verge
#

Well, I found something of a workaround

gaunt orbit
#

Because it's using the png directly

marble verge
#

Prefix the tilesheet with a dot and then load said file

gaunt orbit
#

Yeah that would do it

#

Except for the whole same name problem

marble verge
#

Yeah, exactly

gaunt orbit
#

You can edit the tmx in a text editor to change the name of the sheet

#

But that's pretty much your only option here

marble verge
#

Yeah, I've had to do that for several maps already

#

There's also a mine.png - the implications are pretty obvious

gaunt orbit
#

I wish you luck, that sounds like a headache

marble verge
#

It is, but it's also fun to figure out how much I can do without touching the original files

#

But it's starting to look like I'll have to fix the tilesheet naming in the .tmx's directly

#

I wanted to avoid that to make updating easier

#

I have concluded that InternalAssetKey is about as compatibility-unfriendly as it gets

gaunt orbit
#

InternalAssetKey just loads it in the background and then gives the place it loaded it to

#

All maps and tilesheets have to be in Maps/ though

#

So it's... not quite as useful there

marble verge
#

This mod has everything dumped in assets/

#

Well, .tmx and .png-wise, anyway

gaunt orbit
#

I meant in game assets not in the mod paths

marble verge
#

Oh, right

indigo yoke
#

@wanton pebble it might not be mastery extended, or it could be regular luck also patches the level cap. Dunno, will continue to look through the code. Might be worth it to test without mastery extended

brittle pasture
indigo yoke
wanton pebble
#

If it doesn't work, I'll let you know in a mo

indigo yoke
#

I see you are using the SVE 1.5 beta, got a list of patch notes? I just want to peak

wanton pebble
indigo yoke
#

I just want the patch noteees, not the whole modddddd

wanton pebble
#

(I have had to be fairly careful with any screenshots I've been taking, which is why I didn't provide visual proof earlier)

#

....it's mastery extended.

#

gonna go scream in something for a second, then collect myself to make a hopefully normal comment

indigo yoke
#

mood

hallow prism
#

(my approach : write the comment now, do something else for a couple of hours or longer, read it once calmer, see if it needs adjustement)

calm nebula
wanton pebble
#

Also from where I was able to download it I only was able to get the files, not a patch note list

indigo yoke
#

T_T I just want to know what's changed

hallow prism
#

yeah but it's understandable that people can't share such info publicly if flash didn't yet

#

you can just ask him the changelog and if it's ok to share it

final arch
#

Flash usually provides beta files for other modders for compat testing, yeah ๐Ÿ‘

glad grove
#

Any idea where to access these emote indices? I decompiled Farmer.EmoteTypes and got the first 12

new EmoteType("happy", "Emote_Happy", 32),
new EmoteType("sad", "Emote_Sad", 28),
new EmoteType("heart", "Emote_Heart", 20),
new EmoteType("exclamation", "Emote_Exclamation", 16),
new EmoteType("note", "Emote_Note", 56),
new EmoteType("sleep", "Emote_Sleep", 24),
new EmoteType("game", "Emote_Game", 52),
new EmoteType("question", "Emote_Question", 8),
new EmoteType("x", "Emote_X", 36),
new EmoteType("pause", "Emote_Pause", 40),
new EmoteType("blush", "Emote_Blush", 60, null, 2, is_hidden: true),
new EmoteType("angry", "Emote_Angry", 12),
new EmoteType("yes", "Emote_Yes", 56, new FarmerSprite.AnimationFrame[7]

but further down it seems to give "sick" the index of 12 (which is "angry" already)

new EmoteType("sick", "Emote_Sick", 12, new FarmerSprite.AnimationFrame[8]
hallow prism
#

that is not the same kind of emote

#

you are looking at the "event" emotes on the first list

#

and the second i believe is the emote you can do when pressing y?

#

(bless the person that finally added that to wiki rather than a link to reddit)

glad grove
#

Oh so you can't use the latter ones with

farmer.doEmote(emoteIndex);

?

hallow prism
#

i have no idea

teal bridge
#

doEmote works with Game1.emoteSpriteSheet which points to TileSheets/emotes. Unlike some sheets, the index here is not exactly a "sprite index" so much as a "row index".

#

The difference between "sick" and "angry" seems to just be in the animation frames; angry has none, sick adds what I think are these two animation frames from the farmer base.

#

(Emotes, unlike emojis, are a bit complicated and do more than just display the icon)

glad grove
#

I see, thanks for the input! I was actually only looking to display the icon above the character ๐Ÿ˜„

brittle pasture
#

yeah the 'extra' ones like 'sick' and 'taunt' also adds additional farmer frames. doEmote only handles the bubble ahead

valid folio
#

A friend helped me by making the json files so I could see what it looks like. I tried to replicate them for another similar mod (a cooking recipe) but... everything blew up when SMAPI loaded the mod... Because of the time difference I don't want to bother you now...

I'm really sorry to be so annoying but... could you help me? I have a screenshot of the error in SMAPI and if you need it I can send the files.

hallow prism
#

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

hallow prism
#

it's how you share the files. Usually, you may even SPOT the error yourself (maybe not be able to understand it the first time), and fix it

#

so it's really good practice to do that

lone ice
#

Hi all! Does anyone know of a way to see the full list of categories in the game? (fish, flower, seed, etc.)?

glad zenith
valid folio
hallow prism
#

yes, its why you share the file when you can't figure it out

#

with the link i gave

lone ice
#

I made meat, I want a way to tell recipes "any meat is fine" ๐Ÿคฃ

hallow prism
#

to?

#

no

glad zenith
hallow prism
#

it wouldn't work with category, you can't add new ones without risking big issues and game only accept a few specific category asvalid input for "any" ingredient

#

but you can have a context tag (like meat_item) and use spacecore for that

glad zenith
#

im not sure so sorry if im wrong

lone ice
#

spacecore?

hallow prism
#

yes, it's a framework, search on nexus

#

remember it's a bit advanced modding

#

so don't rush things

lone ice
#

ok

#

thank you!

glad zenith
lone ice
#

thank you!

glad zenith
#

its very useful for item ids and things like that

valid folio
glad zenith
lone ice
#

You're all so phenomenally helpful

#

thank you!

valid folio
# hallow prism with the link i gave

In theory, the error is the last part that refers to the language. In the mod that my friend gave me that was there but it referenced another i18n file, what I did was change it to the one that corresponds to this mod.

finite ginkgo
#

There's a rogue " in line 32

hallow prism
#

you don't put the token between quote in this file

#

it's not a problem of language

#

it's having the " in "{{i18n:flan.DisplayName}} (you need the closing one, because it closes the whole string)

#

but basically, here

#

you have "stuff": "whatever/fields/you/need"andextrastuff" and because you already closed the opened ", it can't process the whole andextrastuff"

valid folio
#

Ok I undertand

#

OK, Iยดm goin to test it. I'll let you know if anything explodes again hahaha

plucky reef
#

if I use OnAssetRequested to add a weapon/object, and another mod does that as well, and we use the same location (the end of the tilesheet we're targeting), does SMAPI take care of that?

finite ginkgo
#

What do you mean by "end of the timesheet"? Do you mean for the texture? No it wouldn't, ideally though you'd load it to a custom asset instead if it's a sprite for a custom weapon/object

valid folio
#

For now the mod has loaded well, now I have to look in the game, this may take a while because I have to wait until Friday when the traveler will come

brittle pasture
#

are you adding new images to the vanilla tilesheet or patching over existing sprites? the former's very not recommended

#

if the latter then it's fine, the mod that applies it changes later will take precedence

plucky reef
#

not XNB stuff

lucid iron
#

Smapi handles same target edits as overwrite

plucky reef
#

so I do not want to do this because it will cause conflicts with other mods that add weapons

finite ginkgo
#

Again, if you're adding a custom weapon it's most recommended to load the texture into your own asset instead of patching a vanilla one hoping no other mod will touch that area

lucid iron
#

weapons take Texture field Bolb

naive wyvern
#

this one lets you search if your item loaded in the game without even having to wait for the shop/traveler (But seeing if your menu is working if your item is in the menu is good for double checking)

#

there u go

plucky reef
#

ok that was... easy...

#

probably doesn't need namewithoutlocale since my own mod is unlikely to have other languages of it.

paper sundial
#

ยฏ_(ใƒ„)_/ยฏ I just always use it, haven't found a disadvantage for not yet (unless you do have assets for alternate locales)

plucky reef
#

not yet.... and then i18n won't come until later and won't require new assets, just descriptions.

valid folio
#

So far everything is going well, I'm just surprised by those ??? but now to prepare the dessert

paper sundial
plucky reef
#

ah I don't have anything fancy like that, they'll be jumino script if anything.

valid folio
#

Almost, but well, I think I know what the error is.

wanton pebble
ivory plume
#

Monthly mod stats time!

Streamlined mod dumps

Previously I maintained two 'mod dumps':

  • A full dump containing every mod from CurseForge + ModDrop + Nexus (maintained using a few scripts). You can download this one below under 'see also'.
  • A smaller dump containing C# mods on the mod compatibility list, including downloads and source code. This was used for manual testing to update the compatibility list, and to let anyone perform searches and analyses across all open-source mods' code.

Unfortunately that second mod dump took a lot of effort every month to keep up-to-date, so that one is now discontinued. The scripts for the full mod dump now include info used to maintain the mod compatibility list instead.

Stats

Milestones

  • This is the first monthly report after the [mod dump rewrite last month](#making-mods-general message). That means hidden, deleted, and republished mods are now reflected immediately in the stats below instead of having occasional dump rebuilds.

Mod compatibility

72.6% of SMAPI (C#) mods are compatible or have a workaround, up from 72.1% last month.

Unique mods by type

We have 363 more mods this month.

A few observations:

  • That's closer to the pre-1.6 monthly numbers, probably due to a combination of the post-1.6 wave starting to settle, and some mod authors returning to school after summer vacation.
  • Since the 1.6 update, many frameworks have been losing content packs each month as mods migrate to the new Content Patcher capabilities. This is the first month with almost none lost, possibly because the frequently-updated mods which were going to migrate have mostly now done so now.
  • Custom Music survived another month, with just six content packs above the minimum to be shown in these stats.

That 363 includes:

  • +243 Content Patcher;
  • +37 SMAPI;
  • +27 Alternative Textures;
  • +16 XNB;
  • +14 Fashion Sense;
  • +3 Custom Furniture;
  • +3 Farm Type Manager;
  • +2 Json Assets;
  • +2 Producer Mod Framework;
  • +1 TMXL Map Toolkit;
  • 0 Better Artisan Good Icons;
  • 0 Custom Music;
  • 0 Mail Framework Mod;
  • 0 Shop Tile Framework;
  • -1 Dynamic Game Assets;
  • and +16 for frameworks with <100 content packs.

Content Patcher packs

We have 8,842 Content Patcher packs.

The top six Format versions are:

  • 2.0 (2,995 โ†— 3,078) for Stardew Valley 1.6;
  • 1.19 (577 โ†˜ 575) for Stardew Valley 1.4;
  • 1.3 (461 โ†— 467) in old unofficial guides;
  • 1.28 (394 โ†˜ 393), latest version for a while last year;
  • 1.29 (400 โ†˜ 398) for Stardew Valley 1.5;
  • 1.23 (354 โ†— 360) for mysterious reasons.

Open source

  • We have 2,912 tracked C# mods, of which
  • 1,853 (64%) have a source-code repo, with
  • 1,048 (57%) in a multi-mod and 805 (43%) in a single-mod repo.

Web costs

And finally, web hosting costs for the SMAPI.io site, update-check server, and API dropped a bit from US$237/month to $189/month with the leveling off of post-1.6 traffic. (The graph is always a bit behind due to billing cycles.)

See also

And that's it for this month!

lucid iron
#

rip smaller dump i enjoyed looking for examples

ivory plume
#

I might be able to create a new repo which uses the data from the full mod dump to generate the Git commands. Then you could just run the Git commands locally to download all the open-source mods, so you can browse through the code like before.

plucky reef
#

many frameworks have been losing content packs each month as mods migrate to the new Content Patcher capabilities
You don't need a separate CP mod for a C# that adds lots of stuff?

ivory plume
#

Not necessarily. You can edit the game assets directly from your C# code, without having a separate Content Patcher part. The changes we've been seeing are due to mods migrating from more specialized frameworks like Better Farm Animal Variety to Content Patcher though.

lucid iron
#

+16 XNB; SDVpufferpensive

teal bridge
#

Apparently, Content Patcher is the Borg.

tiny zealot
nocturne rampart
#

I am sorry to interrupt. I need some help on figuring out why my CP mod that I am making isn't working.

It's a mod meant to change the crib (a personal mod, really, because it's only a recolor to match the Cozy Chocolate furniture).

However, I am getting the following script in SMAPI upon booting up the game and I am not getting the config in GMCM.

vernal crest
#

!json Can you share your content.json please?

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.

nocturne rampart
#

Yes! I was grabbing it โค๏ธ Sorry, my son came in and distracted me a second TuT

vernal crest
#

It might be failing because you have a default value that's not in the list of allowed values?

nocturne rampart
#

I just noticed that TuT Let me try that

#

It's working perfectly now. I don't know how I missed that. Thank you!

vernal crest
#

No worries, it happens!

valid folio
#

Thanks for your patience!!! You guys help me a lot! I'll mention a general greeting to the discord community when I publish the mod.

past knot
#

I'm going to explode. Does anyone know how to hide THIS in tiled so I can work on the stupid map ๐Ÿ˜ฎโ€๐Ÿ’จ

lucid iron
#

this is on one of the object layers

#

click the eyeball

past knot
#

Ah, thank you! I'm still learning to use tiled

glad zenith
#

does anybody have any experience/ knows what the alcohol_item context tag does?

calm nebula
#

The alcohol_item context tag isn't used by the game

#

Iirc

glad zenith
#

thanks i couldn't find anything on the wiki

calm nebula
#

I believe it is modder convention to tag your alcohol items with it

tiny zealot
#

my NPC uses it. please don't do anything silly to it SDVpuffersquee

calm nebula
#

For nondrinking npcs

#

Etc

glad zenith
#

so deleting it on items wont be a problem?

lucid iron
#

wow how could you

calm nebula
#

If you make them nonalcoholic sure.

lucid iron
#

cant roleplay as alcoholic now

tiny zealot
glad zenith
calm nebula
#

I would rather role-play as a workaholic

brittle pasture
#

yeah noticed that some NPCs now have accept gift dialogue for alcohol_item

lucid iron
#

what's the context of wanting to delete alcohol_item

glad zenith
brittle pasture
#

it won't cause any visible issues, however some other mods may rely on that tag. can't think of any though

glad zenith
#

okay then

tiny zealot
#

if you're turning them into non-alcoholic things, then you should remove the alcohol_item tag

glad zenith
#

but i still want npcs to like those items

tiny zealot
#

the point of context tags is to give labels to items in a freeform way, so compatibility is easier to manage.
for example, you can make an NPC like mine with a gift taste specified for alcohol_item, and we get compatibility for free with any item existing or in the future that uses that tag

calm nebula
#

I would say more npcs use it as the negative vs the positive

#

Ie, this npc should never drink, they are Muslim, recovering alcoholic, no fun, etc

tiny zealot
#

yeah mine is set to dislike, and in the next update she'll refuse them too

brittle pasture
#

yeah either they love 'alcohol_item' or hate them, and if the tag is removed it almost certainly defaults to a universal like for artisan goods

glad zenith
#

so removing it is fine? im confused

tiny zealot
#

if you are removing the alcohol from something, and an NPC is set up to like or dislike alcohol, then their opinion of the item will necessarily change

calm nebula
#

(Pam Tries does this weird thing where her opinion of alcohol depends on her mood. If she is in a bad mood, it's a liked gift. Good mood, it's disliked. Neutral mood, it's hated.)

tiny zealot
#

if you are making the item non-alcoholic, then you should remove the tag

glad zenith
tiny zealot
#

it will depend on the NPC and the item

#

default for artisan goods is Like. but the item may have another tag (or its specific ID) which the NPC checks, so who knows what will happen

valid folio
tiny zealot
valid folio
nocturne field
#

Okay so i've been working away with trying to solve that bug in that mod i mentioned yesterday, i'm pretty sure i found the problem but idk how to fix it as my knowledge is VERY limited

lucid iron
#

Do you have link to the repo

teal bridge
#

That's... not really finding the problem, that's just breaking at the line that throws. Finding the problem would entail determining why it is null at that point, or alternatively, why the code expects it to be non-null when it can be null.

A simple workaround is just to check for null and skip the loop, and that would prevent the crash. But it's not necessarily going to be correct behavior.

glad zenith
#

@tiny zealot Ok I've tested giving wine to npcs with the alcohol_item tag removed. As far as I know the alcohol_item tag does Nothing of use regarding gift tastes. I gave Sebastian and Penny the special wine and they still hate it. I gave Pam, Harvey, and Shane the special wine: They still like it. So maybe I didn't understand something or don't know how to test but that's what I got.

#

As far as I know the tag is simply used to sort/categorize the alcohol items/ some other reason I'm not knowledgeable enough to know right now.

uncut viper
#

adding or removing the tag doesnt do anything if the NPC doesnt have dialogue or gift tastes specific to that context tag

#

if they dont check for it, then it doesnt matter if the item has that context tag or not

#

however custom NPCs may check for it

#

and Jas and Vincent have custom dialogue for it

tiny zealot
#

apparently there's a tailoring recipe that takes that tag too, so that recipe will stop working

tiny zealot
# glad zenith As far as I know the tag is simply used to sort/categorize the alcohol items/ so...

the reason, as i mentioned before, is to allow easy, broad compatibility with classes of item without having to code for them all specifically and without needing to put out updates.
if my NPC rejects alcoholic gifts, i don't have to put a list of all the alcoholic items. i just put in "alcohol_item", and they all work, and most importantly it works with any other mod that adds an alcohol_item, even into the future, and i don't have to do any more work.
so it's important to classify items correctly. if they aren't alcoholic, they shouldn't have the tag

teal bridge
#

Speaking of gifts, I know the code is kind of a mess, but does anyone have a good handle on the general "rules" for when a given item can be gifted to a given NPC? From what I can tell it seems to be some combination of:

  • The item has to be an Object, i.e. you can't gift furniture, craftables, etc.
  • They must not have received a previous gift that day, unless some special condition ignores that (like a quest)
  • They must not be at the gift limit for the week (with same exceptions as above)

Is there anything more to it? I know there's a method CanReceiveGifts, but when looking at methods like tryToReceiveActiveObject that appears to only be a rather small part of it. Like this alcohol thing, where is that even checked?

tiny zealot
#

alcohol_item isn't explicitly checked, but somewhere in that nest of functions it checks all the context tags on the item for matching tastes/dialogue keys

warm egret
slender badger
#

@whole raptor Hey Nomori! Had a quick question about your i18n-ifier - I was chatting with Elle earlier about how the config section of a content.json can also be i18n'd but most people don't know how to do it or even that it's possible, so do you think it'd be difficult to add it to the i18n-ifier?

teal bridge
#

Yeah I know the birthday rule, that's the "special conditions" I mentioned and I think it's covered by CanReceiveGifts.

slender badger
#

It'd be pretty helpful for a lot of people if it was possible, I think ๐Ÿ˜„ Though no pressure if it's too difficult, of course! (also feel free to ping me on reply, I probably won't be around in chat later)

teal bridge
#

I'm looking for the context tags and it seems to be a quasi-hardcoded search for RejectItem_{tag} dialogue?

uncut viper
#

GetGiftReaction() has the ones for AcceptGift

#

RejectItem happens if they reject the gift entirely, AcceptGift (and the GetGiftReaction()) happens if they still took it. they just might not like it

teal bridge
#

Those happen after the gifting, though.

uncut viper
#

just saying thats where the alcohol thing is checked

tiny zealot
#

getGiftTasteForThisItem/CheckTasteContextTags is where it looks for tags in the gift tastes string

uncut viper
#

if you wanted them to reject alcohol outright then it would be in the tryToReceive function as long as you gave them RejectItem dialogue for it

teal bridge
#

It's this dog's breakfast, right?

Dialogue dialogue2 = TryGetDialogue("RejectItem_" + activeObj.QualifiedItemId) ?? (from tag in activeObj.GetContextTags()
    select TryGetDialogue("RejectItem_" + tag)).FirstOrDefault((Dialogue p) => p != null);
if (dialogue2 != null)
{
    if (!probe)
    {
        setNewDialogue(dialogue2);
        Game1.drawDialogue(this);
    }
    return true;
}
uncut viper
#

but Jas and Vincent dont, they will acceppt it and just hate it

teal bridge
#

It seems to be a way of short-circuiting all the other receive logic. Tied directly into dialog. ๐Ÿ™„

uncut viper
#

pretty much yeah

slender badger
#

I've skimmed back through the alcohol_tag convo and I'll put my two cents in as well that several DSV characters rely heavily on that tag, so please don't remove it for no reason

tiny zealot
#

i think Tai is turning the items into non-alcoholic versions, but got confused about what the tag means/does and whether to remove it

slender badger
#

Ahh, okay

teal bridge
#

Sigh, SDV logic can never simply be a straightforward "check if you can do that thing, then do that thing", always has to be some Lovecraftian horror of spaghetti code that gets the "check" and "do" tangled up in fourteen different places. Same as Object.performUseAction.

tiny zealot
#

the current state is a result of trying to turn the older, worse version into what you said without breaking the world

#

the reason there's a probe flag is that the logic was already byzantine, so the most reliable way to get the correct result from "check" was to run the same code and just return a boolean instead of acting

teal bridge
#

Yeah, I guess the probe is the most reliable way to run a check. Too bad the probe won't accept an Object but rather the actual Farmer giving it.

#

(Obviously it would be impossible to modify it to take an Item/Object, given what it does right now.)

#

Mind you, the rejection logic I mentioned above still returns true for a rejected gift, so the return value seems less than reliable. It's apparently less "can NPC receive this item" and more "will something happen when giving this item".

plucky reef
#

so this is off base game, projectiles.cs. Does this mean I can never override this and the travel grace period must always be at least 100 (I assume milliseonds)?

next plaza
#

Just do ignoreTravelGracePeriod.Value = true;

#

It's a net field so the real value is inside the read only object

gilded comet
#

is there a way to make a ColoredObject have a drop shadow

#

or

#

i remember hearing something about how they don't have them and i don't remember if it was resolved.

plucky reef
#

Having trouble getting my projectiles to get destroyed and was wondering if that's why but they're doing damage and displaying the explosion animation so maybe that's not it.

#

Maybe I need to define pierces left as zero instead of not mentioning it.

drowsy pewter
gilded comet
#

got it

#

ty!

split ermine
#

i was wondering for 10 minutes why my mod wasnt working when i realised.. it's not in my mods folder. goddamit.

brittle pasture
#

(reported by me!)

gilded comet
#

that's why i remember seeing it! great to hear :)

split ermine
#

okk so this doesn't work in game any idea why? i playtested it and my sweet gem berry still sold for 3000

brittle pasture
#

did you spawn new berries in to test?

#

existing items won't have their price updated

split ermine
brittle pasture
#

actually you have a syntax error, missing { before the Action lines

#

and also missing a lot of closing brackets

split ermine
brittle pasture
#

Every Action block must begin with {, and every matching { must have a closing }

#

I recommend switching to an editor with built-in JSON syntax highlighting and checking

#

(Notepad++, Sublime, VSCode are 3 common choices)

split ermine
#

i think i have notepad++ installed i'll try using that one :3

uncut viper
#

minute 1: sure ill use an out var for this method with the usual TryGet pattern, those are fun
end of hour 1: WHY IS MY VARIABLE NULL
end of hour 2 and many experiments later: oh ive been reusing the same out var name while iterating over an empty list and thus reassigning it null. SDVpufferflat

#

actually im not even sure if that was the issue anymore bc i just realized this snippet of code in question isnt even running anymore bc i commented something out. always change one variable at once folks
also dont dive too deep into reflection it'll make your head hurt

#

yeah that wasnt the solution. rip. ignore me

teal bridge
#

Are you not using nullable reference types?

uncut viper
#

i dont actually know what exactly it is thats becoming null anyway, i just know that something in the process of calling Harmony.Patch is throwing a nullreferenceexception
it happens at the line where i call Patch() but both the original method and the method im sending as the prefix are not null, and my prefix method runs without returning null

teal bridge
#

You don't get a stack trace?

uncut viper
#

i am doing some weird reflectiony stuff and returning DynamicMethods instead of actual prefixes but if i do (as far as i can tell) the same thing in the modentry class, it works fine. just isnt working when im trying to do it in a loop in a different class

#
[Special Power Utilities] Failed to patch prefixes: System.NullReferenceException: Object reference not set to an instance of an object.
   at HarmonyLib.MethodPatcher.EmitCallParameter(MethodInfo patch, Dictionary`2 
variables, LocalBuilder runOriginalVariable, Boolean allowFirsParamPassthrough, LocalBuilder& tmpObjectVar, List`1 tmpBoxVars)
   at HarmonyLib.MethodPatcher.<>c__DisplayClass37_0.<AddPostfixes>b__1(MethodInfo fix)
   at HarmonyLib.MethodPatcher.AddPostfixes(Dictionary`2 variables, LocalBuilder runOriginalVariable, Boolean passthroughPatches)
   at HarmonyLib.MethodPatcher.CreateReplacement(Dictionary`2& finalInstructions)
   at HarmonyLib.PatchFunctions.UpdateWrapper(MethodBase original, PatchInfo patchInfo)
   at HarmonyLib.PatchProcessor.Patch()
   at SpecialPowerUtilities.DynamicPatcher.Initialize(IManifest manifest) in J:\
Stardew Mods\SpecialPowerUtilities\SpecialPowerUtilities\DynamicPatcher.cs:line 95
#

(it says postfixes in there bc i was trying both)

gilded comet
#

wait how do i get a rectangular area from a Texture2D i don't remember

teal bridge
#

So what's on line 95? It looks like the prefix has something wrong with one of the arguments.

uncut viper
#

DynamicHarmony.Patch(orig, postfix: new HarmonyMethod(prefixFactory));
DynamicHarmony is just what i named this harmony instance, prefixFactory is a method in my class that returns a DynamicMethod and takes a MethodBase as a parameter

#

(again it says postfix but only bc i was seeing if it was specifically prefixes that wouldnt work but the error is the same either way)

uncut viper
#
DynamicMethod testMethod = new DynamicMethod($"{method.Name}_Patch", typeof(void), paramTypes, declaringType.Module);
testMethod.DefineParameter(0, ParameterAttributes.Out, "__result");
ILGenerator il = testMethod.GetILGenerator();
il.Emit(OpCodes.Ldstr, "Hello, IL!");
il.Emit(OpCodes.Call,
AccessTools.Method(typeof(Log), nameof(Log.Warn), null, new Type[] { typeof(string) }));
il.Emit(OpCodes.Ret);

this is the dynamicmethod that prefixFactory constructs, grabbing the paramTypes and declaryingType from the function im prefixing (through the parameter that Harmony gives my prefixFactory function)
this works fine in my modentry class

#

but even when i copy it over directly to my other class, it just doesnt work ยฏ_(ใƒ„)_/ยฏ

teal bridge
#

I don't think I've ever seen HarmonyMethod used directly like that. Looks like the signature takes a Delegate? Is it possible your delegate is not static?

gilded comet
#

wait how do i get a rectangle of a spritesheet by spriteindex

#

i could write it myself probably but i know it already exists

uncut viper
#

it takes a MethodInfo, and if the function whose methodinfo you use returns a DynamicMethod/MethodBase/MethodInfo of its own and takes a MethodInfo/MethodBase as a parameter, Harmony will use your function to grab the actual function

#

my prefix factory is also a static method

#

and also public

#

that code snippet i posted does work with the same Harmony.Patch call in my modentry class, i can verify that the postfix does actually get applied in game

#

i dont think it should be anything to do with my loop stuff in my other class either, bc while trying to debug this i removed like, everything to do with it. im grabbing a function with AccessTools like i would normally and generating that empty DynamicMethod and trying to apply it, and not caring about anything thats in my other lists

teal bridge
#

Is it a prefix or a factory?

uncut viper
#

i just named it factory bc when trying to look up how to do this people named it a factory by convention bc its not really one but kinda acts like one

#

okay, well. i changed it to be trying to patch a property getter instead (bc i realized thats what it was doing in my modentry class too) and... it worked. but it wont work when patching an ordinary method?

gilded comet
uncut viper
#

AccessTools.PropertyGetter(typeof(Farmer), nameof(Farmer.DailyLuck)) works fine
AccessTools.Method(typeof(Game1), nameof(Game1.OnLocationChanged)) does not work

teal bridge
#

Far as I can tell from Harmony's code, that exception can only be thrown if the fix (prefix or postfix method) is null. Definitely strange, since it would throw much earlier if the patch itself was null (the fix being a wrapper around the patch).

#

You mean AccessTools.Method itself doesn't work, or it returns a MethodInfo that fails later on?

uncut viper
#

using AccessTools.Method to look for that method gives the same stacktrace error as before, but let me try patching it normally just to make sure

teal bridge
#

I mean, is it literally AccessTools.Method that throws/returns null, or do you just mean that the whole thing put together doesn't work?

uncut viper
#

oh right duh. sorry, brains getting a bit fried at this point lmao. gimme a sec

#

AccessTools.Method isn't returning null or throwing anything, and patching it normally works. lemme try commenting something else out real quick that i didnt think should matter but honestly idk anymore

teal bridge
#

Yeah I'm finding it kind of hard to follow what you're attempting, but I'm tired myself. Maybe put up a MRE and I'll look tomorrow if no one else gets to it first.

uncut viper
#

i commented something out and it worked. i uncommented it again and it still worked? i feel like i changed nothing but why does it work now

teal bridge
#

Too many blanks to fill in. Prefixes and postfixes work normally for me, obviously. But I haven't tried this reflection-based thing passing in a MethodInfo directly. Could also be something odd about Game1 in particular. But my hunch is not.

uncut viper
#

oh wait i know what i changed

teal bridge
#

I guess it could be a race condition if it's intermittent, but... that's also unlikely.

uncut viper
#
Type[] paramTypes = method.GetParameters().Select(p => p.ParameterType).ToArray();
Type declaringType = method.DeclaringType;

this is how i was getting these variables taken from the MethodBase for Game1.OnLocationChanged, so that i could use them like so:
DynamicMethod testMethod = new DynamicMethod($"{method.Name}_Patch", typeof(void), paramTypes, declaringType.Module);
this works for the dailyluck getter just fine, even though that doesnt have parameters (or i guess it might have the instance as the 0th parameter or w/e)
but changing it to this:
DynamicMethod testMethod = new DynamicMethod($"Patch", typeof(void), new Type[] {}, typeof(Game1).Module);
it now works

#

i dont know which one of those two things made it work yet though bc i changed them both at once, but is there something about DeclaringType vs just, GetType or ReflectedType that im just not aware of?

teal bridge
#

GetType is only for object instances.

#

DeclaringType is the type that declares the member.

uncut viper
#

well, it wasnt that anyway, bc putting declaringType.Module back in and it still works. so... the parameter types?

#

yeah, using that paramTypes breaks it

#

i havent the faintest why

past knot
#

Hey guys, I lost the page that explains how to make the custom warp for my location

teal bridge
#

What does the debugger show paramTypes is at runtime?

#

Is it an empty array or... not?

#

Also, what is declaringType exactly?

#

Oh I see it, never mind... sorry, it's hard to follow when everything is split up like this.

uncut viper
#

according to the debugger paramTypes is an array of size 2 with the two parameters that OnLocationChanged expects

teal bridge
#

Does your patch method have those two parameters?

#

The original does, but that DynamicMethod is a wrapper around your patch method, the original method.

uncut viper
#

hold on, lemme test somethin real quick (related to what you're saying, im not ignoring it)

teal bridge
#

Again there's just a ton of missing information here, it's hard to follow which method method actually is. If that's pointing to the original method and not a patch, then I think using declaringType.Module is wrong, you can only emit IL to a dynamic assembly.

uncut viper
#

okay well, you might still be right and i might still need to specifically define the parameters (even though i assumed that since i was generating a patch function that the parameters were optional, like they normally are) but adding these two lines:
testMethod.DefineParameter(0, ParameterAttributes.In, "oldLocation");
testMethod.DefineParameter(0, ParameterAttributes.In, "newLocation");
is not sufficient

#

method is whatever Harmony is sending to my function via new HarmonyMethod im not the one defining it

#

its a MethodBase, that's all i know, and its the methodbase of the original function that i am patching

#

but im not emitting to it

teal bridge
#

Well you definitely can't define two parameters at the same position.

uncut viper
#

i copy-pasted wrong bc i was lazy and didnt feel like copying the other line SDVpuffersquee

#

i pasted it again and changed the name at the end but forgot the index

#

they are at 0 and 1 in my code

#

but besides, setting the parameters of my dynamicmethod to an empty array manually makes it work

#

declaringType.Module is just telling my DynamicMethod what type its supposed to be apart of

#

or well, the module

#

of that type

teal bridge
#

Maybe something would jump out at me if I was doing Harmony stuff 24/7, but trying to piece together a mental image of exactly what this is trying to do and how from bits and pieces of chat isn't really working, I'd need to see the whole code.

So yeah, post an MRE tomorrow, or go with your workaround if it's working I guess. (It just means your dynamically-generated method can't take any params.)

uncut viper
#

can you refresh my memory on what the E in MRE is. if i cant hack at it enough tonight its just gonna be pushed to my repo for SPU before i go to bed, ill clean it up before i do so the code is actually readable albeit broken

teal bridge
#

Minimum reproducible example

uncut viper
#

gotcha, thank you

past knot
#

one last bother as i think i get this now, especially with harv's tutorial, but how (and im gonna suck at wording im so sorry), but how can i make my locations bus locations

uncut viper
# teal bridge Maybe something would jump out at me if I was doing Harmony stuff 24/7, but tryi...

so, i figured it out.
the parameters for my dynamicmethod can be empty, thats fine, bc if Harmony detects a patch method that has no parameters, thats just fine
adding the parameters from the original method to the dynamicmethod alone wont work though, bc the parameter names in the array from the original method are strings like StardewValley.GameLocation oldLocation and not just oldLocation. if you put a parameter into a patch method, Harmony expects it to either match one of their injections or match an argument name exactly. obviously the former of those two names will match nothing
but wait! theres more! you can strip out the class name from the parameter name easily. and fortunately, each ParameterInfo in the list also gives us the position of the parameter in the param list. so oldLocation is the first parameter, thus its position is 0, which we can use in the dynamicmethod DefineParameter() function
unfortunately, when using the DefineParameter function, positions start at 1. i presume this is bc the 0th parameter is the this instance or whatever yada yada. so i have to take the parameter position from the original method... and shift it one when i redefine them. that, combined with fixing the name strings, lets Harmony accept it as a patch finally

#

the NullReferenceException was bc when i was not shifting the parameter positions by 1, Harmony was looking for parameter names starting at 1. so if i had two parameters, it checks params 1 and 2, not 0 and 1. the 2nd parameter was not defined (well, it was, but its Name was null bc i didnt set it). thus the exception

split ermine
#

any idea why this isn't working? i sold my sgb but it's still 3000g.

uncut viper
split ermine
uncut viper
#

the one you're showing in that screenshot

split ermine
#

OH

#

okay okay i see SDVpufferwaaah thank you!

#

i checked with the file validator, im kinda confused

#

(unless this isn't where im supposed to plop the file..)

iron ridge
#

need a comma after the closing brace

split ermine
uncut viper
#

โ˜๏ธ i missed that one initially but yeah, most closing braces will need commas. you should really use a text editor with json validation built in

marble verge
#

Good Morning. Can I use "Fields" to edit a single entry within an array? I.e. "Location" within "Home"?

split ermine
finite ginkgo
blissful panther
#

A demonstration of scope creep:

  1. Start working on a mod to add a single tool to do something pretty simple
  2. Oh, this other tool would be pretty neat
  3. Oh... this other other tool would also be pretty neat
  4. Now you have a mini framework to add tools with custom C# functionality by specifying the method to patch in CP so nothing is hardcoded
  5. SDVpufferwaaah
uncut viper
#

theres plugins you can download for N++ to validate files for you, or you can use VSCode which should do it out the gate

velvet narwhal
blissful panther
#

The funny thing is I believe Ender knows of the tool idea that started this. SDVkrobusgiggle

split ermine
#

7th time's the charm let's hope this time my "code" works

#

dont know what it's called in cp SDVpufferclueless

hallow prism
#

hard to say without context, remember you can share json and log if you still have issue

#

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

hallow prism
#

!log

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.

warm egret
#

I am uploading my mod to nexusmods and now I need to upload my mod file. However, I have not yet filled out the UpdatingKeys in manifestion.json. What should I do?

hallow prism
#

manifest.json (just in case)
once you filled the first page of the nexus mod form

#

you'll get a number on the url at the end

#

this is part of your update key

#

"UpdateKeys": ["Nexus:9600"],

#

(verify it's also UpdateKey and not updatingkey)

warm egret
#

I found it, thank you!

sleek flint
#

If you have your mod uploaded on 2 different websites, like forge and nexus for example, do you just add a coma between the nexus update keys or do you have to choose only one? Now that I think about it, are there even a forge update key?

iron ridge
#

[[Modding:Modder_Guide/APIs/Manifest#Update_checks]]

royal stump
#

basically it's a list separated by commas, e.g. ["Nexus:key", "CurseForge:key"]

sleek flint
#

Ok I will check it out, thanks. SDVpufferheart

split ermine
#

json validator claims there's nothing wrong with my files but they're still not working in game SDVpufferthinkblob

hallow prism
#

if you want help you need to do the steps needed

hallow prism
#

if you want other to read you, reading them is important

split ermine
ocean sailBOT
#

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

split ermine
#

i already updated the museum mod btw

hallow prism
#

i assume your mod is (CP) ์ˆฒ์† ๊ด‘์‚ฐ, ๋™๊ตด ๋ฆฌํ…์Šค์ณ ?

#

(you have other from same author, but i believe, not this one)

split ermine
hallow prism
#

ok

#

what is your mod then? and your issue?

#

just to let you know, i don't really like playing 20 questions when doing debugging, so if you don't provide the info needed (like the json asked earlier), i'll step out

#

(which just mean you'll have to wait for the next person ready to help)

split ermine
#

uh so im still making it and it basically increases the price of crops when they're out of season and im just trying to figure out why it's not working

wise berry
#

Could you give the name?

#

Lumina can't tell which mod is yours

split ermine
#

uh hold on

#

it's called produce price increase

#

(sorry if im being stupid im very new to all of this SDVpufferwaaah)

wise berry
#

No big deal, it's affecting how soon you yourself get help but as you troubleshoot more, you'll get the hang of what info to give at the start

hallow prism
#

i don't believe it's being stupid, but when i tell people the step i need to help them and they don't (like you didn't provide the json asked twice), there's a problem i will not try to solve by repeating. people can reread discussion and ask questions at any point.
As said, i'm stepping out ๐Ÿ™‚

wise berry
#

Reiterating Lumina's point, you'll only help yourself more if you read what others are asking of you carefully SDVpuffersquee

#

But yes, I can keep providing support

#

I'll go back and read what your issue was

split ermine
#

thank you thank you i might reply slowly because im multitasking rn but ill try to be quick!! and thank you for the advice!!

wise berry
#

!json And of course, do send over your json at the link (don't just validate, share the link here too)

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.

whole raptor
wise berry
#

Excellent, so what's the problem you're concerned with right now?

split ermine
#

for example i sold my sgb which is supposed to go up to 3250g in spring / summer, but it still sold for the usual 3000g

wise berry
#

Alright, we can try pinning down the location of the problem (figuring out exactly which thing is going wrong) by testing without the When fields (so the patch should take effect all the time). If it works in that case, it would mean something's wrong with the conditions; but I do also have a few other questions

split ermine
wise berry
#

I remember catching a bit of the conversations you were having with others about changing crop prices between seasons, and there was something about the prices not updating for already harvested crops

#

When was the crop you tested with harvested?

split ermine
#

i think it was harvested during winter

wise berry
uncut viper
#

(unfortunately im going to bed right now so i cant help too much, however i did notice cryztax that your Trigger Action does not have the MarkActionApplied field there (it should be present and set to false) so if you've been testing with the same save file and already went through some months to test, it wont do it again)

wise berry
#

Indeed, CJB will be your best friend

uncut viper
#

(and if you're using the same save file, its not as simple as just adding it now, bc that Trigger Action is already marked as applied. you'll either need a new save file or mark it unapplied again with the debug action console command for it)

#

((also for more context Silicon theyre using a custom trigger action I made that will update the prices (or any other field) of already spawned items to match what a newly spawned item would be, in this case the price))

wise berry
#

Understood! I'll go grab that debug command now (so please head to bed and have a good sleep!)

uncut viper
#

(if it turns out in the end to be an issue with my action tho dont be afraid to ping me and ill see it when i wake up SDVpufferthumbsup)

wise berry
#

Should be in your case debug action MarkActionApplied All {{ModId}}_ReloadItemPrice false (you'll need to fill in ModId here)

#

But don't test and don't save over your game yet, we're gonna add something to your trigger action first

slender badger
wise berry
#

Then we'll put that command in your console once we are testing

marble verge
#

Can someone tell me why this doesn't work? { "Action": "EditData", "Target": "Strings/Characters", "Fields": { "MovieInvite_CantInvite_Buddy": "{{i18n:Characters.Buddy_MovieReject}}" } }

split ermine
#

okay i added the MarkActionApplied thingy and made a new save for mod testing, just to check before i test is this correct?

wise berry
#

Almost! You'll need a comma after the closing bracket on "Actions"

split ermine
#

okay done i always forget those SDVpuffersquee do i test it now? also i dont know how to spawn items with cjb..

velvet narwhal
marble verge
wise berry
#

Go ahead, and test in instances where you spawn the item -> switch seasons -> sleep -> ship the item to make sure it's working

velvet narwhal
#

you can just make it entries

marble verge
#

Because that's how I understood it

velvet narwhal
#

i'm not the most well known for remembering fields vs entries, but since it's not a.... dictionary.... of an item, you won't be wiping the entire file unless you quite literally blankload the file

marble verge
#

Okay, much obliged.

#

Glad I don't have to take a shot every time I forget a closing comma

split ermine
#

i feel like i forgot to do something you told me to do SDVpufferwaaah

split ermine
wise berry
#

Nope, run that in your command window

#

If you're using a different save file though, it shouldn't matter

split ermine
wise berry
#

Hm, hang on

#

You haven't included your other file by the look of it

#

So your trigger actions haven't even been running

split ermine
#

i feel so dumb now im gonna fix that SDVpuffersquee

wise berry
#

Include files also shouldn't have the Format line at the top

#

The validator will bug you about it but it's lying in that case SDVpuffersquee

split ermine
#

oh so do i just remove it and keep the Changes line?

wise berry
#

Yep!

split ermine
#

okay i updated the file im gonna test again ๐Ÿคž

wise berry
split ermine
#

i am now realising i wrote the wrong "FromFile" thingy wrong because past me copy pasted it from another mod im making..

wise berry
#

My type of mistake to be honest

ornate trellis
split ermine
ornate trellis
#

ah...I mightve actually found another issue...maybe THE issue...

#

SIGH

#

ok so

wise berry
ornate trellis
#

I used the wiki as an example and yall know by now that I am in a constant state of confusion

#

the issue was because I copy-pasted the wiki example WHICH HAD FORMAT IN IT

ornate trellis
#

I have a NEW issue tho

wise berry
#

Hmm, can you open the folders and then take pictures?

velvet narwhal
wise berry
#

I also want to see pictures of the Abigail dialogue files that are throwing errors

#

So I want to see inside the "data" folder and inside the "NPCs" folder that's in that one

split ermine
ornate trellis
#

when I plant my saplings theyre all messed up

velvet narwhal
ornate trellis
split ermine
ornate trellis
#

idk man i did my best to go the right way.....

#

the saplings are right but i feel like the trees...somehow..idk i made sure to originally edit the vanilla fruittrees sheet to align them right

split ermine
#

i wonder if it's because the other text files are empty..

wise berry
# split ermine here's the abi one from my other mod

I think I get it now, if this is supposed to be your other mod. Your crops mod is trying to load the Abigail files (botched copy/paste probably) and it's throwing an error because it doesn't (and isn't supposed to) have them

split ermine
wise berry
#

Check it all over

#

And send it here using the validator if you want help

ornate trellis
#

Yeah....when I copy-paste the vanilla sheet oveer my fruit trees they align on top of each other, huh...

#

what is going on..

#

wait...

#

where did i start with my sheet index...

wise berry
velvet narwhal
ornate trellis
#

yeah that was the issue..

#

but I still cant plant my second tree

#

ok found that issue too

split ermine
ornate trellis
#

BWAHAH

#

I mean

#

error fruit tree does sound like a funny idea but

#

what did I do wrong this time..

blissful panther
#

My guess: either you had the prefix (like (O)) where you shouldn't have it for the tree produce, or you didn't have it where you should have it!

#

Which way around they go... I have no idea.

hallow prism
#

ding ding ding, it's the take a break bell, ringing for you

lucid mulch
#

lookup anything the fruit

ornate trellis
#

found the issue, i had 'sapling' in the fruit name for some reason

#

:B

#

look at my trees and fruit!

velvet narwhal
# ornate trellis look at my trees and fruit!

i'mma hit you with it
๐Ÿ‘Œ๐Ÿ‘€๐Ÿ‘Œ๐Ÿ‘€๐Ÿ‘Œ๐Ÿ‘€๐Ÿ‘Œ๐Ÿ‘€๐Ÿ‘Œ๐Ÿ‘€ good shit goเฑฆิ sHit๐Ÿ‘Œ thats โœ” some good๐Ÿ‘Œ๐Ÿ‘Œshit right๐Ÿ‘Œ๐Ÿ‘Œthere๐Ÿ‘Œ๐Ÿ‘Œ๐Ÿ‘Œ rightโœ”there โœ”โœ”if i do ฦฝaาฏ so my self ๐Ÿ’ฏ i say so ๐Ÿ’ฏ thats what im talking about right there right there (chorus: สณแถฆแตสฐแต— แต—สฐแต‰สณแต‰) mMMMMแŽทะœ๐Ÿ’ฏ ๐Ÿ‘Œ๐Ÿ‘Œ ๐Ÿ‘ŒะO0ะžเฌ OOOOOะžเฌ เฌ Ooooแต’แต’แต’แต’แต’แต’แต’แต’แต’๐Ÿ‘Œ ๐Ÿ‘Œ๐Ÿ‘Œ ๐Ÿ‘Œ ๐Ÿ’ฏ ๐Ÿ‘Œ ๐Ÿ‘€ ๐Ÿ‘€ ๐Ÿ‘€ ๐Ÿ‘Œ๐Ÿ‘ŒGood shit

ornate trellis
#

evrytime i do a silly mistake I go "how dumb is too dumb to be making mods" owocry

velvet narwhal
#

is ok, everyone makes silly mistakes

hallow prism
# ornate trellis evrytime i do a silly mistake I go "how dumb is too dumb to be making mods" <:ow...

it's not about being dumb, it's about being tired and missing stuff. What's the difference between lumisteria.mtvapiusmyitem, lumisteria.lumisteria.mtvapius_myitem, lumisteria.mtvapiusmytem and so on and so on? or having (0) instead of (O)?
you're not dumb for making a typo and not spotting it, the brain is ignoring lot of details.

BUT when you are tired and tried various stuff and you still have issue, it does help to take a step back, go drink a bit of water, or eat something (i try to physically walk away of computer, even for a sec, or play a quick game or anything that isn't looking at the json), and when you return, the brain is ready to spot more details because everything is more fresh

#

it's not about not asking for help here, it's about learning to know the sign of your saturation, and when you are close to that stage, try (because i fail at that too) to apply one of those (or whatever is working for you). You can do a quick "here's my issue+json+log" drop here before doing that so when you return you may have some nice solutions to try ๐Ÿ™‚

sudden knot
#

ur so sweet lumi

marble verge
#

Very relevant

ornate trellis
#

that does make me feel a bit better lol

naive wyvern
ornate trellis
#

I did make myself something to eat uwu probably will try to do more today tho, its my last day in freedom lol tomorrow i start working fulltime again so probs no time besides sunday to work on stuff

naive wyvern
#

good luck with work tomorrow then pauhug

ornate trellis
#

thank you!

royal nimbus
#

would it be possible to render the color of the player and npcs shadows? i never noticed till now but it's tinted blue and it looks bad on all my black floor tiles. id like to make it black. ik it's hardcoded but wondering if there's a quick fix for it

dusky oriole
#

Does anyone know of a simple mod that only makes it so you can use bone swords on bone mills?

vernal crest
dusky oriole
royal nimbus
#

okay so this is silly. im not finding where the crop items are. ik there's the crops png in tilesheets but im not finding the actual items -.- ive looked in maps, and in tilesheets and in loosesprites and havent seen it

royal nimbus
#

it wasnt in there ;o

drowsy pewter
#

maps/springobjects

royal nimbus
#

let me look again

drowsy pewter
#

they're there

#

roughly upper third

royal nimbus
#

ah i found it

#

-o-

#

im such a derp

#

ty

#

just had it open too lol

minor marsh
#

Okay, this is starting to drive me up the walls. Sigh.

Look. I need sugar. And I mean a damn lot of sugar.. buying sugar for 100g a pack at Pierre simply won't do, and Beets alone in Fall aren't exactly a feasible way to sustain the sugar flow for a full year.

So.. on to Cornucopia I hop. They have Sugarcane in summer and Sugarbeets in spring. Great! All the sugar I could ever need.

Exceeeept.. Sugarbeets are year two only.. and need the expanded pack, too. I'd rather not get buried under dozens of seeds I have no need for when all I need is some sugar, man..

So, browse the files, find the entry.. format looks.. pretty understandable? Or so I thought...

Find the sugarbeets item.. slash the price by half, no issue..
Find the seed settings.
Rewrite the pack from expandedcrops to essential.. change the rarity from rare to common. Seems to be all in line with the format of the other crops!

Except.. it's not working. Even item spawner says the seeds don't exist. So I assume I need to switch some other line somewhere to make it a non-extended item.. and I simply cannot find it.

So someone who knows these things better than me be so nice and point a finger? Or just tell me that it's more complex than that so I can just surrender and flip the extended mode on.
At this point I'd be happy with either outcome. And maybe an aspirin.

hallow prism
#

i mean, hu, i wouldn't start modding by editing a mod like cornucopia JUST to get a bit more sugar, but

#

rarity has nothing to do with making stuff available, so changing it is pretty much irrelevant, i believe

minor marsh
#

Editing for personal use is a good tool for learning how things work though.

hallow prism
#

i have no idea what "rewrite the pack from expandedcrop to essential"

#

yeah it's not what i said at all

#

i said editing a big mod like that is overwhelming, which is kinda proven by the fact you're overwhelmed

minor marsh
#

Aaalright, hang on..

#

There.

hallow prism
#

there what?

minor marsh
#

I'm getting there!

#

snicker

hallow prism
#

you just changed the tag?

dense jolt
#

Couldn't you just make the prices for sugar cheaper at Pierre? It'd be easier ๐Ÿ˜…

minor marsh
#

Buying the sugar still feels a bit against the point.

#

And yeah, based on the format of the other crops..
It seems there's only two variables.
"extendedcrops" and "essential".

hallow prism
#

(what does "snicker" means?)

minor marsh
#

As well as "rarity_common", available as first year..
And rarity_rare, available year 2 and onward.

dense jolt
minor marsh
#

... I could also write giggling, good grief..

hallow prism
#

wow ok well

#

if i'm not allowed to ask question, it will make debug complicated. Good luck

dense jolt
ornate trellis
#

You gotta remember that not everyone's first language is English and Brogio your comments aren't exactly funny tbh

minor marsh
#

And getting snapped at after correcting someone's misinterpretation, geez.
That ain't my day.

Fine, I'll just get back to it the old fashioned way.

dense jolt
drowsy pewter
#

the context tags section does nothing functionally

--which is why lumina had no idea what you were pointing at with the screenshot

#

you want to literally move the entire entry for that item to be next to the entries for the base items

ornate trellis
#

You get served what you dish out but in generally I don't get what people get like this when coming in here with questions. But anyway, good luck, I sadly wouldn't be able to help you with your matter.

quartz crane
#

hey guys, I need a little help. I'm trying to create a new mod, I follow the instructions on stardew wiki to create an example that will print every key pressed. The mods works but whenever I Alt + Tab the game crashes without any error message, any tips?

rigid oriole
#

Can you share the code you're running?

quartz crane
#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using StardewModdingAPI;
using StardewModdingAPI.Events;
using StardewModdingAPI.Utilities;
using StardewValley;

namespace BetterFridge
{
    internal class ModEntry : Mod
    {
        /*********
 ** Public methods
 *********/
        /// <summary>The mod entry point, called after the mod is first loaded.</summary>
        /// <param name="helper">Provides simplified APIs for writing mods.</param>
        public override void Entry(IModHelper helper)
        {
            helper.Events.Input.ButtonPressed += this.OnButtonPressed;
        }


        /*********
        ** Private methods
        *********/
        /// <summary>Raised after the player presses a button on the keyboard, controller, or mouse.</summary>
        /// <param name="sender">The event sender.</param>
        /// <param name="e">The event data.</param>
        private void OnButtonPressed(object? sender, ButtonPressedEventArgs e)
        {
            // ignore if player hasn't loaded a save yet
            if (!Context.IsWorldReady)
                return;

            // print button presses to the console window
            this.Monitor.Log($"{Game1.player.Name} pressed {e.Button}.", LogLevel.Debug);
        }
    }
}
rigid oriole
#

Oh this really is just the starter code

quartz crane
#

yep

final arch
#

does it crash without your mod?

#

are you on windows?

#

start SMAPI via terminal and check the output when it crashes

quartz crane
#

it does not crash without the mod and I just noticed that if I comment the print statement of the key, it does not crash

#

so I believe that's the problem?

#

weird

final arch
#

whats the error msg when it crashes?

quartz crane
#

no msg

#

the game just freezes and after some time windows tells me that the game stopped working

final arch
#

make sure you havent clicked the console

#

if you mark smth in the console window itll freeze the game when it tries to print smth

calm nebula
#

are you running via visual studio?

#

or are you running the game "normally"

quartz crane
#

running normally, via steam

quartz crane
#

that was it

#

I cant click on the console

#

lmao, I would never guess that, thank you

final arch
#

you can, just hit "enter" after and it should be fine

quartz crane
#

yeah I tried unselecting the terminal, it works now

dense jolt
lucid iron
#

if you are on windows, modbuildconfig is setup to run debug as well

calm nebula
#

yup

#

congrats

#

c# modders can use hot reload ๐Ÿ˜›

pine magnet
#

can someone help me with the smapi like update thing

dense jolt
#

So I've been opening and closing via steam like a dumbass?

lucid iron
calm nebula
pine magnet
#

thank you

calm nebula
lucid iron
#

well u can still debugger

calm nebula
#

in which case, microsoft's language, you are second class citizens, sorry

lucid iron
#

theres just more hoops

calm nebula
#

no hot reload though

#

I can't imagine doing menuing without hot reload

lucid iron
#

yea doomed monS

#

but u can jump through separate set of hoops to run unit tests with game directly now

dense jolt
plucky reef
#

is there an easy way to find tilesheet locations or do I need to do math and counting? Trying to find a spot on the animations tilesheet and I think I have the wrong scale.

#

oh these are 64x64, not 32x32?

lucid iron
#

Yeah I don't think there is way better than looking at the draw function and deriving the rect

plucky reef
#

ok and then is it....

new Rectangle(128, 320, 64, 64)

The 128 is the column and the 320 is the row?

lucid iron
#

No those are x y width height

plucky reef
#

well in pixels, so 128 is 2 over, 320 is 5 down, and it should target this one (except it isn't in game so I'm doing something wrong).

paper sundial
#

The one you marked looks like 64, 256

#

Assuming each sprite is 64x64

lucid iron
#

Yeah the x y is top left point of the rect

plucky reef
#

oh arrays start at 0

lucid iron
#

I usually open image up in gimp

paper sundial
#

yes

lucid iron
#

And just enter the numbers into a select

#

Less thinking wew

paper sundial
#

x = horizontal offset from 0
y = vertical offset from 0

plucky reef
#

ok sick that is working as expected now, ty

#

ok the next one that was stumping me last night is why the projectile hits the monster and then keeps on trucking. I thought it was because the animation wasn't working (because my math was way off so it was targeting a spot on the sheet that doesn't exist), but now the animation plays when it hits the monster and the projectile keeps flying. So it's calling explosionAnimation fine but ignoring the destroyMe part.
also can't get travelDistance to work, I put it in the constructor and it only accepts ints which is fine but doesn't seem to do anything.

#

intellisense wants to make it ExplosionAnimation but I don't think that would make a difference.

#

I have no references to the pierce value or bounce value and assumed that would make it zero.

teal bridge
# uncut viper so, i figured it out. the parameters for my dynamicmethod can be empty, thats fi...

For DefineParameter, position 0 refers to the return value: https://learn.microsoft.com/en-us/dotnet/api/system.reflection.emit.dynamicmethod.defineparameter?view=net-8.0#remarks

The parameter name doesn't include the type, so I'm confused about that. But yes, we overlooked that Harmony does parameter matching on the name, so you do need to DefineParameter for every argument to make sure it has the name Harmony expects and not a default generated name that won't match.

Anyway, kind of expected it to already be resolved by the time I got back online; glad you figured it out.

ornate trellis
#

so........I wanted to test and spawn a fruit tree on my map and I got a palm tree :( how do i put my custom one there....

lone ice
#

Hi all! Question: I'm using Farm Type Manager to put wild game in my mod, and I tried inputting a vanilla sound effect using this code but it says it doesn't exist. Was I meant to input the sound file somewhere or am I just using the wrong code?:

"SpawnSound": "00000082"
#

pig 00000082 Pig snort Pig sound

ornate trellis
#

nevermind i am a fool i didnt use tileindex 34

#

sigh

#

anyway

lucid iron
lone ice
#

oooh okay thank you!

lone ice
ornate trellis
#

thanks!

#

its a custom map for my mod update i am planning :3

lone ice
#

my eyes are just feasting on those colors holy crap ๐Ÿ‘€

teal bridge
#

Are there any/many existing mods that change interaction with the mailbox? I'm thinking of making one and wondering what compat issues to expect.

lucid iron
#

As long as you don't break mail framework mod it's probably fine

teal bridge
#

Ah, that one actually would be incompatible with what I was thinking...
What is "mail framework mod"?

lucid iron
#

It adds features mod authors can use to mail, still used in 1.6

thin hamlet
#

So what exactly makes a good abbreviation

#

Crystal Clear was a good name, but the abbreviation confuses with vanilla obviously

teal bridge
#

I don't think it should interfere with MFM, then; it would be adding an alternate action when interacting with an empty mailbox.

thin hamlet
#

Adding Toni in front of it makes an abbreviation that isnt very pronounceable

teal bridge
#

I don't know why someone said TCC isn't pronounceable. I'm not seeing the problem.

lucid iron
#

What would it do when empty mail DokkanStare

thin hamlet
#

Huh?

#

Huh

#

Wait yeah idk either

#

TCC it is

lucid iron
#

I hold the opinion that TCC isn't very pronounceable because it lacks a vowel

#

But that is only for saying it like a word

teal bridge
#

Oh yeah, it's not a catchy pronounceable word like SpaceCore or maybe BETAs, but we have CP, FTM, and so on.

lucid iron
#

I do wonder if it should be it's own object though

thin hamlet
#

I see your point but at the same time its not really something you have to spell out like that, each letter rhymes

lucid iron
#

Like a stationary desk to mail your friends on ukimasu2

wanton pebble
#

Mail Services also allows you to send a gift, but the menu is a teensy bit clunky

thin hamlet
#

If I come up with something else, Iโ€™ll let yall know but otherwise TCC stays

teal bridge
#

Okay, didn't find the Mail Services mod, but yeah, that is sort of the same thing.

thin hamlet
#

Bye!

wanton pebble
#

To clarify: I have like 100 villagers, and the way to send a gift is to go through several sequential menus in alphabetical order