#making-mods-general
1 messages · Page 23 of 1
Oh I'm quite well aware, I'm not exactly scared of that 😛
Harmony, yeah
Well
Let me check something
You could do some trickery with netStamina
Subscribe to it's fieldChangeEvent
Then when something changes, change it again (but make sure you cancel out of your event handler if it's in response to your change)
if you can use event it's usually better
Yeah, I guess you can also patch the Stamina setter
less chance of mystery mod interactions
working on an event right now. I haven't tried advancedMove yet. I'm just working with regular move commands so far. I thought I had the moves learned...
interesting
Move is pretty straightforward. Important thing to remember with either command is that you can only go along the X axis or Y axis in each command, not both.
Mission semi-accomplished. Thanks again to the sprite advisors earlier.
(well, with advancedMove it's that each pair of coordinates has to contain a 0 for one of the axes rather than that you have to do the command itself twice)
moving the character almost feels like a rudder control
hi! quick episode of "Lumi and English" today, is "jerk" a swear, or it is stardew friendly?
That is perfectly PG
mmm jerk chicken i'm hungry again
wonderful, thanks
wonderful too, thanks
Update: monsters do have invincibility frames 
at a glance, anything except the dagger special triggers 450ms of invincibility, give or take the time between update ticks
damn, 450 is longer than i expected
can u just patch isInvincible
...actually, it might always get divided? I misjudged the variable phrasing 
if (triggerMonsterInvincibleTimer) //false when dagger special is what hit them
{
monster.setInvincibleCountdown(450 / (isDagger ? 3 : 2));
}```
I think only parries trigger the full 450
or prefix damage monster for triggerMonsterInvincibleTimer
so a speed 2000 sword would not be effective.
so I guess it's like this
- dagger special: no i-frames
- dagger normal attack: 150ms
- parry: 450ms
- anything else: 225ms
i feel like its odd to be punished for parrying one of their attacks..
i wouldve thought thatd lead to no iframes at all to take advantage of it
I'm pretty sure it keeps the monster from dealing damage too, so that might be why; a lot of fliers interact with it more in particular
parry has a recovery time so you can't really hit it during the invuln period anyway?
unless MP changes that
The game has a parry?????
it's just sword right click
surely itd be better to just change Farmer.CanBeDamaged
Next thing I'll be surprised that the game has horseradish
if you cant hit during the invuln period anyway then it just feels even more odd that it makes the invuln longer
there's horse and there's radish 
it's probably so the monster can't hit you during the 10 years recovery after parrying like Esca mentioned
yeah, though I'm not 100% sure how all of it interacts or if it's necessary 
I was having it trigger with a dagger (though not the special) - had to do some hacks to get my ||dual wielding for S&S|| to work
Ah I just read further
That makes sense
the takeDamage function already checks if you were parrying though
450 is the optional arg default and a const, so I'd guess it's just like that because it started like that & doesn't come up much
Combat overhaul when
Casey had a cool looking system@!!@
I know other folks who wanted to do that too, but I don't envy them 
if only because monster code is all over the place
there were various boss monster mods
Lol
but i feel like stardew's combat mechanics r too shallow for that type of thing atm
I mean I don't envy anyone who wants to do anything with anything rn
I still like the idea of my "persistent monster HP" setting in FTM for a boss you need to wear down over multiple days 
dunno if anyone has touched it, though
Unless it's hibiscus pearl tea
I feel like a lot of the regular monsters have boss monster health values already
(Don't get me wrong, it's a great game.)
i am taking note of this
(what's that? it's tea with kind of boba pearl in it?)
I had a WIP for that at one point
Literally combat overhaul mod if I remember correctly
// Let's write a transpiler without looking at the IL! What could possibly go wrong?
Me right now
i am terrified, and curious i want to see the chaos
It's just redirecting a field call to check something else too
don't need to look at the IL if you only return your instructions and not the whole original
Would be great if we had infixes from new harmony...
That's worse than a prefix return false!
clear the stack? what's that?
what about using IL to write a prefix that returns false?
(I have done that, though.)
(Yeah, it's not that bad once you have practice)
(Yeah....)
Like
At this point I know what Roslyn is gonna do
Which is a little sad tbh
What is the best way to run a method at a specific in game time?
It depends TM
Can you write a transpiler for an enumerator method generated from a Linq query expression without looking at the IL?
I just realized I am an idiot. I read it at first as it checks every 10 minutes rather than being something I could compare to as a set time. The TimeChanged event should work perfectly
That's your weekend homework.
(I started going in the opposite direction, just copying more & more of the IL into my C# comments
)
https://github.com/Esca-MMC/DestroyableBushes/blob/master/DestroyableBushes/Harmony Patches/HarmonyPatch_BushesAreDestroyable.cs#L39-L100
The hard part of that sounds like finding a reference to the method, not the method's contents.
No peeking!
Probably not tbh
Casey, your minimap thing doesn't have an API does it?
Nope, I could add one though
What would you need?
(/me pulls out ILSpy since my initial idea for implementing this wouldn't work)
Well, I've added bubbles for the fish predictions but it'd be interesting to be able to display compass needles on a minimap in case the bubble is far outside the current view.
And in general I got to thinking that it'd be useful to have some sort of POI system. (I was thinking of making the whole minimap but then I remembered you already made one.)
I'm not sure I understand how the compass needle thing would work, but adding new points should be easy to add
The minimap is square, right? So for a map as big as e.g. the forest you can't show everything on the minimap, you have to have arrows at the edge of the minimap.
If it shows the whole location then that's probably enough. Kind of a letterboxing thing, it looks like?
Yeah
just want to say thanks for everyone who helped me work out my house mod, finally got the pack in working order. gonna play with it in game for awhile though before releasing in case more issues pop up
Hypothetically, an API with either a tile or pixel location and a sprite reference (texture + rect) would do it. But you've always got fifty projects going on and I'm not entirely done with my side of this yet anyway, so just speculating at this point.
If it doesn't seem worth your time, no problem, I can add some local markers.
do you have support for the frenzy bubbles?
Frenzies display a slightly different icon, yes.
They'll display the specific fish and with a bit different layering because the pattern used for generic fish looks crummy inside the speech balloon.
Let me see if I can hack out a screenshot, since it's difficult to actually find an RNG-based frenzy in game...
how does it work anyways, ive never seen it frenzy a modded fish
Looks like this.
This part of the mod isn't that complicated, it's just predicting bubble spots and times.
Predicting actual fish and jellies is going to be a whole other story and I've come to the conclusion that to make it playable it'll have to do some RNG-stealing.
between your mod and almanac (and maybe UI Info Suite 2 IIRC) I wonder if we can use a framework to unify RNG stealing
This probably wouldn't work with a framework. By RNG-stealing, I mean transpiling code that uses Game1.random to instead use a pre-sampled random (that derives from global entropy to preserve balance but is replayable).
I just want to put this out there for all you creative folk. Someone should Make Jacob (East Scarp)romanceable....
Does UIInfoSuite do predictions now? I've never noticed those features.
this is kinda what I meant yeah
wait no, I was thinking of just replacing game1.random
Well the thing is that it's global entropy, so you can't unify it in one place - everything that uses Game1.random has to be intercepted to use a different sampler.
there is a in game predictor mod
yeah makes sense, not a very usable idea come to think of it lol
I guess you could replace Game1.random with an interceptable global entropy and provide some API to access it, but I suspect different mods would have different ideas of precisely how they want to manipulate it.
Like, for fishing, I don't want to screw too much with the balance, so it might be something that changes every 10 ingame minutes + is frozen upon casting + forces a change after every cast.
I've seen that and have my own set of predictions I prefer to use... never released them because some of it depends on the Data Layers PR I'm waiting on.
The fishing one is kind of different, though. If it were just the bubbles, it would fit within some generic predictor-framework thingy, but if we're talking about RNG-stealing and subtly manipulating catches, it starts to be scope-creepy for that kind of mod. So I'm going to keep the prediction tools and fish mod separate.
focustense i want to use your StardewUI, do i have to do anything for license?
i have it as a submodule
I don't think so. Did I forget to include the MIT license on the repo?
No, it's there. You're good.
(I do have some fixes going in shortly for some of the more esoteric layout scenarios I discovered today, but highly unlikely they'll affect you)
i am also wait for the data layers pr b4 i can merge the config thing i wanted 
You did a custom data layer too? Or are we talking about different PRs?
i wanted to configure order of data layers when using forward/back keys
there is some overlap bc u are adding your custom layers to config menu too
Right, that. I'm sure Pathos will have a fun time figuring out how to map that requirement onto late-registered, mod-added layers.
Although I guess if it's just a field attached to the config, wouldn't change much.
Well, in my case I kinda have to wait, can't release a mod requiring an API that doesn't officially exist.
I think the existing Predictor mod is probably more than good enough for the majority of players, I just wanted something a little different for my own.
for the ui thing, if i want a scrollable list (kinda like QListWidget) i would use view + grid?
If it's an entire menu, I'd recommend ScrollableFrameView. Scrolling is squirrely in Stardew from a UI design point of view, not just implementation, so the idea of a "scrollable X" inside some larger UI kind of doesn't exist, it's always a top-level scroll.
(SDUI can scroll anything, anywhere, but you'd have to figure out the actual visual design)
Anyway, everything is a View, but scrolling is implemented using ScrollableContainer and Scrollbar. And the ScrollableFrameView is a handy convenience I added the other day for pulling them all together in a single widget.
See here: https://github.com/focustense/StardewPenPals/blob/master/PenPals/UI/GiftMailView.cs
The inner UI is a Grid, but the ScrollableFrameView is doing all the scrolling work.
If you want a List, rather than a grid, use Lane.
Definitely ask about stuff. This isn't a mod that's been field-tested over thousands of users; documentation and examples are mostly nonexistent except for what I've personally used in my projects.
speaking of your UI thing, would it be easy to use it to make a collapsable list?
I am 95% sure it'll work for almost any UI you guys want to do, but it might not be immediately obvious if you're not the framework author, ha
like if i wanted to make something reminiscent of a file tree where you can expand or collapse the folders in the tree to see whats in them
Hmm, possibly. Depends on the exact spec.
The most obvious way I can think of to do a collapsible list would be a FitContent layout where you simply swap out the actual Content. You can change the entire inner view whenever you want.
do you want something like QTreeWidget button?
If it's a common scenario, could make it into some kind of widget.
(I don't do Qt either, but I can sort of infer by the names what they're intended for)
yeah, thats what i want
qt is one of the things i actually enjoy at work 
would e.g. parent_3 be a FitContent box with an empty Content thing inside of it then that i populate/unpopulate when i click on the parent FitContent?
Oh really, you wanted a tree? I thought you wanted something more like an Expander: https://www.jqwidgets.com/jquery-widgets-demo/demos/jqxexpander/index.htm
Well, either would work really
But yes, you can indeed do it that way. Set the Content to a view with the inner content for expanded, set it to a simple Label or literally null when collapsed.
The tree is more accurate to what I want though but I could get by with expanders and just offsetting the left side a lil b it
doesnt need to be technically accurate, just visually 
Well, atm the library is "primitives", but I'm amenable to collecting more "widgets" over time if they're common and useful.
if you could just let me directly use CSS inside a frame thatd be great thank you
I think it is not difficult to build an Expander; somewhat more difficult but still possible to build a Tree.
StardewUI.WebEngine
i assume when i fill in the Content that itll correctly push the stuff below it downwards to make room?
lol, if I knew how to transpile CSS rules into view logic, I would totally do it.
(psst QSS)
As long as the layout allows it, yes. If you have a bunch of stuff inside a Lane, and one element resizes, then everything else gets pushed down/right.
i cant imagine how you would do this in sdv though 
If you put it inside a Panel (fixed child layout) then they wouldn't move.
sounds like a Lane of FitContents is what i need then
(fwiw, I was planning on creating an actual markup language for this if people started using it. But it would be a waste of time if no one uses it.)
i'm late here, but definitely play around with ambientLight. you may be able to do what you want, but i think it's not quite as simple as that, since Lacey has an event with a sunset effect which is done with gradual changes to ambientLight. it works normally if you start the event in the afternoon like it expects, but it doesn't work correctly if you debug ebi it at nighttime
Is DoFunction for tools always the left click? What do I do if I'm invoking it but don't have xy and power inputs?
man i wanted to use InteractMethod but it is unfortunately not a list 
(also a bit more tangential to mod making, but if i wanted to move all my existing mods and their repos into one mono repo on github like all the cool kids... is that something thats easy to do? ive never done anything more than very basic git stuff 🤷♀️)
why's what not a list?
machineData.InteractMethod
I know, what's not a list?
or did you want multiple functions to be called when interacting with it?
so i am try to make a menu for turning machine rules on and off in game
(re: Button/monorepo) I'm not a big fan of that style personally, but I don't think it's all that hard. If you want to preserve history: https://github.com/newren/git-filter-repo
initially i figured i'd just set that with my delegate
however i need to do this on every machine, and if any mod happened to use it for functional things it'd be conflict
so yes back to the ol buttons changed check
Ah yeah, that kind of use case is definitely not meant for interact method
i stan separate repos, but also i'm not cool, so there's that
I don't recall it being hard tbh
I like monorepos, and also I'm cool 
usually i dont prefer mono repos either but i keep gettin lil mini mod ideas that i wanna tinker with and i dont feel like having a bunch of super small half-baked repos on my github
Yeah, I wish GitHub let us categorize or organize our repos somehow.
i think the only benefit of mono repo is that when i want to make some rando 1 off mod for ppl here i can just do it
i know it doesnt really matter to have them there, but i dont like em
oh u can make a organization if you want
tho it sounds bit silly to have a organization consisting of just you 
GitHub "organizations" sound a bit corporatey to me, though I've never tried them...
I just meant like "repo folders"
Give me a way to group my repos without having to make a single monorepo
Me myself and I can be an disorganization, you know
then u can put all ur mods as submodules just like boost https://github.com/boostorg/boost
Past me and future me keep fighting
yeah if i could just separate all my stardew stuff into one list thatd be great and id do that instead
it'll be great and definitely not a pein trust :)
Clearly just make a github for your mods
github redux
Not even knit?
Anyway, feel free to ping me about any other UI stuff. While of course it won't scale to dozens of users, at this point if there's anything you can't figure out, I can probably whip up a quick proof of concept showing how it could be done (either that or confirm that it can't be).
(Sorry, that comment came a little late to be in its proper context)
hm what were we supposed to use instead of grabtile i forget
tile?
A big pile o' hacks:
private static SObject? GetObjectAtCursor(out Point tile)
{
// ICursorPosition.GrabTile is unreliable with gamepad controls. Instead recreate game logic.
var cursorTile = Game1.currentCursorTile;
tile = Utility.tileWithinRadiusOfPlayer((int)cursorTile.X, (int)cursorTile.Y, 1, Game1.player)
? cursorTile.ToPoint()
: Game1.player.GetGrabTile().ToPoint();
return Game1.currentLocation?.getObjectAtTile(tile.X, tile.Y);
}
what if i just use gettoollocation
Looks like that uses the last click location. If that's what you want...
spacechase still around?
what does these 2 fields in machine item output do
"PreserveType": null,
"PreserveId": null,
Presumably sets the same fields on the output Object, no?
seems not...
PreserveType seems like a placeholder for a more expansive "flavored goods" system. It's not really useful for anything I think
PreserveId allows you to set the flavor of the output item. Useful for modded artisan goods
there are some checks in the game that checks the preserve value of the object instead of its IDs. I suppose setting PreserveType allows your modded item to qualify for those checks?
Yes, the preserve field is the same as preserve type and it's important. You fail to set it, bad things happen.
Don't know if it gets automatically set by some other macro-style methods.
modded artisan goods don't really care for it
Yeah that's me
and I can't think of a use case where you would set it outside of vanilla artisan goods (which are already using FLAVORED_ITEM anyway)
(Still need to change my nexus name)
oh...
I can prove it by editing one of my mod pages or something if you need
well i sent you a pm on nexus but let's take it to DMs for a bit
lol... you can't possibly be that spacechase0, it's unpossible!
is Logger.Monitor = Monitor; required for StardewUI?
I'm not sure if anything tries to reference it unless you actually enable verbose logging for the UI library, but... it's 1 line so it's probably a good idea to just add it.
since i copied 1.6.8 to different dir while leaving steam location at 1.6.9 i been getting a lot of this
The 'StardewModdingAPI.deps.json' file didn't match the game's version. SMAPI fixed it automatically, but you must restart SMAPI for the change to take effect.
r they write to the same json despite the change in install location
You get that every time the game updates
Which is every day for 1.6.9 beta
but also if you never want to see that again
Make StardewModdingAPI.deps.json a symlink to StardewValley.deps.json
ah i think cjb item spawner broke, gives me terminate called after throwing an instance of 'PAL_SEHException' when i attempt to use
maybe i just gotta build it myself then
ahoy all
I started off with this assets CP part for my mod gonig "eh, it'll be small, I don't need to break it up into a bunch of includes"
I was very wrong..so so wrong
@uncut viper - was this roughly what you're looking for?
@teal bridge is there a checkbox/togglable button?
Not as a standalone widget right now but it's another thing that's easy to make - really just an Image that's Focusable and has a click event.
I have checkbox columns in the IP logi mod.
thats about what i was looking for, yeah (i didnt get a ping for that—did you edit the ping in after? it only highlights the message, doesnt send a notification, if you do that)
Yeah, for some reason Discord didn't autocomplete your name and I edited it after. Thought it was 50/50 whether or not that would ping.
hello! does anyone know where the specific icon for recipe is. That icon when you buy a recipe from the saloon.
very glad to know its possible and seems pretty easy!
I'll commit the Expander widget once I clean up the API, it's kind of eh to me right now - e.g. would make it awkward to center that image - but with a few tweaks I think it should be usable.
I don't mind adding these little widgets, just haven't had a use personally for them yet.
perhaps i ought to be using grid after all 
LGTM, push to prod
Haha, what are you trying to do? Lanes have vertical center alignment if you set them up that way.
still it's nice and ez to use 5/5
i made a vertical lane that has a bunch of horizontal lanes
That's normal. But on the horizontal lanes you probably want to set them up to be vertically centered, and just make sure that right-arrow is the correct size.
grid prob make more sense here anyways ill redo it tmr 
Only thing that's really off is the spacing (use Margin) and the position of the arrow.
I'm actually not sure if grid is what you want. The grid is a uniform grid, it's meant to fill all the way in one dimension (right or down) and then wrap.
Your UI is irregular (in the sense of having different columns - not being wrong in some way)
yea hm
I think you are doing the right thing already, just need to set proper alignment and margin/padding.
ok sounds good
as for the back end impl of turning off a machine rule
i think i'd just do asset pipeline stuff?
Yeeeah... good luck with that.
By "save file location" I assume you mean SaveData, you're not talking about writing an actual physical JSON asset from the game are you?
ill make a second json in that folder
for this mod
its so that ppl can have different machine rule setups per farm
the other way i can think of to do this is postfix MachineDataUtility.CanApplyOutput
So you're going to use the in-game UI to write an actual content.json for a content patcher mod (or something that gets injected into it)? It's... kind of odd to me. Maybe it'll work?
might allow finer control, will sleep on this
well its just gonna be like,
load the machine_rule_override.json to some model
have AssetRequested delete rule late
Given it's a C# mod, would have made more sense to me to just write SaveData and then intercept what goes to the machines. Or you could write on AssetRequested handler, inject your rules there, and when the rules are changed via the UI, invalidate the asset.
invalidate asset whenever we update the model
I really don't think there should be a physical file - just use SaveData
different file means they can uninstall my mod with no consequence tho
They can uninstall your mod with SaveData too.
ill think about this too ig
tho the reason i wanted separate file is that ftm does it
except it put that in the mod folder rather than the saves folder
¯_(ツ)_/¯
You said "per farm" which I took to mean "per game" and that's save data... you write mod data, and it's global for all saves/farms.
I'm not sure what you think SaveData does, but it's just a part of SMAPI that lets you write whatever you like to the savegame. It doesn't create a new file, and it doesn't cause serialization problems (AFAIK anyway). It just gets stored in the savegame.
Yeah it's more that I get bothered by the idea of leftover data when I uninstall mod
(FTM predated the save data field in vanilla)
Personally I prefer the mod save data in the save (folder or data) rather than mod folder so it cloud syncs properly
I guess it's left over, sure, but what if someone uninstalls and then reinstalls the mod? You generally want that data kept.
As far as size, waste, etc., it's maybe a couple of KB in a several-MB save file.
If they didn't delete the file from save dir it's still there
There's no separate file in the save directory, it is the save file
I am considering making a separate file in the save dir yea
I mean SaveData isn't a separate file
(Though SpaceCore is kinda a weird case)
But whether I actually do it or just add some button to purge info from this mod out of SaveData is problem for future chu
Leftover data isn't much to worry about... If nothing reads it, then it's just inert. Won't cause any problems.
But hey, whatever suits you. Not really my forte anyway, I like to just set it and forget it. I'm here for the UI stuff if you run into anything else with that.
hmm do you have plans to ban specific inputs for a machine rule that can take multiple?
or is it all or nothing
(the UI for that might be nasty though, so no rush)
That is good question too, but the initial plan is just turn a particular MachineOutputRule off
I wanted this cus I had wildflour and my milk keeps becoming butter via mayo machine instead of cheese 
Atm I just have a personal mod specifically targeting this 1 rule lol
Related to saves, is stuff like profession level for mods stored in save data or do you have to write in a bunch of stuff for that?
Are you using spacecore skills
Yes.
I think it handles that for you?
I'll find out soon enough I guess.
I have a dozen separate machine groups because of issues like this haha. Though it's less "I don't want a certain machine rule to trigger" and more "I don't want a certain machine rule to trigger for these items". But like I said, implementing that will be rather painful, so no need to follow through!
There's also the logistics mod focustense was working on 
I think it does have this type of filtering
It doesn't mess with machine inputs/outputs.
This type of filtering as in per item based filters
For sending stuff to and from places
Yes, filtering by item type and quality.
(and hopefully some less granular categories at some point, but I haven't gotten there yet)
This is more for case where u got a bunch of rando artisan machine mods in 1 shed and don't want to have 4~5 machine groups in there
Yeah - my sheds are all monomachines but if yours aren't then I could see that being important.
the paper icon in the corner? it's in maps/springobjects, above potato seeds
somewhere center right
do I have to use a load of an empty json to create an events file for a new location?
(editdata can't make a new file entirely right? I have to load first, then I can edit data with when conditions and such?)
You could use a Load if you want
On a entire event file
Most recommend blank json + editdata cus u can use cp tokens if you do that
(y)
though unless you're adding events to a location in your own mod loading a non-empty file is somewhat discouraged
that and putting it in the mod folder when best practice is "delete mod folder, and paste new mod version" is asking for save data to be lost.
like don't do it for vanilla locations that don't have events
hello, i have a question.. uhm is spacecore broken rn? my game crashes bc of it
in this case I am adding events for a custom location in my mod, I was just confirming loading a file was necessary before I could use editdata
oh thanks
it's like events for the first time you arrive and I'll do one for the first time you arrive after learning to speak dwarvish (if you didn't know dwarvish the first time) etc.
you can do a low priority load now for custom locations at least, so if the location author missed it you can add a blank one in, but wont conflict if multiple do or if the map author loads one later, but for vanilla just never do the load as you can't be lower priority than vanilla
mostly to introduce the (admittedly pretty shallow :P) lore I've got going and sorta vaguely explain whats gonig on
what's the best track for a villain scene...
If it's an ominous scene, I'd reckon going for the track in the Ghastly Galleon from JK
hmmm
looking for it in the audio contents
how do I get this track to play in an event? - Near The Planet Core
I had issue with this track in an event. This won't work I think "14635220/t 600 2600/a 8 2": "Near The Planet Core/-1000 -1000/farmer 8 2 2
oh it worked this time.
Looks like they fixed it in 1.6!!
@uncut viper I tidied up and pushed the Expander widget, here it is inside a scroll container.
Also @lucid iron there are various bug fixes in the latest push. Among them, fixing the import namespaces; not sure if either of you ran into this, but I had some missing namespaces because I use implicit usings in my mod template and one of the quirks of shared projects is that they carry over. Makes it kind of hard to keep track of, so it might pop up again.
Also, so neither of you have to go through the same half-hour headache I just went through: when you update a submodule, you need to delete the .vs directory in the mod's solution directory. I have no idea why, but VS refuses to recognize new files in the shared project after an update, even if you restart VS, unload/reload the shared project, and a million other workarounds.
thank you! im excited to start working on my next distraction
good to know about the .vs thing too
Srsly, I was getting ready to throw the computer out the window, it was that frustrating.
I don't even know how VS somehow manages to maintain the old file list even after literally deleting the shared project from the solution and re-adding it.
Anyway - per chu, if you still want a dedicated widget for a checkbox tomorrow, ping me later. I'm not sure that it actually fits the UI you were working on, but the sprite is there in the menu tiles already so it's easy to do.
(We don't care about the obvious piracy? Or does "Games Crack" mean something other than what I assume it means?)
Oh I didn't notice that. But the rules do not forbid helping people with pirated copies (but you can choose not to)
you cannot help with pirating the game, or helping with issues related to piracy
install on Linux.sh being nonexecutable is a common Linux problem
(with that being said that will be the only amount of help I'll give them)
(PPS last post on the subject, but FYI here is the entire code for the expander example above, so you can see it's not a lot: https://gist.github.com/focustense/d635748e983d95f5e34e7b7b8125d6da)
how do I add more than one dependency to my mod? I was using this, but then it was only loading SpaceCore instead of SpaceCore and Content Patcher, which makes me think I've messed up my syntax somewhere
https://stardewvalleywiki.com/Modding:Modder_Guide/APIs/Manifest#Dependencies
Dependencies is a field you can add to the manifest
You have. "Dependencies" and "ContentPackFor" are different fields. This is an example of multiple dependencies.
"ContentPackFor": {
"UniqueID": "Pathoschild.ContentPatcher"
},
"Dependencies": [
{
"UniqueID": "gwenynnefydd.diversegingerisland",
"IsRequired": true
},
{
"UniqueID": "DolphINaF.VendorPortraits",
"IsRequired": true
}
]
ahh, okay
it's loading both now, which is good, except now it's throwing this, which I am not sure what it means. I missed adding a token somewhere, I think, but I do not know where to find it or where to add it.
the ContentPackFor field lets the mod you put there get al ot more information about your mod and the files inside it, which is why Content Patcher mods need to put Content Patcher there so Content Patcher can load your stuff
only one thing can ever be in ContentPackFor
that would be either a dynamic token or a config token i think
so near the top of your file most likely
"Category Overrides" isnt a default CP token so it'd have to be one you defined (or one that SpaceCore defined i suppose)
yeah, that's why I thought that just adding in SpaceCore would have handled that, but it seems like it did not
spacecore only adds 4 CP tokens and none of them are something called "Category Overrides"
What are you trying to do?
I'm trying to change the text on the category for my Peppercorns from Fruit to Spice. one of the people who works on Cornucopia showed me their github so I could look off it and get some templates, and his is the same as mine, so I don't understand what's not working
they probably defined a config option called "Category Overrides"
either that or a dynamic token
They have either a config schema at the top of their content.json or dynamic token that defines that token
Check their content.json and find where they defined it
"Category Overrides" doesnt mean anything to content patcher unless you tell content patcher what it means
So if you want yours to be toggleable with a config or something then you would need to set that up as well
Otherwise if you just want yours on all the time, remove the When entirely
you mean like this?
Yes
okay... and since I only need the Category Overrides portion, I just the "ConfigSchema" and the nested Category Overrides stuff inside it to my content.json, either underneath or above everything else?
do you actually need the category overrides to be configurable?
I just need them to change the category for 5 items, so probably not
the config stuff is for a user of your mod to change the config, so if you dont want them to turn off the new categories, you dont want a config token for it
then how do I get the categories to change on the peppercorns, if that's not the way to do it? I don't know how to make SpaceCore tell Content Patcher what Category Overrides does
you've already done it. just remove the "When" part
oh. well that's easy, at least, lol
"When" sections are to tell content patcher "ok, i want you to do this stuff in Entries but only if these conditions are true"
in this case, that condition would be "did the user leave this config option on?"
if you want it to always apply then dont put a When section
ahhhh, that makes sense. thank you very much for helping me understand
ok, that's fixed, now to figure out why the dehydrator isn't making my custom item
that is something i probably do not know enough about to help with but it cant hurt to post your jsons (ideally with the smapi.io uploader) for others who might be lurking still to take a look at
!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.
luckily, my jsons are small
instead of outputting the PeppercornsDried, it's outputting the vanilla dried fruits item
You probably need to move your entry up
move my entry up? do you mean the "Entries" field in my machines.json, or something somewhere else?
Nah, so when the game is going through the output rules, it tends to use the first match and when you add a new rule it adds it to the end of the list
So your items is satisfying the fruit output rule before it's even reaching your output rule
ahh, okay, that makes sense
So after the } for Entries, you want another field called MoveEntries
https://github.com/Pathoschild/StardewMods/blob/develop/ContentPatcher/docs/author-guide/action-editdata.md#edit-a-list
There's an example here though it's editing a different list
so I'm moving it just like I moved my seeds to be above Grass Starter in Pierre's shop, for example?
Yep
You should be able to just move it to the top though
"ToPosition": "Top"
Depending on what kind of input your rule is expecting, that doesn't always hold true
Like the reason the fruit output is so aggressive is that it just accepts any item with the category_fruits context tag
{"Id": "RiftstalkerSekun.CropExpansion_PeppercornsDried", "ToPosition": "Top"},
this would be correct, yes?
Should be
awesome, let's spin it up again and give it a whirl
yay, that was the magic fix! :D
though my peppercorns are still showing as Fruit instead of Spice, but honestly, that is more of a 'want' instead of a 'need', haha
time to go work on the other dehydrator crops now that my proof-of-concept is working
If I had to guess, something about your override entry is wrong
Or, ObjectExtensionData I guess it's called
that's what I would guess too, but after removing the When: portion, it's not throwing errors any more, so I'm not sure what's going on
Well, it would have to be pretty wrong to throw errors on a custom asset like that
you put "Peppercorns_object" as the key for your ObjecvtExtensionData entry
but for that custom asset the key needs to match the item ID
(without the (O) qualifier)
Ah yeah, that would do it lol
ok, how do I find out the item ID? I thought that item IDs were assigned dynamically now, rather than being static
its the complete opposite basically
Nope, dynamic assignment was a JA thing I think
you are the one defining your own item ID
presumably its RiftstalkerSekun.CropExpansion_Peppercorns
It's the entry key you put for your items Data/Objects entry
dynamic ids is back in the "modding is hell" days
Though, that probably made things a lot nicer lol
until you changed your modlist whatsoever
If I replace the callvirt here with a call opcode to my own method, will the method be taking in the arg3 as this GameLocation location?
I guess I'm glad I never felt the need to use mods that added items before lol
Help I keep finding more things to test for writing dialogue questions. This is neverending >_<
oh, that would have been the cause of the whole 'JSON Shuffle' thing then, wouldn't it?
No clue, that was before my time here
How long have you been around, roku?
I joined the server and started modding right around the time 1.6 dropped lol
if your custom method takes in one GameLocation as a parameter and assuming ldarg.3 is indeed a GameLocation then it should get whatever ldarg.3 is as the location
it wont get whatever this is though, thats ldarg.0
Wait roku is cheeto now? ahaha
I meant
Grats
Yeah, finally hit purple name :P
JSON Shuffle w as a huge pain in the ass
Waaaat I thought you'd been around for ages
because item ids were assigned based on mod load order
as far as i understand it anyway
so if you changed your mod list between play sessions then all the items in your inventory could potentially get their IDs reassigned
I've been a mod user for SDV for a while off an on, but not a dev for that long lol
leading to a lot of incorrectly textured, functioning, or outright broken items
public static bool MyMethod(this GameLocation location) { /* . . . */ }
// OR
public static bool MyMethod(GameLocation location)
``` which one should be used?
Oh help I do that all the time. That would've been so bad.
Huh. Here I was getting long-hauler vibes from you and I was wrong!
im not familiar with the idea of using this in a parameter. what are you trying to do?
I'm a fast learner lol
And enjoy helping, so often I jump straight from learning to helping as soon as I can
i technically did one mod pre-1.6 but otherwise everything ive done has also been 1.6 only going from basically no C# knowledge to start with
You can make extension methods in C# - this GameLocation location means the method could be called by doing location.MyMethod()
which is how the original code looks, environment.IsRainingHere()
which is why I'm not sure which is the correct approach
what function is the original code from?
FarmAnimal::updateWhenNotCurrentLocation
turns out that yes, things miraculously DO work when you're using the right name, and not the name of the texture file by mistake...
Yeah me too lol
@vernal crest Abaaaa I'm finally done w STP's edits ^_^ can i ping u later (soon) in the thread
Yay! Yeah, go for it!
thats just calling a non-static method thats in the GameLocation class on a GameLocation instance though, i dont think extension methods have anything to do with it? but admittedly this is the first ive heard of them
Not something I've heard of before either lol
if you replace the function call opcode with a call to your own function id expect it should just take in one GameLocation as a parameter and return a bool
I tend to think of extension methods as adding instance methods hence the confusion 😛
its not adding a method to it though, the method is always there in the class
either way changing the opcode to a call with a normal GameLocation parameter should just turn it from environment.IsRainingHere() to CustomFunction(environment)
If you use the this one, it is an extension method and must be defined in a static class iirc
For most cases the other will be more use
Gotcha! Thank you everyone!
I'm trying to learn event modding for a new event I'm doing and I was looking at the event code. Alex is Josh?
Yeah he was originally named Josh
joshMessage confused me a lil bit 
yeah i think alex is josh
His house map is called JoshHouse
He does give Josh energy so it makes sense (sorry to the Joshes, I mean no offense)
Is there a mod that makes his name Josh again? Lol
For some reason I find that so much easier to remember than remembering that Marnie's house is called AnimalShop
What about ArcheologyHouse?
Oh yeah that one is terrible lol
my thing is always forgetting that AnimalShop and PetAdoption are two different Data/Shops entries despite being the same house. like it makes sense from a data standpoint. not to my brain standpoint though
Also another question, 911526 is the event code for Alex's 10-heart and I'm studying this one bc the main premise of my mod is kind of the same setting. If I wanna make my own event id, how would I come about it?
I always default to animal shop should be the shop where you buy animals lol
like pets
An event id can be anything, and in 1.6 they can be strings too so the recommended format is {{ModId}}_Id
Strings all the way down
just one more question tonight, I promise. since the peppercorns are destined for the dehydrator, I wanted to make them all be normal quality, which I know I use the HarvestMinQuality and HarvestMaxQuality settings for, but it doesn't look like it's accepting "normal" as the string for it. does anyone know what strings are used for those settings?
And its C# type is named LibraryMuseum 
for normal, silver, gold, and iridium respectively
awesome, thank you!
💀 more accurate but so overkill lol
gonna make a mod that renames pierres place to SeedChurch
I look forward to one day making my own game and ending up with all the same sorts of silliness.
Aba game? :o
Yeah one day I want to make yet another Stardew clone but with a heavier focus on - wait for it - NPC interaction xD
Ehehehehe
Yap Quest /j
I actually started modding Stardew because I figured it would help me learn the skills for my own game in a more guided way than I was hitherto managing.
If you need a team I'd be down to work on it too
My sibling and I have been playing a farming sim and in pointing out its flaws came up with some fun gameplay concepts
Nice!
I intend to go at "chronic fatigue disorder" speed, which means it may take the rest of my life to do it lol
Waahh
But I will let you know if I ever predict a more concrete project developing
Pls add chimkin jokes 
Feel free! And of course best of luck on all your endeavours, present and future
I'll still be watching Hiria's progress ehehe
and a cabbage salesman who constantly sings the praises of his cabbages
I still can't get Harmony Patch priority to work... I want my postfix to be processed before the postfix of another mod on the same method, but neither "priority" nor "before" arguments in the HarmonyMethod constructor seem to work, the result in game indicates that my postfix always comes last and this is an issue.
Is there any way to list all patches and their info so that I can debug this?
For info, here is my patch:
MethodInfo method = AccessTools.DeclaredMethod(typeof(HarmonyPatcher), "IntersectsForCollision");
ModEntry.log($"Patching postfix for Furniture.IntersectsForCollision", LogLevel.Trace);
MethodInfo original = AccessTools.DeclaredMethod(typeof(Furniture), method.Name);
HarmonyMethod postfix = new(method,
priority: Priority.First, // does not work
before: new[] {"Espy.PreciseFurniture"}, // does not work
debug: true
);
harmony.Patch(
original: original,
postfix: postfix
);
ModEntry.log("Patched Furniture.IntersectsForCollision");
what are update keys and how do they work? im new to making mods and im not sure i understand what update key number thing to put in my manifest files or when lol
I wish the harmony site would show manual patching stuff too
Not everyone is using annotations
UpdateKeys is what SMAPI checks to see if your mod is up to date with the latest version on various sites
it does show manual patching (with priority too) on the Basics page
Hm, how would I check if any of the players has a profession? (I'm using SpaceCore and it's a custom profession)
(I'm assuming I want to check if any player has it instead of just the host)
thank you! dont know why i have so much trouble finding these things! 
Because the wiki hides modding pages intentionally lol
if its a custom profession then i assume you'll need SpaceCore's API
You can search modding:search term to tell it to show you modding stuff
Iterate over all the players and check each one
Game1.player gives the current one, and I imagine there's a better way than iterating over all locations and their .farmers?
You'd be surprised, but there might be
Oh
Hi everyone!
Is there an option to tell Pathoschild.Stardew.ModBuildConfig which package references from the game directory to include? I can't find anything that seems relevant here https://github.com/Pathoschild/SMAPI/blob/develop/docs/technical/mod-package.md#features.
My problem is this: I need access to private types in MonoGame.Framework.dll. I'm using an Assembly Publicizer to create a version of the dll where everything is public. But as soon as I include Pathoschild.Stardew.ModBuildConfig it seems to then automatically include the original MonoGame.Framework.dll with the non-public types.
My attempt from my .csproj:
<ItemGroup>
<PackageReference Include="BepInEx.AssemblyPublicizer.MSBuild" Version="0.4.2">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<Reference Include="../../../stardew-modding/StardewValley-gog-linux-1.6.8.24119/game/MonoGame.Framework.dll" Publicize="true" />
<PackageReference Include="Pathoschild.Stardew.ModBuildConfig" Version="4.2.0" />
</ItemGroup>
So far the line <Reference Include="../../../stardew-modding/StardewValley-gog-linux-1.6.8.24119/game/MonoGame.Framework.dll Publicize="true" /> is effectively ignored and the Assembly Publicizer doesn't even run as long as the reference to Pathoschild.Stardew.ModBuildConfig is in there, too.
Any ideas? Did I maybe just not find the right configuration option?
C# reflection?
that's a good start, if the patches are listed in the order they are applied, then priority arguments have truly no effect...
StardewValley.Objects.BedFurniture.IntersectsForCollision
- Espy.PreciseFurniture (postfix)
- leroymilo.FurnitureFramework (postfix)
I haven't ever tried, but I know other people who are more knowledgeable in harmony have suggested them in the past, so I have to imagine they should work
Though, I'm not sure if there's maybe a difference between the manual patching and the annotations
did you have both the First priority and the Before argument at the same time?
I don't think reflection is going to work in my case since the type itself (d_sdl_pollevent) is private internal:
internal static class Sdl {
// ...
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public delegate int d_sdl_pollevent([Out] out Event _event);
public static d_sdl_pollevent PollEvent = FuncLoader.LoadFunction<d_sdl_pollevent>(NativeLibrary, "SDL_PollEvent");
// ..
}
https://github.com/MonoGame/MonoGame/blob/develop/MonoGame.Framework/Platform/SDL/SDL2.cs
I need to define my own delegate of type d_sdl_pollevent to wrap the existing delegate and I don't see how I could achieve that with reflection.
I tried each one by itself, and both at the same time, nothing changes the actual order as far as I can tell
does anybody know what happened to Utility.isViableSeedSpot in sdv 1.6? it's removed or replaced but i don't see a clear continuation
GameLocation has CanPlantSeedsHere
that was in 1.5 too alongside isViableSeedSpot 
oh wow GetHoeDirtAtTile might actually do what i need though
or not
StardewValley.GameLocation.CanPlantSeedsHere exists for me, in Stardew Valley.dll, version 1.6.8.24119.
I wasn't here for 1.5 so I dunno what the method is supposed to do, also I'd love to actually try to help but I gotta get ready to go. Maybe if you describe what you're trying to do now someone can point you to a 1.6 method that'll work
I guess that would be one reason to ask for repo access, could look it up and see what it does lol
Hi again. I'll rephrase my question from before. Has anyone here had success getting an assembly publicizer to work with a SMAPI C# mod? If so: How did you deal with Pathoschild.Stardew.ModBuildConfig (apparently) already including all references from the game directory?
It is finally finished!!!!
Interested in learning how to write nested/followup (within the same interaction) questions in dialogue? Now you can! https://stardewmodding.wiki.gg/wiki/Tutorial:_Nested_Dialogue_Questions
This tutorial is intended to teach you how to expand on the use of questions in dialogue by nesting one (or more) question inside another. You can also think of it as adding follow-up questions within one dialogue interaction. If you're not sure what I mean by that, read on! (And if you can think of a better way to describe it, feel free to edit...
I give myself an embed as a little treat.
@brittle ledge I made it!
Is there an example of how exactly the Skins field works in animal data? Specifically, how does the skin ID work?
Should just be the unique identifier for that entry in that list
so i can just straight-up name them the variants and not have any ModID prefixes
I would still use ModId but it really depends on what you're working on
That's more just to avoid any potential issues at all than a requirement
Well, I found a workaround, but patch priority is still busted.
My first DP!
@inland cedar does the last update of Market Town includes the support for multi-slots Furniture made with the Furniture Framework?
i can't tell if my wider-than-vanilla animal is stuck in the barn door or if it's just being moody and doesn't want to leave
aight gonna need a custom building then
someone should make a magical barn door that lets them all pass xD
Is there any standard way to do rng in Stardew modding?
Game1.random or Utility.CreateRandom to make your own
Thank you :3
Hi! I recall not having to do anything specifically annoying to publicize monogame
But also I wanted internal types
This was sufficient
hey, just curious but if i do not own the game on steam but own it on switch, where can i find a decompiled version of the game code? (i may or may not be interested in making a mod kek)
if you want to make a mod, it is in your best interest to buy the game on PC, where modding is functional and supported
hmm alright
steam, gog, and xbox game pass are all equally viable, and maybe there are more but i can't recall them if so
Oh yeah I ended up just adding those usings to my csproj to make it work, as for check box I will try the image focused thing first
I believe it does. I haven't changed anything related to that. I will try again to make sure later today
Thank you so, so much! Krafs.Publicizer did the trick for me. It just... worked as expected. 😄 I was using BepInEx.AssemblyPublicizer and apparently it has very weird interactions with the SMAPI package. Should have dumped it as soon as I realized the documentation had bugs. 🙈
To anyone in the future who wants to use assembly publicizers: Use Krafs.Publicizer, not BepInEx.AssemblyPublicizer.
Hate when I have an expansion mod idea, but have no clue where to start 
Yeah I have a few ideas like that.
How do people start???? Do they draft ideas for NPC’s/quests/map layout??
Start writing everything that comes into your head, every idea. You can organize it later. Even if it's stupid it's worth writing down, you can fix it later too.
But it does wonders for motivation when you have some stuff on a page instead of a blank page.
Thanks that’s really good advice even in general
Yeah, I like to make a document that starts with the overall idea of a mod, lists everything the mod should do or add, and then break down all of the code, assets, changes, etc that will be needed.
It takes me so long to code that having a design doc I can go tinker with inbetween coding (read: at class or work) means I don't forget the cool idea I had.
Disney does that thing where they have the "dreamer" phase, you just call out cool stuff you would want to do and don't worry about the technical limitations or the cost, and then later you can do a second pass with "I have no idea how to code that and don't want to spend three weeks trying so we'll cut this down", or "this is neat but doesn't fit to the mod so we'll change it" but the dreamer phase is important to aim high and get some cool ideas out there.
i do a really informal plain-text todo list. it's a combination of vague ideas, specific implementation steps, and reminders. just whatever i think of that i don't want to forget
I used to just bounce ideas in my head and then go to sleep and then go for a run
Sleeping let's my brain make connections, and running gives me the time to put things together
I would recommend writing things down
I sorted it into the "design document" where I write down the ideas, and then as I get to each part of that design doc, I explode it out into the "technical design document" where each tiny code piece gets defined and I can mark off which sections are done.
Examples:
My design docs at work are much cleaner but my boss isn't watching these ones.
I am finishing the first breakpoint of coding where I have to take a break from trying out features and fix the horrendous ways I made it work so that I can scale it properly.
But the important part for getting started was, I had a dream where I was a druidic bard and when I woke up I remembered the harp scene with abigail and thought "wouldn't it be so cool if the harp was a sword." and started writing things down.
Ok, so I'm currently adding better CP support to the Furniture Framework so that it's possible to both EditImage on a Furniture Pack loaded sprite-sheets and EditData on its content.json. I had a seasonal textures feature and someone asked for a way to make weather based sprites.
Should I add weather based sprites in the Furniture Framework or just let modders do it with Content Patcher, with an example of how to do it?
Hm, how are textures defined in FF?
I remember a person who wanted different snow and no snow textures
A weather token example with content patcher would be better for compat with cloudy skies
the wiki explanation for the animal spritesheet is confusing me, and i think this is wrong? shouldn't the top example be UseFlippedRightForLeft true and UseDoubleUniqueAnimationFrames false, and then the opposite for the bottom one?
bc rn i have both true and it is NOT lining up with the bottom sheet
like the eat animation and the unique up and unique left are sharing frames
the solution is probably just disabling flipped right for left and just manually having them flipped in the spritesheet to get it to line up with the way it is on chickens and rabbits
bc i don't think any vanilla animal actually has the flipped right for left combined with doubled unique animation frames
indeed seems to be a typo
The top is flipped right for left = true and use double unique anim frames = false
Bottom is inverse
so if you have both to true your spritesheet needs 6 rows (use the bottom sheet, but remove the move left sprites)
it's just a path to the mod's assets, like a CP EditImage FromFile field
i want to ask the opinion of people who might use the Framework, because I'm looking at my code and I don't want to do weather based textures, I'd rather let people use CP for it.
Does anyone know if there is a way to make an npc's default location (sleep/wakeup) on an outdoor map like Forest?
does anyone know how to spawn in animals for mapping? for example like the cows at marnie's house? (please ping me if you know! ty!)
Does anyone know if it would be possible to make a mod with custom gift reactions that only trigger when married? Like if you were to give a specific gift to a villager it would trigger the basic response, but if you give it to them after they become your spouse it would trigger a different line of dialogue.
I think people use Custom Companions
tysmmm! now i have to figure out how to use custom companions..
patch gift dialogue with When set to married to that NPC
anyone know what tile sheet the scarecrows are in?
TileSheets/Craftables
what is this thing
horrifying 🤣
same mask as the shadow shamans
that the crows are scared of the rarecrow must mean that they pop above ground now and then
you could probably just use MapEdit to replace specific areas with animated tiles conditionally
That looks like an early version of one of the rarecrows
Just set their "Home" field in Data/Characters to that. I don't think the game cares if it's set to an outdoor location.
That's what I tried but it keeps trying to default to AnimalShop and ignores Forest
even though the coordinates don't make sense 🤣
did you had it in animalshop previously?
did you sleep several days to reset stuff properly?
can you show the code?
Given that they'd want to be changing the NPCs' dialogue to be affecting specific gift responses I don't think editing maps will help them.
let me try that
I think you replied to the wrong comment 😅
This is the one I was trying to reply to 😅
you could probably just use MapEdit to replace specific areas with animated tiles conditionally <-- was in reference to the idea of adding animated animals to parts of maps
that's all I needed to do haha
sadly the "refresh rate" of the spawn point is happening in a weird way
so it refreshs the coordinate but not the map first, then the map
something like that
please did anyone figure a reliable way to test|| trinkets|| Im getting carpool tunnel sybdrome
test what about them?
like ||fairies|| for example
or do I just have to make new saves everytime and spend 5 minutes getting ||mastery||?
i still don't have enough context
what's stopping you from getting the mastery and then sleeping?
color of the ||fairy trinket|| is based on a random number assigned to save, can you debug or somehow change the number?
or is there some save editor?
can you give the full details of what you need to do like why do you need to test all colors??
that's based on your multiplayer id
is it random? i thought it was in regards to player number, oops
It's based on the player ID
bah that's what i thought 
but also you can just editimage targeting your own fairy
ah i see
change it to the right position later
and that's not changeable at all?
(Console Code script: cs Game1.player.uniqueMultiplayerID.Value = 123;)
that goes where?
would modifying that change other things relating to player ID, out of curiosity.. like cabins?
wow what u can just put c# through debug console this whole time 
I guess that it would
You would have to install Console Code, and then run that in the SMAPI console
Yeah there would definitely be side effects
Not sure what all they would be though
I see, thanks!
ok ty
I also made it where you can do it from files, so you could have C# code in a file in the console code folder, and then do cs --script my-script.cs. You can even pass arguments to it
dw that was my initial reaction too lmao
Does millisecondsAfterNibble in GameLocation.getFish do something that I'm not seeing, or is it a redundant argument possibly from some older version of the game?
does anyone know how to make an NPC? my friend and i got so close and we used Miss Coriel's NPC creator but the sprites didnt work, afew months later i learned this chat exits
If I'm reading at the GitHub decompile correctly, it's been unused going back to version 1.0.0.
Mystery for the ages...
Tempted to make a command for that, dunno what else to put than the link though
I mean converters is an insane list of links lol
with "CanVisitIsland": true, does it need an explicit schedule or do they just go there sometimes.
What other links are there for NPC creation?
I wonder if this is a remnant of a Hades-style perfect catch system
(I know Hades comes out after SDV but it's the closest comparison lmao)
Speaking of which, I asked the other day but didn't seem to get an answer, how do we actually request access to that repo with history?
I did it by pinging Pathos
It looks like it also randomly removes possible visitors for the island
Ok, thanks.
if i didn't hate wiki formatting i woulda just copied pasted 1.6 into npc data but 
I have that backwards, it randomly adds 5 valid NPC's
anyone know about a standalone version of this X
Might be too big, but there's one next to the clock in Cursors.
There's a big red X in cursors you can usr maybe
the only other x i see is in emojis
There's also a smaller-sized X that's part of a button, just next to the left arrow and under the money counter. Not transparent background though.
Is this for the checkbox?
Because if it is, there's a separate sprite for that with a green X, on menutiles.
no its for !context_tag
Oh. Only other place that might be useful is the emoji tilesheet, it has a red X that's a somewhat different style.
Not as visually consistent but it does at least have the right size + transparent BG.
Hey guys, quick question. Can anybody tell me why my NPC is not showing up on Leah's house?
{
"Format": "1.24.0",
"Changes": [
{
"Action": "EditData",
"Target": "Data/Characters",
"Entries": {
"Pauline": {
"DisplayName": "Pauline",
"Gender": "Female",
"Age": "Adult",
"Manner": "Neutral",
"SocialAnxiety": "Outgoing",
"Optimism": "Positive",
"BirthSeason": "spring",
"BirthDay": "28",
"HomeRegion": "Town",
"CanBeRomanced": true,
"CanVisitIsland": false,
"SpouseAdopts": true,
"IntroductionsQuest": true,
"ItemDeliveryQuests": false,
"WinterStarParticipant": true,
"Pauline.Home": [
{
"Id": "PaulineHome",
"Location": "LeahHouse",
"Tile": {
"X": 8,
"Y": 5
},
"Direction": "Up"
}
]
}
}
},
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 no space, like ```json).
The usual codes are cs (C#) and json.
Let me try that. Thanks!
!json though realistically, I'd prefer them sent through here
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.
It's kinda weird cause she shows up in Town instead of Leah's house though.
Surprised she shows up at all, though I dunno how dispositions were handled before
town is the fallback spawn when yours is messed up i believe
I see. I gotta figure this out lol
Ah, that makes a lot of sense
Better than just not spawning them or dropping them in the void at least lol
yea
Wonder if the log kicks back anything about it though
You may also need to sleep a day to reset the Home if you're modifying it
it never tells me when i've screwed something up
'other' homeregion is a painful beast
Yeah, if testing on a game already in progress, you need to sleep to update NPC stuff usually, I tend to test on new saves for that
Gotcha. Let me try that too.
ok so do we think I have to stick to the stardew NPC art style, or is it acceptable if I do my own style?
Nahh, she's still in town. 😂 This thing is kicking my ass.
!vsc I suggest a text editor with validation
When creating content mods, it's useful to have a program that will check the validity of your json for you. We tend to recommend either VSCode https://code.visualstudio.com/download or notepad++ https://notepad-plus-plus.org/downloads/
thats why its always good to throw it into the validator
wanted to make a character mod, is this a good character portrait to start off?
thought might be useful for someone so
MP ID ||Fairy Variant||
123 #1
124 #3
125 #8
126 #6
127 #4
130 #7
121 #5
122 #2
*numbered from top left
(Console Code script: cs Game1.player.uniqueMultiplayerID.Value = 123;)
Thanks to @/kittycatcasey for the command
is this from the portrait maker
yes
#making-mods-art would give better feedback, this section tends to stick to code-- also anytime a resource like that is used, it must be credited
credit should always be given then
but its a good placeholder
yea
You'll need to make all the other required portraits too
Unless you want it to just blank out lol
ok thanks for telling
or just write stuff
Or stare at you the same way
then as mentioned above credit should be always given
its an alright placeholder tho
yeah i thought it would have put the credits like on the top right corner but i will insert them myself
i don't know what the basic "text section" of the npc command would be, (backtracking on the npc command)
something like, "be wary it is a lot of moving parts"?
Yeah, I'll have to give it some more thought when I get back home later
That API isn't necessary anymore due to how WMR changing how it works
Let me find the code I used for SpaceCore
List<string> worn = new();
foreach (var item in toCheck)
worn.Add(item.QualifiedItemId);
while (rings.Count > 0)
{
Ring r = rings.Dequeue();
if (r == null)
continue;
if (r is CombinedRing cr)
{
cr.combinedRings.ToList().ForEach(r2 => rings.Enqueue(r2));
}
else
{
worn.Add(r.QualifiedItemId);
}
}
Thanks for this valuable tool man.
Basically, WMR puts everything in a combined ring now
So just go through every ring in the combined ring (including if there is a combined ring inside, which could happen with WMR)
Hi
Depending on what you need, the base game has methods for this
Game1.player.GetEffectsOfRingMultiplier
Game1.player.isWearingRing
Works fine with WMR
(Including checking recursively)
The first one is used if you need the total number of rings of a specific type equipped
The second checks if the ring is worn at all
Oh right, there's already an npc command, I can just add a few more links to it lol
Completely your choice :)
Hm, I guess I should remove the link to LemurKat's blog post, aside from some software suggestions, it's pretty out of date at this point
Yeah Kat's stuff is good but only if you already know enough to sift through what's not relevant anymore.
I think I made Gov mad
two commands, in a WEEK?
!npc I think I have to give up on making that last link sit in the right place
Keep in mind that making NPCs is a complex process that requires learning many different aspects of Stardew modding.
Here are a few links that can help get you started on all that you need to know:
-
Tiakall has a great tutorial on making a custom NPC for 1.6:
https://stardewmodding.wiki.gg/wiki/Tutorial:_Making_a_Custom_NPC -
Custom NPCs received many improvements with 1.6. For changes made, see the migration guide:
https://stardewvalleywiki.com/Modding:Migrate_to_Stardew_Valley_1.6#Custom_NPCs -
Some information on the NPC wiki page is still relevant:
https://stardewvalleywiki.com/Modding:NPC_data
Just make sure you're checking the migration page and tutorial first as this page still has outdated information on it as well. -
Aviroen has put together a template that will allow you to easily create a romanceable NPC:
https://stardewmodding.wiki.gg/wiki/Npc_template
Nice!
i no longer have an obligation for cheeto, a lot of the jargon from the github would be lost on my brain 
Yeah, unless you have a specific reason to want access to the repo, you can also just decompile the game yourself and get basically the same thing
To feel included!
nuh i want those shorts 
blissfully unaware it's an unknown private thread
You basically only want the repo for the history tbh
Huh
Oh you do miss out on our super secret thread by not getting Cheeto
It's from the server suggestion forum, didn't know that was locked
The nice thing about repo is being able to look on the phone
It was a suggestion for a Despercheeto role 
But u can just snipe nerds here
Addicted to Stardew. Must access everywhere.
y'know that'd be a strong temptation if it was despercheeto
true, if not for the fact GitHub mobile SUCKS ASS RAAHHHH
Just memorize large swaths of game code
How would I make SpaceCore use a shorter version of the custom skill name on the skill page?
(You think I'm kidding but I do have a near photographic memory)
i imagine that's helpful for knitting
I malloc too much memory to things like gen 1 to 7 pokemon names
you set the name with GetName() right?
Yeah, but the name I want is too long for the skill page ("Weather Witch"), so I was planning to shorten it there
and keep it for the level up thingies
ah, dunno then. might need a feature request with casey
I mean, I figured it'd require using Harmony on SpaceCore
I just have no idea where I'd do that, SpaceCore is complex lol
meteomancer
I could, or I could try to do it regardless of the obstacles so I can learn more :3
I do think weather witch is bit out of place against other vanilla skill names tho
Sidenote, I'm guessing ~half of my code is either cursed in some way or just Not How You're Supposed To Do Things™️
Mostly cus witch is generally a gendered term
If the aim is shorter name for skills page but longer name for skill level up screen or other uses of the skill name, would not using an if statement work? You'd just return a different string in GetName() if in the skills menu
Mage might be a good choice in that regard
Isn't as quippy as the double W Marvel-special-naming-convention
'meteorologist mage'
Mweather Mage /j
I'm gonna be honest I don't quite care
If Pathfinder can have a Witch class, I can have a Witch skill 😛
For sure, gender norms are for losers
If someone sees that term as gendered and they don't like it, just don't play with the mod lol
i can really only think of 'man look at those warlocks' and i just can't get out of that headspace
There is something funny to me about naming it something more mundane like "Meteorologist" but then still giving it magic powers
Makes me want the Archaeology skill to have necromancy and stuff lol
I think Meteorologist/Meteorology wouldn't fit anyway lol
the urge for a necro wand
Yeah it's pretty long lol
Archaeology barely fits
writes that as another wishlist
When trying to draw a tool icon elsewhere on the screen, is the only way to do that is to index the tool sprite sheet manually?
if you want generic tool you could use the 1.6 mastery icons?
otherwise easiest way is getting the item data
ParsedItemData itemData = ItemRegistry.GetData("(T)SteelAxe");
// draw using itemData.GetTexture(), itemData.GetSourceRect()
Would this work with the appearance code?
"Condition": "PLAYER_NPC_RELATIONSHIP <Any> <Elliott> <Married>",
you'd have to remove the <>, so it'd look like "PLAYER_NPC_RELATIONSHIP Any Elliott Married" but that means he changes his appearance based on any farmer (main host or farmhand) that's married to him
no < >
I'm so sorry to whoever staff is untiming me out 😅
I shall politely avoid any discord markdown features lol
are you getting hit by masked links
markdown gets us all, it's just the automatic timeout
At first I got hit by "whoops can't spoof emotes here" (twice)
the next was the subtext markdown + bold to make it readable
I'm guessing it didn't like the all-bold even though it was subtext
I don't think bald was the issue, it was probably the subtext
I dunno, automod weird
its to avoid scammers posing as discord i think
Thank you! its just his portrait so for continuities sake it'll be consistent
There's so much markdown stuff for Discord I have no reason to use lol
Anyhow, what I wanted to do in the first place, is say yay I did it
With the most cursed of solutions: ```cs
private static bool override_for_long_name = false;
public override string GetName() {
bool use_short_name = Game1.activeClickableMenu is GameMenu && !override_for_long_name;
override_for_long_name = false;
return helper.Translation.Get(use_short_name ? ChildIDs.short_name : ChildIDs.name);
}
public override List<string> GetExtraLevelUpInfo(int level) {
return new List<string> {
helper.Translation.Get(ChildIDs.per_level, new {
bonus = PER_LEVEL_EFFECT
})
};
}
public override string GetSkillPageHoverText(int level) {
override_for_long_name = true;
return helper.Translation.Get(ChildIDs.per_level, new {
bonus = PER_LEVEL_EFFECT * level
});
}```
🤔 I don't think the profession levels disappearing is supposed to happen
Does it appear when you sleep and pick your professions?
No level up msg appears for my skill
When I try to do it with another skill like Cooking, yes
I assume it disappearing is a side-effect of the command
Hmm, did you put your professions in Professions and ProfessionsForLevels?
On the Skill subclass
And did you set ExperienceCurve
Ah, missed ProfessionsForLevels ( thank u :3 )
and did not in fact set anything related to the exp lol, but the game seemed to pick a default of some sort
What's the ExperienceBarColor responsible for?
hehe :3
Thank you very much! :3
Thank you! 😄
Had some more ideas for Buildings Included, you can now:
- Upgrade existing buildings or even replace them entirely
- Have objects spawn in interiors right when they're spawned (just like animals)
https://www.nexusmods.com/stardewvalley/mods/27359
Now to get started on the long taks of running through all my mods and seeing what needs updating for 1.6.9 
🤔 isn't indoor items already supported by the base game
The Experience Bars mod
...
(You'd think I'd learn to check before spending time on this stuff
)
At least I have upgradeable buildings... right...?
26 active C# mods... Think I might just ask Atra for some tips and start knitting instead
Just undergo a mental breakdown and decide you want something different in your life instead 
Getting very close to check of that first mark, think I'm going to spend the weekend just reading, got some new books I've been meaning to touch anyway
(SMAPI 4.1.0-beta.2 posted on Nexus! This mainly updates the compatibility rewriters for the recent fish pond data changes in Stardew Valley 1.6.9 beta.)
what does this imply to you 
truth be told i have no idea what that would imply to me i think
the context is machine rules
There are notes written about gemstones. Prismatic shard is bad! Or not allowed.
I think if I knew I was reading crystalarium rules I would go "okay, Prismatic Shard isn't allowed but the others are"
the X might imply something to me on its own but the X with the paper note cancels it out and makes me not know
unsure how to depict context_tag
atm its just pulling the first item that has a given context tag, using item query
what does the paper note represent?
that this is a context tag, not real item
oh
Yeah I don't think I got that
i wouldve 100% assumed it was saying something about those specific items
for ref the real item exact items dont have the little note icon
i like the way minecraft mods do it which changes the icon shown between the different things in that category every second ish
that seems terrorfy with large crop mods 
i dont mean it goes through every single item in the category in the span of a second, just changes to the next one every second
A user isn't going to know what a context tag is anyway. Is this for normal mod users?
like this
except with more than just two possibilities but int his case the context tag equivalent would be "iron plate"
(or well plateIron ig but the distinction is not important its just to show that it toggles between different things to show that you dont need specifically one kind of thing)
gotta see if i am allowed to swap the image then
Rather like Button's screenshot is showing, sometimes you just have to suck it up and use text. Stardew likes to use images but I'm not sure context tags lend themselves to that.
oh i do have tooltips too
cus i dont particularly want to make nlp for conditions
the ? is placeholder for when i dont have any item to use
making the context tag sprites like half transparent might help too
id might also suggest using just a silhouette of an item for a placeholder bc to me the question mark would probably make me think the mod just couldnt figure out what the rule was supposed to do, not that theres just no item to represent it
i feel ok just showing context tags cus this is level of detail lookup anything has
(wrt transparency thing i mean the sprite beneath the paper note but keep the paper note solid)
tbh i didnt remember recipes did that but yaya like that
oh i think recipes just drew it smaller
Is there any way to draw a legend on the screen?
like the fish?
perhaps
spacechase0.SpaceCore_ShowHudMessage "message goes here" optionalQualifiedItemIdForIcon
IIRC recipes's icon are the same size 3/4 size, but semi transparent, and with the recipe paper icon in the bottom right

