#making-mods-general
1 messages · Page 68 of 1
I wonder how fast I can make an NPC...
https://smapi.io/json/content-patcher/3aad3b4c9aa942d4bcd877236640bb74 Is this all it takes to do music addition?? It feels so easy I'm like surely I'm doing something wrong
you still need to set where that music will play, but looks good to me
(haven't looked yet, but it is in fact easy!)
looks more or less right
could do it in a few minutes if you just rename an existing one
yeah i still need to reupdate my map file, i'm tackling one little chunk of upgrading the old version at a time
shapeshifting monster npc that steals the sprites and portraits of other characters...
the mod contest rules prohibit plagiarism, but not prior work
My academic advisor calls that self plagiarism
(they probably won't like it if you do it)
selph got confirmation that you could submit a mod that was already a WIP but i guess the jury is still out on previously released
(Which is a nonsense concept imo. Self plagerism?)
i would also think they wouldnt like it
Do you still set this through the variable in the .tmx file in Tiled, or is this called through CP now too?
Okay got my coloured name
the preferred way is through the Data/Locations entry for that location
Event over
you can set music in the .tmx itself but its not recommended and only in specific circumstances is required (i dont remember that circumstance but it came up once)
still no modding contest submissions
nobody claiming an easy 15pts for renaming an npc to Seboostian and calling it a day
I think I did it, goodness
matcher.MatchStartForward(
new CodeMatch(OpCodes.Ldftn),
new CodeMatch(OpCodes.Newobj),
new CodeMatch(OpCodes.Callvirt, AccessTools.Method(typeof(List<FarmAnimalProduce>), nameof(List<FarmAnimalProduce>.RemoveAll)))
)
.ThrowIfNotMatch($"Could not find entry point for {nameof(FarmAnimal_GetProduceID_Transpiler)}");
staticHarmony.Patch(
original: (MethodInfo)matcher.Operand,
transpiler: new HarmonyMethod(typeof(AnimalDataPatcher), nameof(AnimalDataPatcher.FarmAnimal_GetProduceIDDelegate_Transpiler)));
(actually i think the circumstance was constructed building interiors? maybe?)
(it's not throwing errors so it works, probably)
no one wants to waste their single submission 
ah, looks like i'll be rebuilding this section of the mod then too LOL
wait do you only get 1 per person
so much has changed in the last year
you only get one submission yes
I'm trying to copy that form but it's not going to work hahahaha I think I'll make a more standard form.
you can submit one entry to both the art contest and the modding contest but you only get one of each
i saw a junimo in #1292670497665974272 say that if you want to recant an earlier submission and resubmit you technically can if you ask them but they would really prefer you didnt
what are they gonna do, ban me
(for legal reasons I must clarify it was a joke, pls dont ban)
even if they didnt would you be able to live with yourself for making the junimos sad for giving them extra work
you'd need to ban yourself
oh, also, i'm sure you have more important things in your queue, but i recommend converting your music to .ogg format and using "StreamedVorbis": true, which will drastically reduce your mod's file size and lower its memory footprint. it is not required at all but it is a nice favor you can do for your users
What do you think about using the game's own bottles and making it in another color? I have seen that many mods that add alcoholic drinks do that.
editing vanilla sprites is a time honored tradition
feel free to do it if you want/if it makes your life easier
will do!
.. we only get 1 submission? not 1 submission worth points and any amount of others for free?
you get one contest submission
i'm sure you can make as many spooky-season mods as you want. but you only get 15 points once and only one entry gets judged
i would assume it means you cannot post more than once in the channel
i imagine they have the bot detecting that
hence why you'd need to ask to resubmit
i'm not sure what the system is for choosing the one mod. last wins? locked out? dunno
I'm with Button in thinking you can only submit once
Yes, it's more a question of time, I only have a few hours of vision functional enough to design, then my vision degrades a lot for several days and I can't do almost anything, especially designs, translations I can do because it's a little easier but it takes a little longer than usual.
the channels specifically say they are for submitting entries
so if you can only submit once, it stands that you can only post in there once
Last contest they said that you could submit as many times as you wanted but only the last one counts. This time, they only say "one submission allowed"
bc posting there is synonymous with submitting
#1292670497665974272 message
i misremembered but only slightly, its actually not even guaranteed you can resubmit
just a maybe
so yeah id just bank on getting the one and dont be tempted into making a joke mod if you want to make a real mod too 
loving the purple so far
god this contest is gonna wreak fucking havoc on my at-a-glance name colour + length associations with people
thats how i remember who everyone is before reading their username
how do i flip the npc animation on the schedule thing? :(
the temporary roles will last an extra week, too, for more mayhem
yeah I had a hot sec where I didn't recognize atra between the color and the name
three weeks will be just long enough for me to get used to it just to have it yanked awayu again
do the colours of the contest winner roles override the normal server ranks if you dont have the mod author role 
one way to find out
one expensive way to find out
are you implying i should bribe the junimos
are u willing to bet your shiny prpl
as a contest winner, i'm fairly sure contest winner ranks below everything else
F
@ivory plume would it be OK to make the SocialPage.drawNPCSlotHeart, SocialPage.sprites, and SocialPage.isCharacterSlotClickable public?
well thats fine y'all are allowed to submit entries now then
surprise trick or treat candy..
i love it
(don't buffs that go into Data/Buffs not show up on the tooltips?)
also damn, I need to change my pfp too
You could use spacecores trigger action on eaten to apply a buff 😛 (or what atra said)
I have no idea, I've never done buffs or objects
if you use spacecore as a dependency can you call it a collaborative submission
xD
very niche question: there is this runtime class, which is apparently automatically castable to FarmAnimal when passed into functions (without needing to call .<>4__this). should I rely on this behavior?
Sure, I'll do that in the upcoming 1.6.9 beta build 24292.
Are you sure it’s castable to that? It doesn’t look like it to me
That looks like the compiled type for a closure?
yes, it's a delegate
I have code that does just that, which by all account should throw an error, but it doesn't
I wouldn't recommend depending on specific compiler artifacts, since they could change at any time (e.g. because the compiler decided a different way is more optimized).
Are you sure it’s casting correctly? And not say resulting in null
I'm not casting, just ldarg-ing it into a function call as is
a function that expects a FarmAnimal
And the function call is getting the farm animal instance properly? Weird
I would expect the method to error when run or something
heck I expect it to throw a 'invalid IL' on patching time, not even when run
i asked staff and they said only 1 submission please, so that's fairly definite haha
exactly what are you doing
I agree with casey - I expect segfault
me too, but it's not
anyway I made it work 'properly' because I'm nervous as hell lol
if you're trying to follow my madness: make a new function that accepts a ignore everything it doesn't workFarmAnimal parameter, find this class, patch the <GetProduceID>b__0 function to add some code that calls that function, and just pass ldarg.0 to it
(the only thing scarier than when code that you expects to work doesn't, is when code that you expects to crash and burn doesn't)
question about serialization and custom location types
if i wanted to make a custom location that only needs to exist temporarily, like a door that leads to a randomly generated room like a mineshaft, do i still need to register the location type with spacecore
also is there a good way to go about making a custom temporary location type
Don’t put it in the Game1.locations list (or remove before saving) and you should be fine
got it
thats what i thought but i wanted to make sure before i got into it
For locations not in the locations list you’ll need to do some extra stuff for Mp
Like what SpaceCore does for the dungeons stuff
oh this is for the mod contest multiplayer is ENTIRELY an afterthought
itll be a happy accident if it works well enough
ill try a little bit. but not a lot
You might need to do some stuff for SP too
Can’t recall if the location update methods get called normally
Probably not if they aren’t in game locations list
how do the active mineshaft locations get updated then?
i guess they probably just go through that list huh
They’re in another container, which is also updated in Multiplayer I think (even in sp)
I think it’s updateNetRoots?
Or updateRoots?
SpaceCore patches that function to also update the other locations I think
Same way I did it for original Moon Misadventures
hmm. wouldja mind if i took a glance at how spacecore did it to help me figure it out if i cant on my own?
thank you!
what wouldn't bog down my modlist.............................
LOL whoops I just went to test my mod without having written a content.json or manifest.json >_<
if I define a var ex = null on Entry and sucessfully give it a value on OnSaveLoad, it will reach with the given value at DayStarted, right?
I know I could test it, but it is past midnight here and I am tired of seeing the game title screen for today
just trying to close it to hit the bed
I'm fucking stupid.
The function was never called.
I wasted an hour.

we've all been there 
(yes, it will crash and burn)
i need a "me" emote
(Nexus accurately summarizing SMAPI's posts tab.
)
i wish i could make description text colorful 
hey now, be kind to you. 
(Looks at SMAPI posts tab)
Wow, you get even more outdated GMCM messages than I do. (And so many non SMAPI issues…)
ha ha you forgot to call your function
me spending half an hour debugging my code before realizing i never hooked em into OnUpdateTicked
id like to say this has only happened a few times
but i cannot
i spent, what, 12 hours on a harmony patch that never ran?
thanks, that meant a lot
This bool charClick = (bool)Helper.Reflection.GetProperty<bool>(__instance, "isCharacterSlotClickable").GetValue();
makes this:
System.InvalidOperationException: The StardewValley.Menus.SocialPage object doesn't have a 'isCharacterSlotClickable' instance property.```
It also growled with GetField.
Is this I guess not a field or property?
private bool isCharacterSlotClickable(int i)
{
SocialEntry entry;
entry = this.GetSocialEntry(i);
if (entry != null && !entry.IsPlayer && !entry.IsChild)
{
return entry.IsMet;
}
return false;
}```
it's a method
I see! Thanks! I will give GetMethod a shot! (it kept getting mad about something when I tried it but I forget what)
your GetMethod call will look like this:```cs
int i = 0;
bool charClick = Helper.Reflection.GetMethod(__instance, "isCharacterSlotClickable").Invoke<bool>(i);
Awww thanks love!!!!!!!!!!!!!!!!!!!!!!
Help, what am I doing wrong? The bagel item works and I can eat it, but nothing happens when I do (I just want the buff but I added the PlayEvent and ShowHudMessage in case I was just doing something wrong with the ApplyBuff action).
{
"Changes": [
{
"LogName": "Add Trigger Actions",
"Action": "EditData",
"Target": "Data/TriggerActions",
"Entries": {
"{{ModID}}_Buff": {
"Id": "{{ModID}}_Buff",
"Trigger": "spacechase0.SpaceCore_OnItemEaten",
"MarkActionApplied": false, // Do I want this? Action doesn't happen either way
"Condition": "ITEM_ID Target {{ModId}}_Bagel",
"Actions": [
"spacechase0.SpaceCore_ApplyBuff statue_of_blessings_1 \"Ehh?\"",
"spacechase0.SpaceCore_PlayEvent 16",
"spacechase0.SpaceCore_ShowHudMessage \"message goes here\""
]
}
}
}
]
}
i think you need to add the food itself to spacecore's objectextensions or somethin i think to mark it as applicable for OnItemUsed stuff? i might be misremembering tho
Like this?
{
"Action": "EditData",
"Target": "spacechase0.SpaceCore/ObjectExtensionData",
"Entries": {
"{{ModID}}_Bagel": {
"UseForTriggerAction": true
}
}
},
i believe so
also MarkActionApplied: false means that the trigger action is repeatable
if it does get marked applied then it only happens the one time (or until its unmarked again)
so you do want it to be false
Thanks
(also looking at it again for food im not actually sure if UseForTriggerAction is the issue i mightve been confusing it with OnItemUsed
)
I already had the ObjectExtensionData thing, by the way, so that does not fix my issue. I wasn't sure if it applies for OnItemEaten as well as OnItemUsed so I added it when the action didn't happen.
did you already test it before adding MarkActionApplied: false to it beforehand?
I've tried both ways
Having gone back to title to ensure the action wasn't marked as applied
\o/
Woo!
yeah custom triggers can decide whichever one of Input or Target they wanna send to
or both, if they wanted
Thank you, it did not occur to me to try Input. I had enough difficulty even figuring out what the <target> in ITEM_ID <target> <item ID> was meant to be.
Thank you!
Now to figure out how to make it apply a random buff
if you cant figure out another way, BETAS does have a RandomAction action
so you could have it choose from a list of ApplyBuff actions
Ooh nice
(The ObjectExtensionData was not necessary for OnItemEaten, just to confirm)
(v good to know, thank u!)
their meaning is documented here, though we should probably add a new heading for items in the "Common values" section: https://stardewvalleywiki.com/Modding:Game_state_queries#For_items_only
those meanings are only guaranteed to be correct for those stated things though (machines, trees, shops). for a custom trigger it wouldnt help to know which should be which if the custom trigger doesnt document it
I was reading that, Selph, but got confused by the fact that it says they take a <type> argument but then the condition column in the table was referring to <target>.
yeah I want to add "modded GSQs contexts can choose whatever the heck they want to lol" to the wiki page
just to clarify that it doesn't apply for modded GSQs contexts
its not the GSQ itself that determines it though
(Also once I did figure out the <type>/<target> thing I didn't know that custom triggers can choose which they want, so I went "well, a farmer isn't a machine so it must be Target")
(and correct that)
the GSQ gets passed a context with the target and input items already set (or null)
my farmer is a machine
s/GSQ/context/g
I wouldn't be surprised to learn that the farmer is actually considered a machine though lol
the farmer is a machine that turns 🍝 into 💕
fixed the wiki, hopefully it should be clearer-ish
anyway back to maze solving for my shiny color
oh true
maze solving 
i literally woke up, read through the event page, and started on my art submission 
Button, how does your Spiderbuttons.BETAS_RandomAction <Action>+ account for quotes inside one of the actions in the list? I currently have "Spiderbuttons.BETAS_RandomAction \"spacechase0.SpaceCore_ApplyBuff statue_of_blessings_1 \"Ehh?\"\""" and while I haven't tried it in game, VSC is cross at me. Can I use single quotes somewhere to make it happier?
you can nest escaped quotes but i would just use ' for the very outside most quotes
Whoops ignore the <Action>+ bit
'Spiderbuttons.BETAS_RandomAction "spacechase0.SpaceCore_ApplyBuff statue_of_blessings_1 \"Ehh?\""'
All right I will give that a go, thanks.
VSC will still be cross with you if you arent using json5
Stupid question but: Why is "0.0.0" not a valid verison number?
if something exists then there is at least A version of it
same reason why 0 isn't a valid number of oranges
Hooray, that worked beautifully. VSC is cross but I can deal with that.
question: can i use the changeToTemporaryMap <map> command during the event, and leave the player there after the event?
i've never tried that but i assume because the temporary doesn't 'exist' as a location, it'll bug out?
there is that uhhhh playerControl but i haven't been able to figure out how to wrestle command back from the player
mostly because SMAPI decides it isn't. you can do 0.0.1 though
i won't be taking control back 😌 i did just stumble across it tho
seems like you can't get away with a temporary map though since there's apparently no collisions
SMAPI implements the semantic versioning standard, where the numbers have specific meanings; 0.0.0 doesn't make sense in the context of that standard.
wdym no collisions? i remember being stuck in my temp map because i blocked things off
with playerControl
(interesting, the standards recommends 0.1.0 as the first initial version. I've been using 0.0.1 lmao)
(0.0.1 would be a bugfix for the previous release, which never existed.)
(But mods don't actually need to follow the standard, as long as the format is valid and the numbers go up for each release.)
nevermind, collisions are back for some reason
must've been the wind
map property warps don't work though for real, so maybe a cunning tile action 
what're the rules regarding walking onto a TouchAction PlayEvent from within an event 
will it even let you is the real question, i know dialogue worked but i couldn't force a doAction <x> <y> to a sleep tiledata
[game] Couldn't create the 'MovieTheater' location. Is its data in Data/Locations invalid?
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
---> Microsoft.Xna.Framework.Content.ContentLoadException: Failed loading asset 'Data\Movies'.
---> ArgumentException: Object of type 'StardewValley.Season' cannot be converted to type 'System.String'.
is this a nightly build thing 
i haven't even looked at the movie theatre
and no, the game doesn't seem to respect touchaction playevent
unless
okay yeah it's not allowed
Oh dang, SpaceCore died in the latest beta huh
I'm not having any issues with my movie theater though
aarrrg you can't even use Buildings Action PlayEvent
it'd be so nice to have a TouchAction NextEventCommand
Updating to the latest SMAPI version on Nexus should fix that (hopefully).
Ah thanks, I didn't even look at the updates, got distracted looking for the movie theater stuff lol
spacecore loads with the new smapi beta 
why must i have weird niches, i gotta go ask bouncer again 
Anyone remember/know the mod that patches this?
!recolor Do you mean the fix?
- DaisyNiko's Earthy Interiors -> Partial Complement
- Vibrant Pastoral Recolor (VPR) -> Temporary fix for 1.6
- Simple Foliage -> Unofficial Fix 1.6
- Starblue Valley -> Unofficial 1.6 Note: do not use with original mod
Check out Recommendations: Map Recolours for recolors that support 1.6 out of the box.
The Partial Complement to DaisyNiko's Earthy Interiors
Yup I think it's that one - thanks!
i was really hoping to be able to do this with just CP
event changes to temporary map, gives player control, player ends event when they touch a point
just can't seem to end the event
no clues in any event files i've looked in. only "Demetrius": "Egg... what a strange thing to eat."
i know there was the fancy thing in RRRR of a playerControl, with the skippable and it skips the playerControl into a new event
i have yet to recreate it because skippable and unskippable confuse me
This is how the Multiplayer cabins work, right? There's 7 close cabins and 7 far ones?
it's so rude that map property warps don't just not work in playercontrol events, they block whatever tile they're on
not even noclip mode passes through. incredible
Technically speaking, semver also says that all 0.x versions are development versions, so there's actually no difference between 0.0.1 to 0.0.2 and 0.1.0 to 0.2.0. They're both considered unstable updates. It's only once you hit 1.0.0 that the minor/patch versions kick in.
(/nitpick)
correct
man this reminds me, ive never really tested my maps in MP. but so far no reports, so i hope theyre fine haha
{
"Id": "Default_FeedHopper",
"ItemId": "(BC)99",
"Tile": {
"X": 7,
"Y": 4
},
"Indestructible": true
}
],```
This isn't placing the FeedHopper in my building is there something special I need to do on the TMX side or in the code. The feed areas/trough I can still walk through which seems wrong too. I know it's pretty niche but you all have been amazing with helping me everything in the past!
Here is the whole code if it helps building is at the bottom https://smapi.io/json/none/ddf5b099e57f4625ae121993a4baf0e2
tiles need to be on the Buildings layer for them to be impassable
as for the feed hopper, hmm that code looks right to me. how did you build this building?
Like steps taken in tiled?
Sorry, as in how you built it in your save
Built at robin as an animal house it gets the bugs in it correctly so I think that bit is right idk
Did you build it before adding the feed hopper to the code
I did have it in there but I've moved it since but I'll try building a new one and see if that helps!
Genius
Appreciate you!
that means that worked right 😅
did you add the tile property "Trough" to the "Back" layer (with value "T")
Dont think I know what that is
recommend opening up a vanilla coop/barn map for reference
(huh this isnt documented on the wiki, which is strange since it's kinda important)
I did try to find an answer and I've looked at the vanilla ones just not super familiar with Tiled. I only see map properties. I dont see, on the vanilla ones, any Layer Properties
it seems like vanilla maps set the property on the tilesheet itself
I tried using that tile from the normal coop tilesheet but that still didnt work :/
yeah about to say
need to set them yourself in your map I think
Maybe you didn't add the tiles to the Back layer?
anyway I'm on my bed and about 5 mins to passing out so I can't help further, but yeah Back layer > "Trough" property
Yeah I was missing this bit in the actual code of the map
<properties>
<property name="Passable" type="int" value="0" />
<property name="Trough" type="string" value="T" />
</properties>
</tile>```
Thank you! It's working now
Hello to all the nocturnal SDV modders! I have a question when it comes to the syntax for concession tastes and movie tastes.
After doing the typical EditData setup, I'm curious about which value is supposed to be the internal NPC name and the NPC display name:
"Entries": {
"JortsCat": { (#1)
"NPCName": "JortsCat", (#2)
Is #1 / #2 the internal name or the display name?
I pulled the code from the modder wiki
"Name": "Edelweiss", << display name```
Data/Characters entries have no field named NPCName; the entry key is their internal name, and they have a DisplayName field inside
Oh, so the code on the modding wiki needs updating? That makes sense! I'm still getting the hang of things
bluebs it's the moviereactions.json
#1 is internal, #2 is display
i think 
unless it just wants double internal
I'd find it confusing for it to want double internal since it'd be pretty redundant, right?
I don't see a Name field in MoviesReactions

That's from the unpacked XNB, right?
yeah
In this example, #1 is the entry key, #2 is the internal name
Entry keys aren't always used when CP adds entries to data
They're necessary for CP to know that something is part of that dictionary of entries, but not always used in the actual data transcribed
Should I still keep the token "NPCName" or have it changed to "Name"?
The field NPCName is necessary for that data model
i pulled mine from concessiontastes so that's my bad 
To be fair, I was basically gonna copy-paste the data from concessiontastes since my brain thought the setup was the same 💀
moviereactions has uh, mid-interactions scripts
concessiontastes is their 'gifttastes' during the movie basically
ahhhh makes sense
The wiki page for MoviesReactions probably could do with a reformat though
i've avoided making my own moviereactions tbh
idk who the ones in charge of the modding wiki are, but I'm happy to provide the link to the page
It's basically everyone
If you don't add your own movie reactions, it defaults to universal tastes, right?
They're more to spice things up?
https://stardewvalleywiki.com/Modding:Movie_theater_data#Movie_reactions
This is the official wiki page, which does have the model info properly in a table and all that, but usually the pages tend to have all the info in easy to parse table format rather than just part of the data
Making bigger changes to the wiki is still pretty low on my list of priorities lol
That's understandable. Real life and working on mods takes a bigger priority lol
I can't even muster the desire to finish my wiki.gg pages lol
I reached an okay stopping point on the two tutorials I did and almost completely abandoned the mail flag page
Yeah, I mean I think I have all of them listed at least, but I was working on sorting and explaining them better
Which is tedious because that means tracking them down in the code and reading all the code around them to see where they're being added from
And trying to translate that into some kind of plain description of what is being done
We'll get it done one day
Eventually ™️
That's funny, the TM emoji doesn't auto convert to emoji format until after being sent
Oh it's an emoji? I was wondering how people did it without getting bonked for using superscript
That's very neat lol
man
i really didn't wanna rush this art submission but my brain is losing traction
i can now go and make that scarecrow building with ample excuse
Ah the crows, another project I may end up backburner-ing lol
I've got the building working mostly how I want, but I couldn't decide how I wanted to handle random item drops
i was gonna ask if you wanted to collab since i couldn't get the crow spawning and i don't think my brain would be able to handle it right now
critters don't drop things huh
I'm not opposed though also I can't say I'm very reliable for such things lol
Yeah, was just gonna make the building drop an item if crows spawned that day on a percent chance
oh maybe with the item_spawning?
Which actually, I still need to make the item actually drop, currently just creating an instance
just, on the floor, like animals 
Alternatively, giving it a chest to hold the items might be better. Not sure how long dropped items can live on the ground
i am also contemplating a 'crow' as either a pet or a coop animal
I did consider adding a raven critter that doesn't spook the way crows do, but that felt too much like scope creep lmao
i do those mazes while i rest
open a bunch of different tmxs to mess with a bunch of them to see which one i wanna base my edit off of
(so like 12 different maps with various amounts of mess made on them with different tilesheets added/removed/painted tiles etc)
finally decide on one and make a bunch of edits and go to save it
and accidentally do File > Save All to save every map i still had opened

(all bc i decided "maybe ill work in the unpacked folder this time"...)
Oh nooo
ill just re-unpack later 
I also never work in the unpacked folder for that reason. Also because I am always accidentally leaving mod maps and tilesheets in there and then think they are vanilla (which I saw you say you do as well).
yup, thats exactly my usual reasoning lol
also i lied i forgot i need to unpack Now actually bc i need to make several variants based off this same map. which ive now saved over. rip.
Do custom maps require using C#?
they do not
Nope
thank god
I kinda wanna avoid using C# for mods, but I feel like doing some might add some extra depth
you make a map in Tiled and can make your custom location use it by adding it to Data/Locations with Content Patcher
Does the game actually use the "Full" and "Quenched" buffs anywhere?
well fed? 
Do those happen when you eat/drink a ton at once?
idk about quenched
I'm pretty sure quenched is used, but it's like hardcoded I think
I shall have a look in the decompile then
I don't remember seeing them in game but that doesn't mean much haha
How on earth am I going to search for something with an id of "6"
You can try searching for hasbuff("6
Ooh that gave me something
Looks like if you have quenched it adds a hud message and returns
So stops you from drinking I guess
Definitely not the buff I was thinking of lmao
I don't know how you reach that
a ginger island drink...maybe?
I was just non-stop eating before when I was testing the trigger action
I dunno if those buffs are ever used
They exist and are checked but I'm not finding them being applied lol
I also am not sure
looks like, 17, 23, 28 are the only buffids that are in objects.json
I can't find how this section determines what buffId can be included. (Not sure if this is the section that would apply those buffs anyway, but yanno)
/// <summary>Apply a buff to the current player.</summary>
/// <inheritdoc cref="T:StardewValley.Delegates.TriggerActionDelegate" />
public static bool AddBuff(string[] args, TriggerActionContext context, out string error)
{
if (!ArgUtility.TryGet(args, 1, out var buffId, out error) || !ArgUtility.TryGetOptionalInt(args, 2, out var duration, out error, -1))
{
return false;
}
Buff buff = new Buff(buffId, null, null, duration, null, -1, null, false);
Game1.player.applyBuff(buff);
return true;
}
That's just the debug command
Er trigger action
It takes arguments
If it's a built in trigger action it should be on the wiki
Chances are good that the base game code would just apply the buffs directly, rather than use a trigger action
Which it does in several places, but I can't find anything that applies either of those buffs
Yes that makes sense
I guess it was just a feature that was skipped lol
I am just looking at a bunch of bits of code with "buff" in them, trying to find where buffs are applied
Probably because it sucks
So basically doing what you're doing, but slower and worse
I searched buff, saw over 1k hits and decided that was the wrong way lmao
And have successfully manipulated you into doing it for me 
Let's say half manipulation, half my brain latching onto literally anything other than writing my documentation 
We both win!
Thank you for checking for me. I will ignore those two buffs and move on.
Numeric IDs are the worst
Yeah, it's a shame it would have been so troublesome to switch them all to plain text during the change
oh no
i think i might let uber pick what idea i'm going to go with
i now have a list
Humm I can't get it to apply a modified hardcoded buff, I don't think
The trigger action?
[Unrelated] I swear I had a file in the past that had a complete list of movies for my NPC's reactions and whatnot. I can't find that file anymore and I can't find a comprehensive list online either (Google is the absolute worst). Can anyone help me with tracking down the whole list for Content Patcher purposes?
I am making copies of all the vanilla buffs with edited durations to use with the trigger action, because I can't use the trigger action itself to adjust the duration.
But I have to give them new IDs for that, which will stop mine from being able to apply the effects of the hardcoded buffs.
Data/Movies?
I want unique responses to each movie, and some of the responses are very generic (using tags for genres)
Sometimes the translated text strings have the actual english name of the thing they're for, I miss that when I come across ones that don't (like for buffs)
WAIT I actually was able to find the full list in the Ridgeside Village mod files
Some of the buffs do - if you mean like "DisplayName": "[LocalizedText Strings\\StringsFromCSFiles:Nauseous_BuffName]",
Ah yeah, that's what I mean, I guess that's good lmao
Why not just look in Data/Movies though?
I wonder if they're from 1.6?
I think nauseous has been in the game for a while
Weird that it's inconsistent then
It's probably best for me to check in data/movies since it's the most reliable for being up to date
Well, unfortunate, but not that weird actually lmao
Like frozen is "DisplayName": "[LocalizedText Strings\\StringsFromCSFiles:Buff.cs.466]",
Maybe he's like me and changes process halfway through things
How are you applying the trigger action?
I was able to give myself naeusous for 1000 milliseconds with debug action which just runs a trigger action as far as I'm aware
Oh, I would guess it's probably an issue with the SpaceCore action in that case lol
I forgot that AddBuff was a vanilla trigger action
I wonder why Casey made ApplyBuff
Maybe to allow for the source message
Maybe it was from before trigger actions and then was updated just for compat
Maybe. Well, that simplifies things a lot if I don't have to add any new buffs.
Just think how clunky this mod would be if I wasn't basically live-blogging it in here 😂
Design by community
Yeah I feel like I will need to submit this as a collaborative mod
i don't think it'd count tbh, i consider collab as like, one person doing code/the other doing art or something
I think there's a definite difference between getting help for something and having people actually work on a project with you
I was kidding....mostly...
I do feel like if everyone else is thinking for me then does my part even count haha
you thought of it to then ask where to go 
We're still not writing the actual code :P
hmm, if i make the farmhouse image...bigger via spacecore it won't get the collision huh
i'm not really interested in making a farmhouse + farm for this idea 
Hmm I was going to suggest adding buildings layer tiles to the farm with CP but that would rely on knowing what map the farmhouse was on.
i could combine two ideas but ........i'm uninterested in making the farm cave
Can't it just be a normal farm cave?
will my perfectionism allow that though 
If your perfectionism is going to stop you from even starting something you would otherwise enjoy, I kick it
y'know, on second thought i might not make a building, i have realized it is one of my weakest points 
Can someone explain what "reaction_<number>" actually does in MoviesReactions?
It doesn't function like emotes
kinda like sprite index but it's just for indexing the movie number iirc
an npc's 'numerical id' of their reactions, i guess?
That's strange
When looking at the unpacked file, the numbers seem arbitrary
reaction_0 has the most uses and goes as high as reaction_11
yeah basically every npc has a numbered list for their reactions, some don't react to all movies, kind of like their portraits i guess is the better way to describe it
some npcs have $0, $1, $2 etc, while some only have $0
Does it impact their dialogue in some way?
those are just the IDs of those list entries in their list of reactions
they dont mean anything they just uniquely identify that reaction entry
Oh that makes more sense now 😂
same way the id on a shop entry just uniquely identifies that for sale listing
@rancid musk just wanted to say thank you for making it pretty darn simple to make the ingame HUD fit in with the rest of my ui shenanigans <3
(also, maybe trying to read documentation at 4am in the morning might not be the smartest idea ...... after sleep this was way simpler
)
does anyone have an idea how to do this in pure CP (specifically continuing/ending/changing an event during playerControl when action/touchaction seem to be disabled)? or am i going to need a c# component for this silly modding contest entry
alright yall... time to make another interface mod for the event 
shoutout to the most bizarre pattern i've seen in the decompiled game code at Event.setUpPlayerControlSequence():
switch (id.Length)
case 10:
switch (id[0])
case 'h':
if (id == "haleyBeach")
...
break;
case 11:
switch (id[0])
case 'e':
if (id == "eggFestival")
...
break;
...
i can't even begin to imagine why
bizzarre sounds about right .... i get what it does. but why? o.o
could maaaaaaybe be optimisation stuff? so you dont have to switch over all ids at once? dont remember how expensive switch was
but then why wouldnt you also switch in the innermost part?
atra had linked me something about this before
maybe, playerControl <id> and then... a break? like (break) in the event commands?
That's a perfect case of optimisation vs readability
Although I'm not sure it is truly more efficient, sometime it's better to not be fully optimised if it means it's more easy to maintain
does it run like a quickquestion? that's wild
Which decompile version is that? It looks completely different in mine...
i have this:
{
case 10:
switch (id[0])
{
case 'h':
if (id == "haleyBeach")
{
Vector2 tile = new Vector2(53f, 8f);
Object item = ItemRegistry.Create<Object>("(O)742");
item.TileLocation = tile;
item.Flipped = false;
this.props.Add(item);
this.playerControlTargetTile = new Point(53, 8);
Game1.player.canOnlyWalk = false;
}
break;
case 'p':
if (id == "parrotRide")
{
Game1.player.canOnlyWalk = false;
this.currentCommand++;
}```
<#making-mods-general message>
Found it
i trimmed it down a little to avoid filling chat. you can see its natural beauty in the method yourself
I have:
public void setUpPlayerControlSequence(string id)
{
this.playerControlSequenceID = id;
this.playerControlSequence = true;
Game1.player.CanMove = true;
Game1.viewportFreeze = false;
Game1.forceSnapOnNextViewportUpdate = true;
Game1.globalFade = false;
this.doingSecretSanta = false;
switch (id)
{
case "haleyBeach":
{
Vector2 tile = new Vector2(53f, 8f);
Object item = ItemRegistry.Create<Object>("(O)742");
item.TileLocation = tile;
item.Flipped = false;
this.props.Add(item);
this.playerControlTargetTile = new Point(53, 8);
Game1.player.canOnlyWalk = false;
break;
}
case "eggFestival":
this.festivalHost = this.getActorByName("Lewis");
this.hostMessageKey = "Strings\\StringsFromCSFiles:Event.cs.1521";
break;
i needn't have bothered cutting it down since now there's 3 in chat of different sizes lol
We made it worse, yes.
i didn't think this method could get much worse 
DH's one is the same as i have and mine is 1.6.8
mine is from build 24290 of the beta
But yeah, I don't even have an id.Length anywhere in it... and this is just from the latest 1.6.8 decompile repo.
ilspy on tonight's 1.6.9 update gives switch -> case -> switch -> case -> if
so you're telling me it got worse in 1.6.9
who's responsible for this
who did this
or this is optimisation 😉
this method is called once per festival 
I am pretty sure it's just decompiler weirdness
wouldnt be surprised if that is some compiler optimisation over long switch stuff
tbf i haven't installed a new ilspy since i first started modding, and that was back in june
Or compiler weirdness I guess
oh my god events even have a doAction x y command i could use. if only i could
this playercontrol @*!#( has wasted so many hours of my time lol
i wonder if i can make a quickrepro for what you're asking for, because i have seen it done
you can try if you like, but i'd be worried you spend time making a repro for something slightly different to what i'm after
yessss temporarymap optional if need be
i put a moment into making an npc that'd wait at the touchaction i wanted and with a dialogue containing an event-change command.. then realised npcs don't appear in events
if you summon them at the start they should always be there
with dialogue?
like festival dialogue? probably not unless you called it with the localized string
actually what does the doAction say an npc will say 
If you use it on an NPC you will talk to them, and if the player is holding an item they will give that item as a gift.
so, force an addconversationtopic, have that conversation topic in the NPC's data
and maybe they'll hopefully say it?
jfc
i will add that into the list and check- LMFAO
i thought this would be simple
noh
true
noh it is not
maybe loadActors in the event script will let me bake an npc in. and somehow let me get the dialogue right
schedule the event and dialogue to have the same condition
The more I see people talk about event creation, the more I think it might be less effort to just make a completely custom event system than make a few events...
is casey still doing that yarn implementation
oh nice loadactors uses pictures of vanilla npcs as tiles instead of listing npc ids
very cool
every time i've needed to make an event for a mod i've just subclassed iminigame instead. i hat e this stupid stusytem
honestly if you're used to that you might have an easier time, but i continue this Hell ™️
oh my god..... bald gus..
loadActors works, but krobus isn't interactible still, so no dialogue tricks
not sure why festivals have a free pass for you to talk and warp and stuff but sure can't do it here
i don't think i can do the playercontrol from a temporary map
lemme see if i can just make it all in the farm
sadly i cannot talk to him 
"Action": "EditData",
"Target": "Data/Events/Farm",
"Entries": {
"{{ModId}}_playerControlrepro/": "continue/0 0/farmer 0 0 0 Marlon 0 0 0/addconversationtopic {{ModId}}_ControlRepro 1/speak Marlon \"Well g'day.\"/skippable/switchEvent {{ModId}}_playerControl1",
"{{ModId}}_playerControl1": "pause 300/speak Marlon \"Avi is too lazy to do i18n strings.\"/pause 300/addmailreceived {{Modid}}_playercontrolexplored/playerControl jellies",
//continues to this event once playercontrol is skipped?
"{{ModId}}_playerControl2/e {{ModId}}_playerControlrepro/n {{ModId}}_playercontrolexplored": "continue/0 0/farmer 0 0 0 Marlon 0 0 0/skippable/pause 300/speak Marlon \"This is the third dialogue box.\"/pause 300/end"
}
},```
yep i tried too
"communityCenter/-2000 -2000/farmer 1 2 1/pause 500/spriteText 4 \"test\"/pause 500/changeToTemporaryMap Custom_bbhm_1/loadActors Set-Up/playerControl Custom_bbhm_1/viewport player clamp true unfreeze/globalFadeToClear"
could you somehow finagle a TileData dialogue?
i know those actually worked but that'll unfortunately just be a "message" box, not a portrait box
action and touchaction don't work 😌 npcs were the last ditch effort
wait
So many buffs!
you did the whole strings/stringsfrommaps?
well i didn't give him any dialogue, but he'd have his own already on the stack surely
or do i try that now lol
the strings/stringsfrommaps will let you interact during playercontrol but it will be a portraitless box
i don't... know how to make it force a portrait one
as long as i can use $v <event id> from it it's fine
i don't remember if actions are fixed for TileData dialogue
i know that my i18n key just shows the command
fuck it, c#
@brave fable all of this is a compiler optimization
Search "dotnet switch on string trie"
There's no way it would have ever been hand-written that way, yeah... but that's good to know!
Event.checkAction() {
if (!isFestival)
return false;
...
}```

stupid game
that really is a very silly optimisation
still, that really is a very impressive prformance boost lol
it makes sense when you think about it, but at first glance? very perplexing ^^
Memo to self: actually just unroll a switch manually and hide it in my repo somewhere
are synced_random keys anything? like i just basically have to put a uniqueid like cp's random pinned key?
Yup
Why is that weird?
i got a bugreport about BETAS
and the entry key shouldn't give a damn about me putting a period in it 
Depends on how it's being used
{{ModId}}_RightInTheKisser2.5
for triggeraction
sorry, orange son is now in front of my monitor
It's possible that whatever is consuming it is treating periods as delimiters

i can't tell exactly because i have no idea why it's giving a quest error out of BETAS
"Id": "{{ModId}}_RightInTheKisser2.5",
"Trigger": "Spiderbuttons.BETAS_NpcKissed",
"Condition": "ITEM_ID Target Lance, PLAYER_HAS_MAIL Current {{ModId}}_SPICY12, SYNCED_RANDOM day cart_rare_seed .5 @addDailyLuck, PLAYER_HAS_SEEN_EVENT Current 6951319",
"Actions": [
"Spiderbuttons.BETAS_SetNewDialogue \"Lance\" \"{{i18n:Lance.MODERATE_{{Random:{{Range: 0, 5}}}}}}\" false",
"MarkActionApplied Current {{ModId}}_RightInTheKisser2.5 false"
]
},```
err mesg: `[Button's Extra Trigger Action Stuff] Could not get raw quest type from quest id : argument list is null`
ig i can just throw these trigger actions and just change out the npcname to see if i can repro
well that was terrifying
oh i'm dumb i didn't set up the stupid spouse room
yeah i have... absolutely no idea how this person got that error
Anyone knows how and when game uses Game1.NewDay as a boolean mark?
I really don't want to look at the decompiled game, but if I have to...
I found it. It doesn't work to me...

hi i noticed there are no sandbox commands as its developers console only, is there a mod that lets me play the game in sandbox? like commands for money etc
bonk
but yeah use cjb cheats and cjb item spawner and honestly that's probably all you need
and noclip mode
so, i have a quick question to those, who are more in this stardew valley modding thing
i started playing modded stv with expanded, and ridgeside, and i found out, that, there is this "east scarp" expansion, that i wanna add as well, if its possible, im in the first year, end of spring, is it still possible to add it, or will i just corrupt my current world?
if possible, i dont wanna start a new character
Im making a question fork for an event that changes the event depending of the answer. How does exactly work? I looked at the wiki and SebastianRoom event. I know how to make the question fork, but I dont understand how it picks A or B for the answer
You will probably be alright, map mods should only give issues if they change the same vanilla map
@brisk kraken You leveled up to Cowpoke. You can now speak in our voice channels and share images in all channels!
Good morning~ new modder here. I am trying to make a content patcher mod that re-colors the dirt in Stardew. I have been following the steps on the Stardew wiki page but have hit a snag. 1. I still don't where I should get the coordinates for the sprite from (which I think is what the issue is) 2. The mod is installed correctly according to SMAPI but I see no change once I go in game. Other than the coordinates probably not being right am I missing anything else? See the content.json file below and let me know if you need anything else. Thanks a bunch 
{
"Format": "2.3.0",
"Changes": [
{
“Action”: “EditImage”,
“Target”: “TerrainFeatures/hoeDirtDark”,
“FromFile”: “assets/hoeDirtDarker.png”,
“FromArea”: { “X”: 300, “Y”: 312, “Width”: 192, “Height”: 64 },
“ToArea”: { “X”: 300, “Y”: 312, “Width”: 192, “Height”: 64 }
},
]
}
the hoedirtdark is only used in mountain and mines/volcano
this is the channel for making mods (getting help with technical problems, talking shop, etc.).
you want #modded-stardew for this sort of question about using mods as a player.
that said, it is safe to add East Scarp to an existing save
So I edited the wrong thing hmm, thx I'll poke around some more.
Thank you I'll post it 👍
TerrainFeatures/hoeDirt is the general one
"East Scarp"...?
TerrainFeatures/hoeDirtSnow for winter
hi gamingkitty, i was replying to a different user
When you find the correct thing to edit, your X and Y coordinate for the FromArea will usually need to be 0 for both of them and your X and Y for your ToArea needs to be the upper left corner of the spot on the tilesheet you want to target. Right now, with hoeDirtDark, you're telling Content Patcher to start from a point that doesn't even exist on either tilesheet.
Thanks you. For the "ToArea" is it because the image usually contains more than one part that can be edited? Like for example I only edited the middle, would my coordinates fall where the darker brown starts? Thanks for all the help!
nah these 3 sets of tiles are dry, wet, paddy
the dry dirt always shows, and the wet & paddy tiles are overlay that apply when you meet conditions
Yes, that's right. For the ToArea in your case, you would set the X and Y to be the top left of the middle sets of dirt (once you confirmed they definitely were what you wanted to edit).
(Chu I am just advising them on how FromArea works - I have no input on whether it's the actual tiles they are intending to make darker lol)
Thanks for everything! I will see if I can locate the correct file and give this ago again!
The fork command itself ends the current event and takes you to the separate event if that option is selected. If the forked option is not selected, the current event proceeds with the second option i.e. the rest of the current event.
Hmm so you need to make a separate event for that option? Like
Event A:
Answer 1-->Proceed Event A
Answer 2-->Start event B
works like this?
Okay, thanks a lot, and sorry as well
Yep (though A and B might be switched. It's been a while since I've made one)
no worries!
there are a lot of channels in here. it's easy to make mistakes when you're new
trunicated for clarity
/quickquestion {{i18n:Lance.11Heart.25}}(break)speak Lance \"{{i18n:Lance.11Heart.25.1}}\"(break)speak Lance \"{{i18n:Lance.11Heart.25.2}}\"/pause 900/emote farmer 40/emote Lance 8/quickquestion {{i18n:Lance.11Heart.26}}(break)switchEvent LEBattlegroundSTOP(break)switchEvent LEBattlegroundSWITCH
"Lance.11Heart.26": "...#'Is it alright if I rest for awhile?'#'Can you... keep me close?'",
"LEBattlegroundSWITCH": "pause 200/quickquestion {{i18n:Lance.11Heart.26.2.1}}(break)switchEvent LEBattlegroundFIRST(break)switchEvent LEBattlegroundSECOND(break)switchEvent LEBattlegroundSTOP",
"LEBattlegroundFIRST": "pause 200/quickquestion {{i18n:Lance.11Heart.28}}(break)switchEvent LEBattlegroundSECOND(break)switchEvent LEBattlegroundSPICE(break)switchEvent LEBattlegroundSTOP",
"LEBattlegroundSECOND": "pause 200/quickquestion {{i18n:Lance.11Heart.29}}(break)switchEvent LEBattlegroundFIRST(break)switchEvent LEBattlegroundSPICE(break)switchEvent LEBattlegroundSTOP"
}```
the quickquestion can be shoved into a singular i18n key separated by hashes to indicate a 'separate answer'
and this is my crazy looping quickquestion that'll keep on looping until the player says 'i've had enough' in a quickquestion
nonlooping:
```"LEHighlandsPredicament/e 65360188/f Lance 750/": "continue/-1000 -1000/farmer -100 -100 2 Lance 129 113 0/skippable/quickQuestion {{i18n:Lance.3Heart.03.q}}(break)switchEvent LEHighlandsPredicament_handle(break)switchEvent LEHighlandsPredicament_offer(break)switchEvent LEHighlandsPredicament_together",
"LEHighlandsPredicament_handle": "pause 200/end",
"LEHighlandsPredicament_offer": "pause 200/end",
"LEHighlandsPredicament_together": "pause 200/end```
but every (break) indicates, "hey, the player picked option 2, not option 1! use that one instead"
Thanks, now I can at least use something as a guide! ^^
lemme see if i have a uh... less chaotic one
YARN IS HERE
I still haven't released it 😛
Still need to make it where you can use your own mod's tokens
you can also go the chaotic route and not have switchEvents, you can continue each (break) with their own commands, you just instead have to separate commands with \\ instead of / but as you can see, i like to break them up for clarity and my own sanity
Ohh I like the chaotic mode!
i might have an example of that one sec
If the logo isn't a cat playing with a ball of yarn, I will riot.
"LEFeelingsYes": "pause 500/quickQuestion {{i18n:Lance.10Heart.pt2.21}}(break)setEngaged Lance false 1\\addmailreceived {{ModId}}_1DayEngage(break)setEngaged Lance false 2\\addmailreceived {{ModId}}_2DayEngage(break)setEngaged Lance false 3\\addmailreceived {{ModId}}_3DayEngage(break)setEngaged Lance false 4\\addmailreceived {{ModId}}_4DayEngage(break)setEngaged Lance false 5\\addmailreceived {{ModId}}_5DayEngage/pause 600/end" with the chaotic route, note that THE VERY LAST COMMAND continues the original event script
as soon as you use a / for the last command, it continues
That would require me art-ing
Which I'm not skilled enough for yet
i mean i could help you arrange a cat playing with a ball of yarn icon 
What about a hamster
Ok, I really need help now...
I have this event that triggers a new day if the clock hits 600 again:
private void GameLoop_TimeChanged(object? sender, TimeChangedEventArgs e)
{
if (!TCtriggered)
{
this.Monitor.Log($"TimeChanged Triggers", LogLevel.Debug);
TCtriggered = true;
}
if (e.NewTime == 2200)
Game1.player.doEmote(24);
if (e.NewTime == 2550)
Game1.timeOfDay = 150;
if (e.NewTime == 600)
if (!isNewDay)
{
this.Monitor.Log($"NewDay Triggers", LogLevel.Debug);
isNewDay = true;
NewDay();
}
else
isNewDay = false;
}
Or would it, because it triggers twice every morning, skipping one day
what am I doing wrong?
ok, forget it. I think I found. I just needed to see it in another context...
if farmer goes to bed before it triggers on the day, and the flag is false, it will hit 600 with the flag false next morning, and triggers it
I thought I could do with with only one flag, but seems not possible...
RubberDuck indeed lol
i mean I'm up for a hamster too, but considering Casey's "They just don't bring me joy like cats do" attitude that would be a no, but maybe I should make my own yarn adjacent mod for a hamster yarn icon instead
Hear me out: What about a hamster sitting on a cat's head?
just make one of those collages where it's all smaller images that make up a bigger image, the smaller images are all hamsters that make up a cat + yarn
"why is the icon so large"
"don't look too much into it"
a hamster in a halloween costume of a cat, playing with a normal sized ball of yarn and it's looking at it like
I have a mental image of a cat playing with a ball of yarn while a hamster is hanging onto a loose string for dear life.
Thank you, I needed that laugh. xD
I wish we could hide broken translations on our mod pages or something...
I've already gotten like 50 comments/bug reports with the same exact problem because of that 
my Night Owl Plus is almost done
i have outdated translations, but also no one has complained because my mod isn't that level of popular
My reports are caused by me switching to i18n way later than I should've 😅
ah, a shot into the foot 
was i18n not a thing when you started the mod
I mean... the mod is 3 years old, but it probably was a thing, just less used iirc. But it took me a while, cause I was always modding other mods, so if said mod wasn't in i18n format I never took the initiative to covert it myself (until I made the converter specifically for that hah)
I fully converted it a little over a year ago, but people still like to choose the first translation from the list instead of the most recently updated one...
Maybe worth petitioning Nexus over?
I did post a suggestion (didn't even know Nexus had a feedback section...)
now it's my turn to suffer sprites in detail debugging
Time to see how Button's CMCT works in action
having a ModEnabled on GMCM menu, which is the better way to disable the mod midgame?
I thought about make a secondary bool flag and take the events out on UpdateTicking event
private void OnUpdateTicking(object? sender, UpdateTickingEventArgs e)
{
if (!Config.ModEnabled && ModRunning)
{
helper.Events.GameLoop.SaveLoaded -= this.OnSaveLoaded;
helper.Events.GameLoop.DayStarted -= this.OnDayStarted;
helper.Events.GameLoop.TimeChanged -= this.OnTimeChanged;
helper.Events.GameLoop.DayEnding -= this.OnDayEnding;
helper.Events.GameLoop.Saving -= this.OnSaving;
ModRunning = false;
}
if (Config.ModEnabled && !ModRunning)
{
helper.Events.GameLoop.SaveLoaded += this.OnSaveLoaded;
helper.Events.GameLoop.DayStarted += this.OnDayStarted;
helper.Events.GameLoop.TimeChanged += this.OnTimeChanged;
helper.Events.GameLoop.DayEnding += this.OnDayEnding;
helper.Events.GameLoop.Saving += this.OnSaving;
ModRunning = true;
}
but not sure if there is a less clutersome way to do it or if it works mid game
another way is to put a big IF on every custom event, but I hate this option
just want to know what is the common community practice
i have had better luck making event handlers/harmony patches always on and doing early returns out of them if they're disabled, rather than adding/removing and patching/unpatching on demand. handlers are not idempotent so you have to be very careful not to re-add them (you will get multiple instances)
then again, i also probably wouldn't have a config option for "mod enabled"/"mod disabled". if the user wants to disable the mod, they can uninstall it
yep, thought about this possibility (after almost doing it anyway
)
anyway, gotta go
I thought about the enable possibility in case they (and me) want to test how things are going mid game
thanks!
now I want to test what happens if I make an OnDayStarted event that self add them on the handler over and over again
ppl who have desire for activate/deactivate mod tend to use stardrop which provides the feature
!stardrop
Stardrop is a mod manager written specifically for Stardew Valley. See the Stardrop wiki for installation and usage.
See this tutorial for connecting Stardrop to Nexus or updating mods in Stardrop.
If you have issues with Stardrop, see the issue report guide.
its a mod manager
(also wanna throw my hat into the "love the new nickname" ring)
if anything seems like its broken or not working as you'd expect pls feel free to ping me to ask 
I confused stardrop with starcore
I can finally yeet like 10 configs that were just there to match thanks to you 
Those queries get... interesting 
"Query: ('{{Spiderbuttons.CMCT/Config: Jellonip.RRRR, Hidden Love Interest Mode}}' = 'true' AND '{{Spiderbuttons.CMCT/Dynamic: Jellonip.RRRR, WizardDating}}' = 'true') OR ('{{Relationship:Wizard}}' IN ('Dating', 'Engaged'))": true
So, I'm working on Portraits for a mod. I'm going to have 2 resolutions for people to use. When uploading, should I just do the low res(so you don't need the HD mod) and have the HD file as an optional, or should they be their own mods?
i would make low res base and the hd one a separate file because once you go portraiture You Cannot Go Back ™️
okay lol. I can see why. so much deatil gets lost when shrinking the images
the portraiture mod requires a different setup that isnt content patcher or content pack
so yes just have 2 main files, or even 2 mod pages
Gus's shirt goes from oh cute! slimes! to hm, blue blobs.
whatever feels easiest to manage for you 
portratiure is the one to use for sure though for HD ones?
atm it's the only one that works for 1.6
good to know
hd portrait update eventually™️
Okay, yeah, nah... I think I'm gonna go with just an i18n replacer and a few necessary edits in a small Content Pack 😅
Easier for me and better for performance I guess, hopefully RRRR won't get too many updates in the future 
ig the item query must have overlaps then
Its using SPU
Thinking about improvements to my bathroom renovation mod, how does this sound for a letter from Robin? You'd get it after upgrading your house for the 2nd time.
Come on by and place your order when you're ready for me to start your renovation!
- Robin```
The thought is that the tiny bathroom renovation is free but you have to pay to expand it to a bigger bathroom, after Robin hooks you with the free renovation.
I'm struggling with the wording a bit
my brain can only think of the way pierre/morris would write it
which is like, "With an addition of a kitchen, a farm outhouse doesn't sound quite pleasant, does it? I now offer renovations and I'll even throw in a bathroom renovation for free since you're a repeat customer."
Yeah, I'm trying not to sound super like Pierre's adverts, which is my struggle. Robin's definitely the type to needle you into an upgrade, (given her 'rustic' comment at the start), but more passively.
"Still enjoying that rustic living? Home renovations have been a hit lately and you can test out a brand new bathroom for free if you're interested."
Also seems weird for Robin to necessarily mention outhouses, since, you know, no other house has a bathroom either. xD
true, gotta change that
And since my bathroom has a "Shrine of Illusions" mirror, she's gotta have partnered with the Wizard or something. xD
but I can't even think of how I'd include that tidbit
looking forward to the outhouse building mod \j
I suppose if all else fails, I could use the Pierre-sounding one and add a Post-script that says "Sorry, Pierre saw me writing this note at the Saloon and decided to 'improve' it."
i have had the urge for an outhouse building mod to do a nod to the og harvest moons tbh
robin finds some weird magic looking glass the wizard left in the forest to absorb spiritual energy and turned it into a mirror 
After you get the mod installed, just a random conversation topic pops up from Robin: "How are you enjoying the new bathroom? The mirror just showed up one day while I was designing it. Weird, right?"
i mean technically robin could've gone into the witch swamp after you get the ink and she could just be like "don't tell the wizard but i found some cool stuff for a building idea"
Or "P.S. The Wizard randomly showed up and told me that he wanted to add this mirror to your renovation. Not really sure what that's about, but it seemed harmless enough."
Yes, because in Stardew it takes magic for you to style your hair differently
Yep.
Oh man, is there a conversation topic / way to check if you've used the Shrine of Illusions lately and start one?
Just a random "Huh, are you trying out a new look?" type of deal xD
i don't remember if it's SVE or something that adds an event to the shrine of illusions unless that's base game
The witch randomly cursing your farm gets a whole new layer if you have her stolen goods in your bathroom renovation. xD
Maybe putting it here help again. Now I am having problems with loading my moddata from save.
I am saving and loading with these methods:
private void OnSaving(object? sender, SavingEventArgs e)
{
this.Helper.Data.WriteSaveData($"{this.ModManifest.UniqueID}", Data);
}
private void OnSaveLoaded(object? sender, SaveLoadedEventArgs e)
{
Data = this.Helper.Data.ReadGlobalData<NOPlusData>($"{this.ModManifest.UniqueID}");
}
The data is being written on the save file:
<item><key><string>smapi/mod-data/maxrw.nightowlplus/maxrw.nightowlplus</string></key><value><string>{"RestorePos":true,"Map":"Farm","Tile":{"X":33,"Y":22},"Facing":null,"Health":100,"Stamina":47.0,"IsBathing":false,"IsInSwimSuit":false,"Sittable":null,"Horse":null}</string></value></item>
Why the key is being named with the ModManifest duplicated? like /maxrw.nightowlplus/maxrw.nightowlplus? and it is the reason it is not opening?
I thought I got it from the tutorial
global data is a different thing
ok, I got it mixed
as for the key, it's prefixed with your mod id yes
probably when I was copying-pasteing =.=
so it is the default? I don't need to add it for 'better practice' as is indicated in the tutorial?
interesting...
feeling really dumb, but thanks a lot
Dunno what tutorial you are following, but the smapi data stuff is mod scoped by default
Now I have a better Night Owl mod. Next steps is implementing Atra's fishedit solution and try to solve the night light/tiles thing
Btw could you stop pinging me on reply 
(SPU doesnt create items or add shop entries on its own! so that warning is caused by something else)
I am sorry
Normally I don't mind but there's no need to ping if I'm still in the chat
the bottom session of the guide may just apply to storing custom data for individual game entities. there is the manifest indication as key id
it is the same link that you sent
maybe I just got confused side reading that, as well copying the wrong read method...
to learn to mod a game, although less work, takes a lot of understanding of others logic and practices than learning a coding language from start
less work than building an entire project from scratch I meant
now I need to dwell in DynamicNightTime to really understand how it treats night. but for now, I am satisfied
can i use the random token on the i18n thing? i wanna use it but 99% of my dialogues have random stuff
how does one stop the furniture being added to the furniture catalogue by default?
It's one of the boolean fields
furniture doesn't have boolean fields
per shops.json -> Furniture Catalogue -> items:
"ItemId": "ALL_ITEMS (F) @isRandomSale"
(I don't think)
the 10th field in furniture data seems to be the boolean one you want
after the texture name and before the context tags
is that the "true"?
Field 10, yeah
i dont see another boolean one so yeah probably the true
which, true is what you want to make it not in the catalogue
ah rightio can fix that
@next plaza: begin the m o d (21h ago)
Is there a way to utilize the farmer's sprite in events? I want to use the shocked jumping one that happens when the farmer does something in the abandoned community center and the junimos pop up. I looked up some of the known ones online and looked through game files, but can't find that one. This is my first mod i'd be posting ^.^ fun prompt, wanted to give it a go!
Yes! Thank you!
you'd have to do some trickery, if you can remember where you've seen that animation not the community center one that'd be a good place to look
something liek frame id 94 would work, i'll explore that spreadsheet more, thanks
yeah my memory isn't great 😅 couldn't think of anything else but maybe it'll come to me
where in the content folder do i find the professions to be able to reference them
isn't that the same jump as in the intro?
do you mean the profession texts? it's in Strings/UI
that one?
how do i explain it
uhh
"PLAYER_HAS_PROFESSION Target 19"
these
no idea which one that is
copy pasted from lumisteria nodes+clumps
ah okay
you can find them here: https://stardewvalleywiki.com/Modding:Console_commands#Skills_and_XP
the numeric IDs are hardcoded
19 is Geologist
ah ty
im so lost in the content folder
objects 2 is in tilesheets
wheres objects 1
not sure if there is a objects 1, but springobjects deserves that name
welcome to the hazing of a new modder

w h y
because yes
good point
just like how there's 1 pixel in cursors that's used as what is it, fog?
like it's 1 pixel of the moon or something that's used as fog or something
would not surprise me
i am more surprised that there are tilesheets for each language instead of one base/main and patches but eh
whats this next to amethyst
i think that's just a localization thing
like its clearly amethyst but what is it
a lot of item sprites have those unused shatter sprites
ok then
huh, i thought those might be used to overlay over base stone, interesting
mining nodes have their own sprites
and yes, it is localisation i am just wondering why you'd copy everything instead of patching just the parts that have signs ^^
seems easier to just make a new spritesheet for it
it could have been patching just the parts that have signs internally
(boo squad)
we r looking at the baked outputs
dont think CA really had the concept of patching mind like we do with CP during development
hmmmmmmm fair
also I think patching has performance costs compared to just loading a new spritesheet
disk space is cheap
true true
so like should my nodes go on the same sheet as objects
lumisteria seems to use a different sheet i think?
no
but us only seeing the finished/baked outputs makes sense
just load your own
no i meant on the same sheet as my own objects
like obv crops and objects are separate sheets
then feel free
as long as they're all 16x16
you can do whatever make sense to you for your own sheets
you can do both, the freedom of creating your own stuff
there are big rocks on the springobjects sheet
two steps ahead of me oml

so how do i deal with big rocks
it's probably better for your own sanity to put them in your own sheets
but nothing stopping you from using the same sheets for those as well
but theyre a different size how does that work
if u put the same sized sprites in same sheets there's less maff for counting sprite index
they're 32x32, so four 16x16 squares together
do i just load multiple sprite indices
so item objects index can just ignore them
u can have multiple textures loaded no problem, hence do what make sense to you
for big rocks you usually have a top left coordinates + tile size
im just gonna make a sheet for nodes and a sheet for big things
CA sort of patches things sometimes, like drawing sprites over map tiles, or conditional map patches. never patching his own sheets though
TIL the amethyst node does not share a single colour with the amethyst gem
what's farmerrender then, eh?
never heard of it 
oops forgot to add i18n
went through about 3 iterations of changing the code and wondering why it wasnt working before i realised i hadnt reloaded the patch
[game] Letter 'BonkersTurnip.Test_GiftForAbigail' has unknown crafting recipe '{{ModId}}_PerfectGift' or '{{ModId}} PerfectGift'.
uh oh
not again
Time to check for typos
no typo
but
i think i know the issue
I AM SORRY I TAKE IT BACK PLEASE NO
so i used this
"{{i18n:mail.giftforabigail|modid={{ModId}}"
%item craftingRecipe {{modid}}_PerfectGift %%
^ from the i18n file where mail.giftforabigail is defined
what did i do wrong
who's the guy doing xmlser stuff? Yeah, that's just how the damn attribute works apparently
FREAKING
DOUBLE
DOUBLE
BRACES
I NEEDED
}} }}
my fix was broken
lets try this again
(it was furti)
yeah ok it works i just cant syntax to save my life
Why are you passing your ModID into i18n? I18n is for display text and we don't usually put ModID into display text. Just curious, not judging.
to give the crafting recipe
which is {{ModID}}_PerfectGift
it's recommended you put the instranslatable part outside of i18n
You run the risk of someone translating your ModID and breaking your mod though
(is that a word)
idk the example i looked at put that part in the i18n
but now i think about it
it was probably sve
so how do i do that then do i just need two i18n things
what kind of editor are you using btw? most i know allow for highlighting open/closing brackets and stuff like that to save that kind of headache at least
!editor
!json
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.
yes i do need 2 things ok
vsc
wouldnt help here, as these are just CP tokens so the brackets are all inside strings anyway
ah, fair fair
(vim do highlight matching brackets even in that case though. they don't discriminate)
you're gonna have to do a LOT more than that to convince someone to use vim
(as does notepad ++)
my n++ does not
if i set the language to json in my N++ and something is inside a string, its all the same colour throughout
and add addons
alright im using 2 separate entries in my i18n file now and it seems to work fine
i should note it just took 5 tries to type entries
i still didnt spell it right the first time typing that followup
oh that makes sense it just went 2am im gonna pass out from exhaustion or something
tomorrow im going to try to tackle custom machine input
that should be
fun....
considers being purple
thanks for all the help here. you all are awesome
tempting ghost on the shoulder: Just do it~
specially @lucid iron 
purple is a nice color
hitting the bed early today. good night to all you
I'm sure it's something silly that I am missing, but can anyone figure out why my renovation strings aren't loading? https://smapi.io/json/content-patcher/5cc8d22f9adb45bc9f901f63a52226f2
(Sorry to bone lovers but the stardrop is cooler)
They worked earlier, but now they won't appear and I'm not entirely sure why.
No errors in SMAPI
Hmm what does a patch summary say?
Patch Summary shows that the strings are applied
I'm attempting to make my second renovation an expansion that overwrites the first one, if that matters
So they patch the same area
...
okay, it was absolutely something silly, I think
nope, nevermind, that didn't help at all.
I found that I'd messed up one of my requirement tags, so I fixed that, but it's still not loading it properly
update: i have been doing some reflection crimes and i am making good progress here (thanks focustense!)
reflection crimes 
Okay, I apparently missed TWO requirement tags
Oops.
So, it loads in the menu now, but now the patch is wrong/not overwriting the area for the expansion renovation
and I know the asset name is right
Is there a way to set a renovation to check 2 mail flags instead of one in AdditionalRenovations map property?
Because I feel like this is an ordering problem right now
If I put the expansion reno before the base bathroom reno in the map properties, the inactive state of the expansion shows up instead of the inactive state of the base bathroom reno, even when the base bathroom reno is not purchased yet.
And if I swap the order, the active expansion map never loads, even after the expansion is purchased.
Is it possible to add custom monsters to events as temporary characters? I tried to add a monster with its id but when loading it via event as a temporary actor it shows it as null
it should be possible, data/festivals/fall27 uses addTemporaryActor Wilderness_Golem 16 24 18 59 2 false Monster
just be sure to use underscores instead of spaces
My brain's not working tonight, how do you make a When condition that can check if a flag has a value of 0 or 1?
Trying one last thing as a workaround since the renovation is refusing to cooperate
"HasFlag" isn't working for checking the mail flag that is added as part of the Renovate Actions, so I have to try something else to find the flag value
Im pretty sure wilderness golem is a vanilla monster though, tough
Nature, it should work as long as you've loaded in a monster with that ID beforehand, I think?
"When": {
"Year |contains=1": "false"
}
and
// player has blacksmith OR gemologist
"When": {
"HasProfession |contains=Blacksmith, Gemologist": "true"
}
would mean you use something like:
"When": {
"MyCoolVariable |contains=0, 1": "true"
}
that said there shouldnt be any difference between a mail flag added by a reno vs any other? assuming it is actually a mail flag
It tells me the token can't be found, so something's off.
hasflag wouldnt tell you that if the flag wasnt found, hasflag would just resolve to false in the when condition
that's what it was doing, yes. I need a true not a false.
it shouldn't make a difference so long as you've got a sprite loaded to Characters/Monsters --
// public static void AddTemporaryActor(Event @event, string[] args, EventContext context)
switch (typeOrDisplayName?.ToLower())
{
case "animal":
textureLocation = "Animals\\";
break;
case "monster":
textureLocation = "Characters\\Monsters\\";
break;
case "character":
break;
}
string fullSpriteAssetName = textureLocation + spriteAssetName;
if (!Game1.content.DoesAssetExist<Texture2D>(fullSpriteAssetName))
{
string newSpriteAssetName = spriteAssetName.Replace('_', ' ');
string newFullSpriteAssetName = textureLocation + newSpriteAssetName;
if (newSpriteAssetName != spriteAssetName && Game1.content.DoesAssetExist<Texture2D>(newFullSpriteAssetName))
{
spriteAssetName = newSpriteAssetName;
fullSpriteAssetName = newFullSpriteAssetName;
}
}


