#making-mods-general

1 messages · Page 23 of 1

sudden scroll
lucid iron
#

oh fun DokkanStare

#

i suspect it'd be a C# thing tho

sudden scroll
#

Oh I'm quite well aware, I'm not exactly scared of that 😛

next plaza
#

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)

vernal crest
sudden scroll
#

That sounds cursed lol

#

I'm gonna take the Harmony route I suppose

lucid iron
#

if you can use event it's usually better

next plaza
#

Yeah, I guess you can also patch the Stamina setter

lucid iron
#

less chance of mystery mod interactions

old edge
#

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

vernal crest
#

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.

teal bridge
#

Mission semi-accomplished. Thanks again to the sprite advisors earlier.

vernal crest
#

(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)

old edge
#

moving the character almost feels like a rudder control

hallow prism
#

hi! quick episode of "Lumi and English" today, is "jerk" a swear, or it is stardew friendly?

calm nebula
#

That is perfectly PG

velvet narwhal
#

mmm jerk chicken i'm hungry again

hallow prism
#

wonderful, thanks

lucid iron
#

"fall_Sat_13": "Get away from me, you stupid jerk.$a",

#

haley

hallow prism
#

wonderful too, thanks

next plaza
#

Update: monsters do have invincibility frames SDVPufferCry

plucky reef
#

how long? Must be very short.

#

that actually throws a wrench in my plans

royal stump
#

SDVpufferlurk at a glance, anything except the dagger special triggers 450ms of invincibility, give or take the time between update ticks

uncut viper
#

damn, 450 is longer than i expected

lucid iron
#

can u just patch isInvincible

royal stump
#

...actually, it might always get divided? I misjudged the variable phrasing SDVpuffersquint

#
if (triggerMonsterInvincibleTimer) //false when dagger special is what hit them
{
    monster.setInvincibleCountdown(450 / (isDagger ? 3 : 2));
}```
#

I think only parries trigger the full 450

lucid iron
#

or prefix damage monster for triggerMonsterInvincibleTimer

plucky reef
#

so a speed 2000 sword would not be effective.

royal stump
#

so I guess it's like this

  • dagger special: no i-frames
  • dagger normal attack: 150ms
  • parry: 450ms
  • anything else: 225ms
uncut viper
#

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

royal stump
#

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

brittle pasture
#

parry has a recovery time so you can't really hit it during the invuln period anyway?

#

unless MP changes that

calm nebula
#

The game has a parry?????

brittle pasture
#

it's just sword right click

uncut viper
#

surely itd be better to just change Farmer.CanBeDamaged

calm nebula
#

Next thing I'll be surprised that the game has horseradish

uncut viper
#

if you cant hit during the invuln period anyway then it just feels even more odd that it makes the invuln longer

lucid iron
#

there's horse and there's radish SDVpufferthumbsup

brittle pasture
#

it's probably so the monster can't hit you during the 10 years recovery after parrying like Esca mentioned

royal stump
#

yeah, though I'm not 100% sure how all of it interacts or if it's necessary SDVpufferdizzy

next plaza
#

Ah I just read further

#

That makes sense

uncut viper
#

the takeDamage function already checks if you were parrying though

royal stump
#

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

rancid temple
#

Combat overhaul when

calm nebula
#

Casey had a cool looking system@!!@

royal stump
#

I know other folks who wanted to do that too, but I don't envy them SDVpufferlurk

#

if only because monster code is all over the place

lucid iron
#

there were various boss monster mods

calm nebula
#

Lol

lucid iron
#

but i feel like stardew's combat mechanics r too shallow for that type of thing atm

calm nebula
royal stump
#

I still like the idea of my "persistent monster HP" setting in FTM for a boss you need to wear down over multiple days SDVkrobusgiggle
dunno if anyone has touched it, though

calm nebula
#

Unless it's hibiscus pearl tea

rancid temple
#

I feel like a lot of the regular monsters have boss monster health values already

calm nebula
#

(Don't get me wrong, it's a great game.)

hallow prism
calm nebula
#

Yes!!!!

#

Best boba

next plaza
#

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

finite ginkgo
#

i am terrified, and curious i want to see the chaos

next plaza
#

It's just redirecting a field call to check something else too

uncut viper
#

don't need to look at the IL if you only return your instructions and not the whole original

next plaza
#

Would be great if we had infixes from new harmony...

next plaza
brittle pasture
#

clear the stack? what's that?

uncut viper
#

what about using IL to write a prefix that returns false?

next plaza
#

(Yeah, it's not that bad once you have practice)

calm nebula
#

(Yeah....)

#

Like

#

At this point I know what Roslyn is gonna do

#

Which is a little sad tbh

spark wigeon
#

What is the best way to run a method at a specific in game time?

calm nebula
#

It depends TM

royal stump
#

probably just SMAPI's TimeChanged event?

teal bridge
#

Can you write a transpiler for an enumerator method generated from a Linq query expression without looking at the IL?

spark wigeon
#

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

teal bridge
#

That's your weekend homework.

royal stump
rancid musk
teal bridge
#

No peeking!

calm nebula
#

Probably not tbh

teal bridge
#

Casey, your minimap thing doesn't have an API does it?

next plaza
#

Nope, I could add one though

#

What would you need?

#

(/me pulls out ILSpy since my initial idea for implementing this wouldn't work)

teal bridge
#

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

next plaza
#

I'm not sure I understand how the compass needle thing would work, but adding new points should be easy to add

teal bridge
#

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.

next plaza
#

Ah, the minimap shows the whole location.

#

I could add a local view though

teal bridge
#

If it shows the whole location then that's probably enough. Kind of a letterboxing thing, it looks like?

next plaza
#

Yeah

cosmic skiff
#

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

teal bridge
#

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.

lucid iron
#

do you have support for the frenzy bubbles?

teal bridge
#

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

lucid iron
#

how does it work anyways, ive never seen it frenzy a modded fish

teal bridge
#

Looks like this.

teal bridge
#

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.

brittle pasture
#

between your mod and almanac (and maybe UI Info Suite 2 IIRC) I wonder if we can use a framework to unify RNG stealing

teal bridge
#

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

blissful plover
#

I just want to put this out there for all you creative folk. Someone should Make Jacob (East Scarp)romanceable....

teal bridge
#

Does UIInfoSuite do predictions now? I've never noticed those features.

brittle pasture
#

wait no, I was thinking of just replacing game1.random

teal bridge
#

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.

lucid iron
#

there is a in game predictor mod

brittle pasture
#

yeah makes sense, not a very usable idea come to think of it lol

lucid iron
teal bridge
#

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.

next plaza
#

My transpiler has been written and it works

#

Hooray

teal bridge
#

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.

lucid iron
#

focustense i want to use your StardewUI, do i have to do anything for license?

#

i have it as a submodule

teal bridge
#

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)

lucid iron
#

i am also wait for the data layers pr b4 i can merge the config thing i wanted blobcatgooglyblep

teal bridge
#

You did a custom data layer too? Or are we talking about different PRs?

lucid iron
#

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

teal bridge
#

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.

lucid iron
#

yea it is just that pathos tend to refactor PRs

#

so i figured i might as well wait

teal bridge
#

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.

lucid iron
#

for the ui thing, if i want a scrollable list (kinda like QListWidget) i would use view + grid?

teal bridge
#

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.

#

If you want a List, rather than a grid, use Lane.

lucid iron
#

im glad i asked bolbphase

#

would have never guessed thats what Lane is

teal bridge
#

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.

uncut viper
#

speaking of your UI thing, would it be easy to use it to make a collapsable list?

teal bridge
#

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

uncut viper
#

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

teal bridge
#

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.

lucid iron
#

do you want something like QTreeWidget button?

teal bridge
#

If it's a common scenario, could make it into some kind of widget.

uncut viper
#

i dunno what QTreeWidget even is

#

but a quick google says "probably?"

teal bridge
#

(I don't do Qt either, but I can sort of infer by the names what they're intended for)

lucid iron
uncut viper
#

yeah, thats what i want

lucid iron
#

qt is one of the things i actually enjoy at work blobcatgooglyblep

uncut viper
#

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?

teal bridge
uncut viper
#

Well, either would work really

teal bridge
#

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.

uncut viper
#

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 SDVpuffersquee

teal bridge
#

Well, atm the library is "primitives", but I'm amenable to collecting more "widgets" over time if they're common and useful.

uncut viper
#

if you could just let me directly use CSS inside a frame thatd be great thank you

teal bridge
#

I think it is not difficult to build an Expander; somewhat more difficult but still possible to build a Tree.

lucid iron
#

StardewUI.WebEngine

uncut viper
#

i assume when i fill in the Content that itll correctly push the stuff below it downwards to make room?

teal bridge
#

lol, if I knew how to transpile CSS rules into view logic, I would totally do it.

lucid iron
#

(psst QSS)

teal bridge
lucid iron
#

i cant imagine how you would do this in sdv though think

teal bridge
#

If you put it inside a Panel (fixed child layout) then they wouldn't move.

uncut viper
#

SDVpufferthumbsup sounds like a Lane of FitContents is what i need then

teal bridge
#

(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.)

tiny zealot
#

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

plucky reef
#

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?

lucid iron
#

man i wanted to use InteractMethod but it is unfortunately not a list hokuhands

teal bridge
#

InteractMethod?

#

Search engine is finding me nothing there

uncut viper
#

(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 🤷‍♀️)

lucid iron
#

machineData.InteractMethod

brittle pasture
#

I know, what's not a list?
or did you want multiple functions to be called when interacting with it?

lucid iron
#

so i am try to make a menu for turning machine rules on and off in game

teal bridge
lucid iron
#

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

brittle pasture
#

Ah yeah, that kind of use case is definitely not meant for interact method

tiny zealot
calm nebula
brittle pasture
uncut viper
#

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

teal bridge
#

Yeah, I wish GitHub let us categorize or organize our repos somehow.

lucid iron
#

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

uncut viper
#

i know it doesnt really matter to have them there, but i dont like em

lucid iron
#

tho it sounds bit silly to have a organization consisting of just you monS

teal bridge
#

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

calm nebula
#

Me myself and I can be an disorganization, you know

lucid iron
calm nebula
#

Past me and future me keep fighting

uncut viper
#

yeah if i could just separate all my stardew stuff into one list thatd be great and id do that instead

lucid iron
#

it'll be great and definitely not a pein trust :)

calm nebula
#

Clearly just make a github for your mods

teal bridge
#

You mean an entire GitHub.

#

A new hosting site.

#

AtraHub

uncut viper
#

github redux

calm nebula
#

Dear lord no

#

We don't trust Atra to do anything

rancid musk
#

Not even knit?

teal bridge
#

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)

lucid iron
#

hm what were we supposed to use instead of grabtile i forget

brittle pasture
#

tile?

teal bridge
#

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);
    }
lucid iron
#

what if i just use gettoollocation

teal bridge
#

Looks like that uses the last click location. If that's what you want...

cyan marsh
#

spacechase still around?

lucid iron
#

what does these 2 fields in machine item output do

"PreserveType": null,
"PreserveId": null,
teal bridge
#

Presumably sets the same fields on the output Object, no?

cyan marsh
#

seems not...

lucid iron
#

they just use FLAVORED_ITEM though

#

u can ping casey i think? if its urgent

brittle pasture
#

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?

teal bridge
#

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.

brittle pasture
#

modded artisan goods don't really care for it

next plaza
brittle pasture
#

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)

next plaza
#

(Still need to change my nexus name)

cyan marsh
#

oh...

next plaza
#

I can prove it by editing one of my mod pages or something if you need

cyan marsh
#

well i sent you a pm on nexus but let's take it to DMs for a bit

teal bridge
#

lol... you can't possibly be that spacechase0, it's unpossible!

lucid iron
#

is Logger.Monitor = Monitor; required for StardewUI?

teal bridge
#

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.

lucid iron
#

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

calm nebula
#

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

lucid iron
#

ah i think cjb item spawner broke, gives me terminate called after throwing an instance of 'PAL_SEHException' when i attempt to use

calm nebula
#

(Yes)

#

Linux modding is more or less fragile af

lucid iron
#

maybe i just gotta build it myself then

nova gale
#

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

teal bridge
lucid iron
#

@teal bridge is there a checkbox/togglable button?

teal bridge
#

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.

uncut viper
teal bridge
#

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.

silver pelican
#

hello! does anyone know where the specific icon for recipe is. That icon when you buy a recipe from the saloon.

uncut viper
#

very glad to know its possible and seems pretty easy!

teal bridge
#

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.

lucid iron
#

perhaps i ought to be using grid after all think

uncut viper
#

LGTM, push to prod

teal bridge
#

Haha, what are you trying to do? Lanes have vertical center alignment if you set them up that way.

lucid iron
#

still it's nice and ez to use 5/5

#

i made a vertical lane that has a bunch of horizontal lanes

teal bridge
#

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.

lucid iron
#

grid prob make more sense here anyways ill redo it tmr sleep

teal bridge
#

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)

lucid iron
#

yea hm

teal bridge
#

I think you are doing the right thing already, just need to set proper alignment and margin/padding.

lucid iron
#

ok sounds good

#

as for the back end impl of turning off a machine rule

#

i think i'd just do asset pipeline stuff?

teal bridge
#

Yeeeah... good luck with that.

lucid iron
#

store it to save file location

#

and hope no one else has late priority lol

teal bridge
#

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?

lucid iron
#

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

teal bridge
#

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?

lucid iron
#

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

teal bridge
#

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.

lucid iron
#

invalidate asset whenever we update the model

teal bridge
#

I really don't think there should be a physical file - just use SaveData

lucid iron
#

different file means they can uninstall my mod with no consequence tho

teal bridge
#

They can uninstall your mod with SaveData too.

lucid iron
#

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

teal bridge
#

¯_(ツ)_/¯
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.

lucid iron
#

Yeah it's more that I get bothered by the idea of leftover data when I uninstall mod

next plaza
#

(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

teal bridge
#

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.

lucid iron
#

If they didn't delete the file from save dir it's still there

teal bridge
#

There's no separate file in the save directory, it is the save file

next plaza
#

Some mods do put separate files in the save directory

#

(Pre-1.6 JA, SpaceCore)

lucid iron
#

I am considering making a separate file in the save dir yea

teal bridge
#

I mean SaveData isn't a separate file

next plaza
#

(Though SpaceCore is kinda a weird case)

lucid iron
#

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

teal bridge
#

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.

brittle pasture
#

or is it all or nothing

#

(the UI for that might be nasty though, so no rush)

lucid iron
#

I wanted this cus I had wildflour and my milk keeps becoming butter via mayo machine instead of cheese bolbonfire

#

Atm I just have a personal mod specifically targeting this 1 rule lol

plucky reef
#

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?

lucid iron
#

Are you using spacecore skills

plucky reef
#

Yes.

lucid iron
#

I think it handles that for you?

plucky reef
#

I'll find out soon enough I guess.

brittle pasture
lucid iron
#

There's also the logistics mod focustense was working on Bolb

#

I think it does have this type of filtering

teal bridge
#

It doesn't mess with machine inputs/outputs.

lucid iron
#

This type of filtering as in per item based filters

#

For sending stuff to and from places

teal bridge
#

Yes, filtering by item type and quality.

#

(and hopefully some less granular categories at some point, but I haven't gotten there yet)

lucid iron
#

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

teal bridge
#

Yeah - my sheds are all monomachines but if yours aren't then I could see that being important.

brittle pasture
#

somewhere center right

nova gale
#

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?)

lucid iron
#

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

nova gale
#

(y)

brittle pasture
#

though unless you're adding events to a location in your own mod loading a non-empty file is somewhat discouraged

lucid mulch
brittle pasture
#

like don't do it for vanilla locations that don't have events

mint isle
#

hello, i have a question.. uhm is spacecore broken rn? my game crashes bc of it

nova gale
#

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

mint isle
nova gale
#

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.

lucid mulch
#

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

nova gale
#

mostly to introduce the (admittedly pretty shallow :P) lore I've got going and sorta vaguely explain whats gonig on

old edge
#

what's the best track for a villain scene...

round dock
#

If it's an ominous scene, I'd reckon going for the track in the Ghastly Galleon from JK

old edge
#

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

teal bridge
#

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

uncut viper
#

SDVpufferheart thank you! im excited to start working on my next distraction

#

good to know about the .vs thing too

teal bridge
#

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.

brittle pasture
#

(quick answer: you need to mark the .sh file as executable with chmod)

teal bridge
#

(We don't care about the obvious piracy? Or does "Games Crack" mean something other than what I assume it means?)

brittle pasture
#

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)

teal bridge
dusty scarab
#

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

rancid temple
vernal crest
#

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
    }
  ]
dusty scarab
#

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.

uncut viper
#

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)

dusty scarab
#

yeah, that's why I thought that just adding in SpaceCore would have handled that, but it seems like it did not

uncut viper
#

spacecore only adds 4 CP tokens and none of them are something called "Category Overrides"

rancid temple
#

What are you trying to do?

dusty scarab
# rancid temple 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

uncut viper
#

they probably defined a config option called "Category Overrides"
either that or a dynamic token

rancid temple
#

They have either a config schema at the top of their content.json or dynamic token that defines that token

vernal crest
#

Check their content.json and find where they defined it

uncut viper
#

"Category Overrides" doesnt mean anything to content patcher unless you tell content patcher what it means

rancid temple
#

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

dusty scarab
#

you mean like this?

vernal crest
#

Yes

dusty scarab
#

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?

uncut viper
#

do you actually need the category overrides to be configurable?

dusty scarab
#

I just need them to change the category for 5 items, so probably not

uncut viper
#

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

dusty scarab
#

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

uncut viper
#

you've already done it. just remove the "When" part

dusty scarab
#

oh. well that's easy, at least, lol

uncut viper
#

"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

dusty scarab
#

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

uncut viper
#

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

rancid temple
#

!json

ocean sailBOT
#

JSON is a standard format for machine-readable text files that's used by Stardew Valley mods.

If you need help with a JSON file, you can upload it to smapi.io/json to see automatic validation and share the link here.

When making mods, it's recommended to edit your files in a text editor with JSON support, such as VS Code, Notepad++, or Sublime Text. These programs will check for syntax errors.

dusty scarab
#

luckily, my jsons are small

#

instead of outputting the PeppercornsDried, it's outputting the vanilla dried fruits item

rancid temple
#

You probably need to move your entry up

dusty scarab
#

move my entry up? do you mean the "Entries" field in my machines.json, or something somewhere else?

rancid temple
#

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

dusty scarab
#

ahh, okay, that makes sense

rancid temple
#

So after the } for Entries, you want another field called MoveEntries

dusty scarab
#

so I'm moving it just like I moved my seeds to be above Grass Starter in Pierre's shop, for example?

rancid temple
#

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

dusty scarab
#

{"Id": "RiftstalkerSekun.CropExpansion_PeppercornsDried", "ToPosition": "Top"},

this would be correct, yes?

rancid temple
#

Should be

dusty scarab
#

awesome, let's spin it up again and give it a whirl

dusty scarab
#

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

rancid temple
#

If I had to guess, something about your override entry is wrong

#

Or, ObjectExtensionData I guess it's called

dusty scarab
#

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

rancid temple
#

Well, it would have to be pretty wrong to throw errors on a custom asset like that

uncut viper
#

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)

rancid temple
#

Ah yeah, that would do it lol

dusty scarab
#

ok, how do I find out the item ID? I thought that item IDs were assigned dynamically now, rather than being static

uncut viper
#

its the complete opposite basically

rancid temple
#

Nope, dynamic assignment was a JA thing I think

uncut viper
#

you are the one defining your own item ID

#

presumably its RiftstalkerSekun.CropExpansion_Peppercorns

rancid temple
#

It's the entry key you put for your items Data/Objects entry

uncut viper
#

dynamic ids is back in the "modding is hell" days

rancid temple
#

Though, that probably made things a lot nicer lol

uncut viper
#

until you changed your modlist whatsoever

sudden scroll
#

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?

rancid temple
#

I guess I'm glad I never felt the need to use mods that added items before lol

vernal crest
#

Help I keep finding more things to test for writing dialogue questions. This is neverending >_<

dusty scarab
rancid temple
#

No clue, that was before my time here

vernal crest
#

How long have you been around, roku?

rancid temple
#

I joined the server and started modding right around the time 1.6 dropped lol

uncut viper
#

it wont get whatever this is though, thats ldarg.0

wise berry
#

Wait roku is cheeto now? ahaha

sudden scroll
#

I meant

wise berry
#

Grats

rancid temple
#

Yeah, finally hit purple name :P

uncut viper
#

JSON Shuffle w as a huge pain in the ass

vernal crest
#

Waaaat I thought you'd been around for ages

uncut viper
#

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

rancid temple
#

I've been a mod user for SDV for a while off an on, but not a dev for that long lol

uncut viper
#

leading to a lot of incorrectly textured, functioning, or outright broken items

sudden scroll
#
public static bool MyMethod(this GameLocation location) { /* . . . */ }
// OR
public static bool MyMethod(GameLocation location)
``` which one should be used?
vernal crest
vernal crest
uncut viper
rancid temple
#

I'm a fast learner lol

#

And enjoy helping, so often I jump straight from learning to helping as soon as I can

uncut viper
#

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

sudden scroll
#

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

uncut viper
#

what function is the original code from?

sudden scroll
#

FarmAnimal::updateWhenNotCurrentLocation

dusty scarab
#

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

sudden scroll
round dock
#

@vernal crest Abaaaa I'm finally done w STP's edits ^_^ can i ping u later (soon) in the thread

uncut viper
# sudden scroll

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

rancid temple
#

Not something I've heard of before either lol

uncut viper
#

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

sudden scroll
#

I tend to think of extension methods as adding instance methods hence the confusion 😛

uncut viper
#

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)

formal crown
rancid temple
#

Oh, Casey does this in SpaceCore

#

I was wondering how she did that

formal crown
#

For most cases the other will be more use

sudden scroll
#

Gotcha! Thank you everyone!

round dock
#

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?

vernal crest
#

Yeah he was originally named Josh

round dock
#

joshMessage confused me a lil bit SMCKekLmaoDog

uncut viper
#

yeah i think alex is josh

vernal crest
#

His house map is called JoshHouse

round dock
#

He does give Josh energy so it makes sense (sorry to the Joshes, I mean no offense)

rancid temple
#

Is there a mod that makes his name Josh again? Lol

vernal crest
#

For some reason I find that so much easier to remember than remembering that Marnie's house is called AnimalShop

rancid temple
#

What about ArcheologyHouse?

vernal crest
#

Oh yeah that one is terrible lol

uncut viper
#

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

round dock
#

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?

rancid temple
#

I always default to animal shop should be the shop where you buy animals lol

uncut viper
#

like pets

finite ginkgo
rancid temple
#

Strings all the way down

dusty scarab
#

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?

uncut viper
#

qualities are ints

#

0, 1, 2, and 4

formal crown
uncut viper
#

for normal, silver, gold, and iridium respectively

dusty scarab
rancid temple
uncut viper
#

gonna make a mod that renames pierres place to SeedChurch

vernal crest
#

I look forward to one day making my own game and ending up with all the same sorts of silliness.

wise berry
#

Aba game? :o

vernal crest
#

Yeah one day I want to make yet another Stardew clone but with a heavier focus on - wait for it - NPC interaction xD

wise berry
#

Ehehehehe

rancid temple
#

Yap Quest /j

vernal crest
#

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.

wise berry
#

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

vernal crest
#

Nice!

#

I intend to go at "chronic fatigue disorder" speed, which means it may take the rest of my life to do it lol

wise berry
#

Waahh

vernal crest
#

But I will let you know if I ever predict a more concrete project developing

wise berry
#

I'll still be watching Hiria's progress ehehe

vernal crest
#

Yes she is definitely the priority

#

After this question tutorial

dusty scarab
woeful lintel
#

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");
rancid temple
#

Maybe a harmony_summary will show what you want?

silk river
#

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

rancid temple
#

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

uncut viper
#

it does show manual patching (with priority too) on the Basics page

sudden scroll
#

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)

silk river
rancid temple
#

Because the wiki hides modding pages intentionally lol

uncut viper
#

if its a custom profession then i assume you'll need SpaceCore's API

rancid temple
#

You can search modding:search term to tell it to show you modding stuff

sudden scroll
#

I see this

#

I'm just not sure how to get all the players

rancid temple
#

Iterate over all the players and check each one

sudden scroll
#

Game1.player gives the current one, and I imagine there's a better way than iterating over all locations and their .farmers?

rancid temple
#

You'd be surprised, but there might be

uncut viper
#

just use getAllFarmers()

#

Game1.getAllFarmers

sudden scroll
#

Oh

meager mantle
#

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?

woeful lintel
#

C# reflection?

woeful lintel
#
StardewValley.Objects.BedFurniture.IntersectsForCollision
      - Espy.PreciseFurniture (postfix)
      - leroymilo.FurnitureFramework (postfix)
rancid temple
#

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

uncut viper
#

did you have both the First priority and the Before argument at the same time?

meager mantle
# woeful lintel C# reflection?

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.

woeful lintel
brave fable
#

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

rancid temple
#

GameLocation has CanPlantSeedsHere

brave fable
#

that was in 1.5 too alongside isViableSeedSpot SDVpufferfush

#

oh wow GetHoeDirtAtTile might actually do what i need though

#

or not

meager mantle
rancid temple
#

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

meager mantle
#

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?

vernal crest
#

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

Stardew Modding Wiki

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!

frigid hollow
#

Is there an example of how exactly the Skins field works in animal data? Specifically, how does the skin ID work?

rancid temple
#

Should just be the unique identifier for that entry in that list

frigid hollow
#

so i can just straight-up name them the variants and not have any ModID prefixes

rancid temple
#

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

woeful lintel
#

My first DP!

#

@inland cedar does the last update of Market Town includes the support for multi-slots Furniture made with the Furniture Framework?

frigid hollow
#

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

drowsy pewter
#

its stuck

#

they need the right door size

frigid hollow
#

aight gonna need a custom building then

crude sapphire
#

someone should make a magical barn door that lets them all pass xD

sudden scroll
#

Is there any standard way to do rng in Stardew modding?

paper sundial
#

Game1.random or Utility.CreateRandom to make your own

sudden scroll
#

Thank you :3

calm nebula
#

But also I wanted internal types

#

This was sufficient

drowsy juniper
#

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)

tiny zealot
#

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

drowsy juniper
#

hmm alright

tiny zealot
#

steam, gog, and xbox game pass are all equally viable, and maybe there are more but i can't recall them if so

lucid iron
inland cedar
meager mantle
# calm nebula https://github.com/atravita-mods/StardewMods/blob/1db0a9587f1f5963a2f7e09ebd4082...

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.

fathom hound
#

Hate when I have an expansion mod idea, but have no clue where to start SDVpufferwaaah

shadow vortex
#

Yeah I have a few ideas like that.

fathom hound
#

How do people start???? Do they draft ideas for NPC’s/quests/map layout??

plucky reef
#

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.

fathom hound
#

Thanks that’s really good advice even in general

shadow vortex
#

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.

plucky reef
#

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.

tiny zealot
#

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

calm nebula
#

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

plucky reef
#

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.

woeful lintel
#

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?

finite ginkgo
#

Hm, how are textures defined in FF?

lucid iron
#

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

frigid hollow
#

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

brittle pasture
#

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)

woeful lintel
#

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.

lone ice
#

Does anyone know if there is a way to make an npc's default location (sleep/wakeup) on an outdoor map like Forest?

eternal mortar
#

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

fluid marsh
#

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.

brittle pasture
eternal mortar
brittle pasture
eternal mortar
#

anyone know what tile sheet the scarecrows are in?

finite ginkgo
#

TileSheets/Craftables

lucid iron
#

what is this thing

brittle pasture
#

A "Ritual Mask" apparently

#

(BC)73

#

no wiki entry, must be unused

lone ice
#

horrifying 🤣

plucky reef
#

same mask as the shadow shamans

#

that the crows are scared of the rarecrow must mean that they pop above ground now and then

lone ice
spice inlet
vernal crest
lone ice
#

That's what I tried but it keeps trying to default to AnimalShop and ignores Forest

#

even though the coordinates don't make sense 🤣

hallow prism
#

did you had it in animalshop previously?

#

did you sleep several days to reset stuff properly?

#

can you show the code?

vernal crest
lone ice
brittle pasture
lone ice
#

I don't know how that happened

#

but you're right

lone ice
#

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

lone ice
hallow prism
#

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

silver sand
#

please did anyone figure a reliable way to test|| trinkets|| Im getting carpool tunnel sybdrome

hallow prism
#

test what about them?

silver sand
#

like ||fairies|| for example

#

or do I just have to make new saves everytime and spend 5 minutes getting ||mastery||?

hallow prism
#

i still don't have enough context

plucky reef
#

what's stopping you from getting the mastery and then sleeping?

lucid iron
#

you can just debug yourself the needed exp

#

only gotta do it once

next plaza
#

debug specials

#

Should unlock the trinket slot

#

(If I remember correctly)

silver sand
#

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?

hallow prism
#

can you give the full details of what you need to do like why do you need to test all colors??

lucid iron
#

that's based on your multiplayer id

fathom hound
#

is it random? i thought it was in regards to player number, oops

next plaza
#

It's based on the player ID

fathom hound
#

bah that's what i thought SDVkrobusgiggle

lucid iron
#

but also you can just editimage targeting your own fairy

next plaza
#

But it's still random

#

You can set that with C# or save editing I guess

fathom hound
#

ah i see

lucid iron
#

change it to the right position later

silver sand
#

and that's not changeable at all?

next plaza
#

(Console Code script: cs Game1.player.uniqueMultiplayerID.Value = 123;)

fathom hound
#

would modifying that change other things relating to player ID, out of curiosity.. like cabins?

lucid iron
#

wow what u can just put c# through debug console this whole time bolbpopcornhat

silver sand
#

I guess that it would

next plaza
next plaza
#

Not sure what all they would be though

fathom hound
#

I see, thanks!

silver sand
#

ok ty

next plaza
silver sand
#

oh oop Console Code is a mod

#

why did I think it was a program

fathom hound
teal bridge
#

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?

weary spindle
#

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

brittle pasture
velvet narwhal
weary spindle
#

ohhh okay i see

#

ghank yoy

rancid temple
#

Tempted to make a command for that, dunno what else to put than the link though

velvet narwhal
#

it's all links unfortunately

#

so it'd be pretty gnarly as a command lmao

rancid temple
#

I mean converters is an insane list of links lol

plucky reef
#

with "CanVisitIsland": true, does it need an explicit schedule or do they just go there sometimes.

rancid temple
#

What other links are there for NPC creation?

brittle pasture
#

(I know Hades comes out after SDV but it's the closest comparison lmao)

teal bridge
#

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?

brittle pasture
#

I did it by pinging Pathos

rancid temple
#

It looks like it also randomly removes possible visitors for the island

teal bridge
#

Ok, thanks.

velvet narwhal
#

if i didn't hate wiki formatting i woulda just copied pasted 1.6 into npc data but SDVpufferpain

rancid temple
#

I have that backwards, it randomly adds 5 valid NPC's

lucid iron
#

anyone know about a standalone version of this X

teal bridge
#

Might be too big, but there's one next to the clock in Cursors.

brittle pasture
#

There's a big red X in cursors you can usr maybe

velvet narwhal
#

the only other x i see is in emojis

teal bridge
#

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.

lucid iron
#

yea i can use it but it is so HD blobcatgooglyblep

#

ill just try it, ty

teal bridge
#

Is this for the checkbox?

#

Because if it is, there's a separate sprite for that with a green X, on menutiles.

lucid iron
#

no its for !context_tag

teal bridge
#

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.

lucid iron
#

oh that is lighter yes DokkanStare

#

wow shorts

round field
#

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"
        }
       ]
      }
     }
},
rancid temple
#

Format probably needs to be at least 2.0.0

#

!codeblock

ocean sailBOT
#

You can embed code in Discord using a series of three ` :
```
Your code can go here
Even if not a haiku
Just an example
```

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

round field
#

Let me try that. Thanks!

rancid temple
#

!json though realistically, I'd prefer them sent through here

ocean sailBOT
#

JSON is a standard format for machine-readable text files that's used by Stardew Valley mods.

If you need help with a JSON file, you can upload it to smapi.io/json to see automatic validation and share the link here.

When making mods, it's recommended to edit your files in a text editor with JSON support, such as VS Code, Notepad++, or Sublime Text. These programs will check for syntax errors.

round field
#

It's kinda weird cause she shows up in Town instead of Leah's house though.

rancid temple
#

Surprised she shows up at all, though I dunno how dispositions were handled before

ornate trellis
#

town is the fallback spawn when yours is messed up i believe

round field
#

I see. I gotta figure this out lol

rancid temple
#

Better than just not spawning them or dropping them in the void at least lol

ornate trellis
#

yea

rancid temple
#

Wonder if the log kicks back anything about it though

latent mauve
#

You may also need to sleep a day to reset the Home if you're modifying it

velvet narwhal
#

it never tells me when i've screwed something up SDVpufferpain 'other' homeregion is a painful beast

rancid temple
#

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

round field
#

Gotcha. Let me try that too.

eternal mortar
#

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?

round field
#

Nahh, she's still in town. 😂 This thing is kicking my ass.

ornate trellis
#

seems like you got a bracket issue

rancid temple
#

!vsc I suggest a text editor with validation

ocean sailBOT
ornate trellis
#

thats why its always good to throw it into the validator

viscid marten
#

wanted to make a character mod, is this a good character portrait to start off?

silver sand
#

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

ornate trellis
#

is this from the portrait maker

silver sand
#

yes

velvet narwhal
#

#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

ornate trellis
#

credit should always be given then

silver sand
#

but its a good placeholder

ornate trellis
#

yea

rancid temple
#

You'll need to make all the other required portraits too

#

Unless you want it to just blank out lol

silver sand
#

or just write stuff

rancid temple
#

Or stare at you the same way

viscid marten
#

it was a placeholder to start

ornate trellis
#

then as mentioned above credit should be always given

#

its an alright placeholder tho

viscid marten
#

yeah i thought it would have put the credits like on the top right corner but i will insert them myself

velvet narwhal
#

SDVpufferthink 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"?

rancid temple
#

Yeah, I'll have to give it some more thought when I get back home later

next plaza
#

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);
                    }
                }
round field
next plaza
#

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)

rain summit
#

Hi

calm nebula
#

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

rancid temple
#

Oh right, there's already an npc command, I can just add a few more links to it lol

rancid temple
#

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

vernal crest
#

Yeah Kat's stuff is good but only if you already know enough to sift through what's not relevant anymore.

rancid temple
#

I think I made Gov mad

velvet narwhal
#

two commands, in a WEEK?

rancid temple
#

!npc I think I have to give up on making that last link sit in the right place

ocean sailBOT
#
Creating a Custom NPC

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:

  1. Tiakall has a great tutorial on making a custom NPC for 1.6:
    https://stardewmodding.wiki.gg/wiki/Tutorial:_Making_a_Custom_NPC

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

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

  4. Aviroen has put together a template that will allow you to easily create a romanceable NPC:
    https://stardewmodding.wiki.gg/wiki/Npc_template

vernal crest
#

Nice!

velvet narwhal
#

i no longer have an obligation for cheeto, a lot of the jargon from the github would be lost on my brain SDVpufferclueless

rancid temple
#

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

vernal crest
#

To feel included!

velvet narwhal
#

nuh i want those shorts aSDVpufferrise

rancid temple
#

It was shot down (for now), but very funny

velvet narwhal
#

blissfully unaware it's an unknown private thread

calm nebula
#

You basically only want the repo for the history tbh

rancid temple
#

Huh

vernal crest
#

Oh you do miss out on our super secret thread by not getting Cheeto

rancid temple
#

It's from the server suggestion forum, didn't know that was locked

lucid iron
#

The nice thing about repo is being able to look on the phone

rancid temple
#

It was a suggestion for a Despercheeto role SDVpufferchickmayor

lucid iron
#

But u can just snipe nerds here

vernal crest
#

Addicted to Stardew. Must access everywhere.

velvet narwhal
#

y'know that'd be a strong temptation if it was despercheeto

brittle pasture
lucid iron
#

Well view raw is uh

#

Usable

calm nebula
sudden scroll
#

How would I make SpaceCore use a shorter version of the custom skill name on the skill page?

calm nebula
#

(You think I'm kidding but I do have a near photographic memory)

velvet narwhal
#

i imagine that's helpful for knitting

lucid iron
brittle pasture
sudden scroll
#

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

brittle pasture
#

ah, dunno then. might need a feature request with casey

sudden scroll
#

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

lucid iron
#

meteomancer

sudden scroll
#

Hm, maybe NewSkillsPage:721

#

Seems about right

lucid iron
#

You can just make a PR

#

Maybe run idea by Kittycatcasey first

sudden scroll
#

I could, or I could try to do it regardless of the obstacles so I can learn more :3

lucid iron
#

I do think weather witch is bit out of place against other vanilla skill names tho

sudden scroll
#

Sidenote, I'm guessing ~half of my code is either cursed in some way or just Not How You're Supposed To Do Things™️

lucid iron
#

Mostly cus witch is generally a gendered term

finite ginkgo
sudden scroll
#

Oh I am in fact stupid™️

#

yes, that'd work 😛

rancid temple
#

Isn't as quippy as the double W Marvel-special-naming-convention

velvet narwhal
#

'meteorologist mage'

rancid temple
#

Mweather Mage /j

sudden scroll
#

I'm gonna be honest I don't quite care
If Pathfinder can have a Witch class, I can have a Witch skill 😛

rancid temple
#

For sure, gender norms are for losers

sudden scroll
#

If someone sees that term as gendered and they don't like it, just don't play with the mod lol

velvet narwhal
#

i can really only think of 'man look at those warlocks' and i just can't get out of that headspace

rancid temple
#

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

sudden scroll
#

I think Meteorologist/Meteorology wouldn't fit anyway lol

velvet narwhal
#

the urge for a necro wand

rancid temple
#

Yeah it's pretty long lol

sudden scroll
#

Archaeology barely fits

velvet narwhal
#

writes that as another wishlist

frail plank
#

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?

lucid iron
#

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()
hollow hazel
#

Would this work with the appearance code?
"Condition": "PLAYER_NPC_RELATIONSHIP <Any> <Elliott> <Married>",

velvet narwhal
#

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

lucid iron
#

no < >

sudden scroll
#

I'm so sorry to whoever staff is untiming me out 😅

#

I shall politely avoid any discord markdown features lol

lucid iron
#

are you getting hit by masked links

velvet narwhal
#

markdown gets us all, it's just the automatic timeout

sudden scroll
#

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

finite ginkgo
#

I don't think bald was the issue, it was probably the subtext

sudden scroll
#

I dunno, automod weird

lucid iron
#

its to avoid scammers posing as discord i think

sudden scroll
#

Ah right

#

that

#

Fair point

hollow hazel
rancid temple
#

There's so much markdown stuff for Discord I have no reason to use lol

sudden scroll
#

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

next plaza
#

Does it appear when you sleep and pick your professions?

sudden scroll
#

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

next plaza
#

Hmm, did you put your professions in Professions and ProfessionsForLevels?

#

On the Skill subclass

#

And did you set ExperienceCurve

sudden scroll
#

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

frail plank
paper sundial
#

Now to get started on the long taks of running through all my mods and seeing what needs updating for 1.6.9 SDVpufferchickcry

brittle pasture
#

🤔 isn't indoor items already supported by the base game

next plaza
sudden scroll
#

Oh, I see

#

I didn't even know about that one lol

#

I use XP Display

#

Noted

paper sundial
#

(You'd think I'd learn to check before spending time on this stuff pepecry)

#

At least I have upgradeable buildings... right...?

paper sundial
calm nebula
#

Just undergo a mental breakdown and decide you want something different in your life instead SDVpufferthumbsup

paper sundial
#

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

ivory plume
#

(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.)

lucid iron
#

what does this imply to you think

uncut viper
#

truth be told i have no idea what that would imply to me i think

lucid iron
#

the context is machine rules

vernal crest
#

There are notes written about gemstones. Prismatic shard is bad! Or not allowed.

lucid iron
#

its the crystalarium rules

vernal crest
#

I think if I knew I was reading crystalarium rules I would go "okay, Prismatic Shard isn't allowed but the others are"

uncut viper
#

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

lucid iron
#

unsure how to depict context_tag

#

atm its just pulling the first item that has a given context tag, using item query

uncut viper
#

what does the paper note represent?

lucid iron
#

that this is a context tag, not real item

uncut viper
#

oh

vernal crest
#

Yeah I don't think I got that

uncut viper
#

i wouldve 100% assumed it was saying something about those specific items

lucid iron
#

for ref the real item exact items dont have the little note icon

uncut viper
#

i like the way minecraft mods do it which changes the icon shown between the different things in that category every second ish

lucid iron
#

that seems terrorfy with large crop mods think

uncut viper
#

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

vernal crest
#

A user isn't going to know what a context tag is anyway. Is this for normal mod users?

uncut viper
#

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)

lucid iron
#

gotta see if i am allowed to swap the image then

teal bridge
lucid iron
#

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

uncut viper
#

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

lucid iron
#

i feel ok just showing context tags cus this is level of detail lookup anything has

uncut viper
#

(wrt transparency thing i mean the sprite beneath the paper note but keep the paper note solid)

lucid iron
#

yea like recipes right

#

seems reasonable

uncut viper
#

tbh i didnt remember recipes did that but yaya like that

lucid iron
#

oh i think recipes just drew it smaller

vernal crest
#

Is there any way to draw a legend on the screen?

lucid iron
#

like the fish?

#

perhaps
spacechase0.SpaceCore_ShowHudMessage "message goes here" optionalQualifiedItemIdForIcon

brittle pasture
lucid iron
#

hm but it says 3f for scale