#making-mods-general

1 messages · Page 25 of 1

worthy rose
#

i can imagine

#

its reverse engineering

#

at least required to reverse engineer most things, iirc

uncut viper
#

i dont know if id call it that since we can get the code in both C# and IL form, more so just normal engineering your own IL

worthy rose
#

like thats how mods for stuff like Valheim that arent at all mod friendly even come to be

uncut viper
#

and sticking the IL where you want it

worthy rose
#

so what is a use case example

lucid iron
#

hm there's no way to make a string field on a record modifyable right

worthy rose
#

and why couldnt we just use regular c# in those cases

uncut viper
#

if you want to change one line of code inside a bigf function that does a lot of things

#

then you want a transpiler (which puts in IL)

worthy rose
#

ooo interesting

lucid iron
#

do i just change it to string builder LilyDerp

worthy rose
#

that is neat

teal bridge
rancid temple
#

Technically, as long as you don't try to inject your IL where they've injected theirs, you should probably be fine

uncut viper
#

otherwise, with Harmony, you can only do something after that function, or before that function and stop the original from running at all

teal bridge
#

Unless you mean the backing field underlying the auto-prop.

worthy rose
#

then if you wanted any part of that original function, youd have to re-write it, in that insatance

uncut viper
#

but stopping the original from running is a problem if someone else wants to do stuff with that function too

lucid iron
#

i prob meant property sorry blobcatgooglyblep

uncut viper
#

and yeah, you'd have to rewrite basically the whole function

worthy rose
#

makes sense to me

#

thats a can of worms

lucid iron
#

basically i have this thing representing 1 icon + decorations

internal record RuleItem(
    List<IconEdge> Icons,
    string Tooltip
);
worthy rose
#

so IL actually prevents headache youre telling me

#

thats pretty cool

teal bridge
#

There's no way to make a read-only property writable because a read-only property is just literally missing the setter method... it's not an access modifier, it's a thing that's not there.

uncut viper
#

thankfully if you ever get that far its still easier than the dumb stuff im doing with IL

lucid iron
#

and i wanted to modify the Tooltip of the final RuleItem

worthy rose
#

yeah i was gonna say doesnt sound like ur having fun tho lmao

lucid iron
#

after its first init

teal bridge
#

The field, on the other hand... well, reflection ignores readonly entirely, so there's that.

worthy rose
#

it just made me think of IL2cpp

#

and idapro

lucid iron
#

maybe i just make it a List<string> its fine

teal bridge
#

So if you need to write to a record, I believe you could find the backing field and write to that, though it's in gross violation of how records are supposed to work (but hey, we don't care about that).

uncut viper
#

(in my case im not writing transpilers, im building entirely new functions out of IL code, and determining which IL opcodes to place based on parsing strings defined in a Content Patcher mod... and then sending those newly built functions to Harmony to turn into Harmony patches)

worthy rose
#

so youre a contributor to the api as a whole?

uncut viper
#

so just entirely forward engineering of functions from scratch

lucid iron
#

yea ill take the list overhead LilyDerp

uncut viper
#

oh god no im way too dumb for that

worthy rose
#

lmao

teal bridge
#

Good choice.

worthy rose
#

doesnt sound dumb at all
"im way too dumb"
myKindOfProgrammer.jpg

brave fable
#

ignorance is wisdom ✨

worthy rose
#

me as a python architect every day

uncut viper
#

i can hold my own with some basic reflection stuff but trying to make something like SMAPI work (or even just Content Patcher) would be beyond me

#

(especially considering im still making mistakes like, yknow, checking to make sure my postfix isnt actually concetanating twice and is instead just being called twice intentionally)

worthy rose
#

i just think were all pretending we got it more together/uderstood than we really do and deep down were all like AHHHH WHAT IS THIS CRAP at least once a day

teal bridge
#

Speak for yourself.

lucid iron
lucid iron
#

aka home automation that involves too much EE for me

worthy rose
#

i didnt know there was a programming off topic, thanks. man my smapi keeps stuttering and ive no idea why

lucid iron
worthy rose
#

ive done affinity shutting off core 0

#

its even when my mod isnt loaded

#

so i think its a pc issue

teal bridge
lucid iron
#

man i am like

#

vaguely tempted to make Lookup Anything 2: now with resizable UI

worthy rose
#

no no, thats why i mentioned it because, its with smapi, but with 0 mods

#

but yeah ill google

#

nbd

rancid temple
uncut viper
#

(that would still be in the support channels)

worthy rose
#

Lookup anything is god tier

lucid iron
#

i have a wip PR for LA that added links and uh, the way i did it was to just record a bunch of rects for use in the top level handle click menu

rancid temple
#

If adding a scroll bar wasn't actually a huge PITA, I would have definitely already made a PR for that lol

uncut viper
worthy rose
#

where do the links go?

#

wiki page?

teal bridge
#

(Adding a scrollbar is easy in <shilling redacted>)

lucid iron
#

dw ill shill StardewUI to everyone doing ui from now on

rancid temple
#

This is where being allowed to use masked links would be great

teal bridge
#

It was just a little self-deprecating humor, wasn't trying to avoid moderation or anything.

worthy rose
#

maybe stardew UI can help me here

lucid iron
#

are you making a menu

#

i thought you just wanted hotkeys

worthy rose
#

i have a thing pop up to say press any button and its kind wack

teal bridge
#

It's not just for menus FYI - I did the fishing balloons using the same system.

lucid iron
#

oh you prob want GMCM for this

teal bridge
#

Will GMCM allow you to bind d-pad buttons? Never tried doing that...

worthy rose
#

hmmm

lucid iron
#

i thought it just accepts the key signal

worthy rose
#

ive had bmcm before

#

thats not a bad idea actually, you just madae me realize how silly it is to even have to press a weird button combo to assign a key

uncut viper
#

i dont think GMCM cares what button you use for it for the most part (just Esc i think?) but i could be wrong, been a while since ive done keybinds

teal bridge
#

There are some keybinds you definitely can't do, like the A, X and B buttons.

worthy rose
#

i just use GMCM, player can set their keys in there, then theres no accidental pressing the 2 bumpers simultaneously and bringing up the thing

teal bridge
#

Not sure about d-pad.

worthy rose
#

what about outside of GMCM, with my thing, can i do those buttons? i htink i can, but id prob want to do them in combination

lucid iron
#

well as long as you have the config.json

worthy rose
#

im thinking instead of dpad, hold back and hit face buttons, for example

lucid iron
#

you can just type the key names in there

teal bridge
#

It's not that GMCM cares about them per se, just that the way GMCM is written, it doesn't understand them being pressed in the keybind popup.

worthy rose
#

is it beacuse its within a menu?

#

like since those buttons say, go back, select, etc

brittle pasture
#

just tested

worthy rose
#

what is it

brittle pasture
#

that's the GMCM menu for one of my mods

worthy rose
#

oh nice so it worked with a combo with X

#

man thats some cool stuff

teal bridge
#

My mistake X button can be bound, just not A or B.

worthy rose
#

ohhhhh gotcha

#

what about in combination, im going to try with mine see how it goes

#

now i gotta figure out how to listen for combos

brittle pasture
#

B works as well
it's just A since that triggers the exit button

worthy rose
#

without knowing what buttons they will be, etc

brittle pasture
#

(woops wrong pic)

lucid iron
#

it allows you to do 2 keys yea, but you just cant have distinct keys for the list

teal bridge
#

Although the GMCM style is a little backward here, as this is more about having permanent functions defined for the D-pad buttons and assigning slots to those functions, not the other way around (having slots and binding buttons for them). You can sort of make it work in reverse, but it's awkward.

brittle pasture
worthy rose
lucid iron
#

oh are you doing the zelda thing but with tools Bolb

worthy rose
#

yeah pretty much

#

but like ff xiv on console, or like, cook serve delicious on controller

#

as an optional way to do it

#

but i think for me id just use dpad

#

but i want now for people ot be able to be like, hold left trigger, hit any face button, 4 diff binds there

#

so i gotta make it look for combos too

#

"this will be simple" is no longer simple

#

i started thinking of caveats 10 minutes in -_-

lucid iron
#

thats how it starts bolbsunglasses

#

well gmcm is prob fine as a start, you can come back and make a custom config menu later

worthy rose
#

true

#

truuue

brittle pasture
#

hmm you can define a modifier key and the 4 additional keys

worthy rose
#

yesss

#

thats what i think would be rad

#

cuz pictureing, lke 4 diff meals (energy potion, health potion, salads, spicy eel), 4 different offensive items, (chery bomb, mega bomb, regular bomb, sword)

#

then like another modifier for pickaxe, hoe, desert totem, farm totem

#

i dont wanna go all out tho, i want it to be any slot people want, so staircases, whatever

#

seeds, idc

#

making specialty slots just for weapons and stuff is a cool idea but someones had to have done that, right?

#

like standalone bomb slots (that still eat a backpack space so its fair)

#

thatd just be visual flair anyway

teal bridge
#

I just did the radial menu. Stardew isn't such a quick-reflex game that you need various binds and combos and chords. But like I said, personal preference and all.

worthy rose
#

oh is that your mod? or just what you use

#

its slick

#

but im too invested at this point

teal bridge
#

If you want binds, make binds. You'll have to deal with the cases where tools change which slot they're in, or when they're no longer in the player's inventory.

worthy rose
#

yeah i think id probably let them know? dont want to nag tho

#

was considerinmg that ,should i maybe just unset bind if they move it>?

#

or should i make the bind stick with the item

#

decisions decisions

#

now im picturing zelda

#

and havei ng like a little ui spot that says select modifier key

#

then in the directions you choose what you want on abxy

#

and you can use l1, l2, r1, r2, l3, r3, select as your modifiers

#

so a possibility of 28 binds

#

but then id have to make all that UI . -_-

#

thanks for helping me with this btw you guys are GOAT'd

#

why cant i do if e.Held.Count() > 1
e.Held[1]

#

do i have python brainrot

teal bridge
#

28 binds... you can barely have that many items in your inventory.

worthy rose
#

yea yea, its overkill

#

its just the option

#

dont have to use all of em

lucid iron
#

hm can i change the font of drawTooltip

brittle pasture
#

which ones? font is a parameter in some of them, or the draw functions they call

plucky reef
#

would stardewUI work for uh... not sure the term. I want to make a building where you right click it and it opens a crafting menu but not the one in the regular menu.

lucid iron
#

IClickableMenu,drawTooltip

brittle pasture
#

it calls drawHoverText which passes in Game1.smallFont

lucid iron
#

looks like we'd have to use that instead yea

brittle pasture
lucid iron
#

i have a easier idea, make your buliding a milll

plucky reef
#

pressing e and then going to that tab is regular crafting menu. I want a crafting menu thing specific to this building.

lucid iron
#

put stuff in get stuff tmr

plucky reef
#

It'll be for "infusing" weapons and slingshots into the harpsword.

lucid iron
#

yep that takes whole day trust

plucky reef
#

I mean it could I guess, juminos work overnight to tape the galaxy sword onto a harp.

teal bridge
brittle pasture
#

you only need a to make a content pack with JSONs

plucky reef
#

I say building since it isn't a machine and will have an interface, I don't know if there's a better term.

lucid iron
#

oh hm idk if the ItemConversions stuff support combining 2 items actually

brittle pasture
#

no it doesn't

plucky reef
#

I will keep better crafting in mind, the other mod I was looking at was mystical buildings

brittle pasture
#

I briefly considered it as a bonus thing for EMC

lucid iron
#

yea rip junimos can't glue the harp to the sord

brittle pasture
#

but machine rules? sure go wild

plucky reef
#

it's a ways out. Combat core, then skills, then the rest of the spells, then the events and buildings/recipes.

lucid iron
brittle pasture
#

probably not, since the recipes only exist in BetterCrafting, not vanilla

#

but I might be wrong

teal bridge
#

Think I figured out a way to make the cave fishing (and other fishing, to a lesser extent) less time-wasting but still fair: recast to reroll. You can continually cast and cancel (not waiting for a bite) to try to target a specific fish, and each roll is every bit as random as vanilla, so you might have to cast 20 times to get an ice pip and burn up most of your energy in the process, but it takes 1 in-game hour instead of 10 and doesn't require burning up all bait and tackle in the process.

It's probably going to be considered a cheat by many regardless, but curious if there are any thoughts about balance. Maybe I should put it behind the sonar bobber so you can only do this while it's equipped? Shelling out the cash for an Iridium rod in mid-Spring is a painful choice, but on the other hand, would allow you to make it up pretty quickly while grinding for a few of those essential jellies.

lucid iron
#

is TailoringMenu.GetDyeColor seriously the correct place to get item colors from LilyDerp

brittle pasture
#

yeh

uncut viper
#

could always parse the context tags yourself if ya want

brittle pasture
#

(that's what I use~~, and that will be what 1.6.9 uses for machine copy color~~ wait actually looking at the decomp 1.6.9 duplicates its logic in the copy color code for some reason, so in a way it uses it, but not directly)

uncut viper
#

(i also use it except when i don't)

lucid iron
#

ill use it i just didnt expect it to be in a menu monS

brittle pasture
#

gating it behind sonar bobber could make it balanced

teal bridge
#

Yes probably - once you're off getting enchantments, fish-smoking is merely recreational.

plucky reef
#

yeah sonic bobber sounds good, since that bobber is otherwise not very used.

brittle pasture
#

I heard smoking lava eel is a legit late game strat to make big bucks

teal bridge
#

It's actually not - not in vanilla, anyway.

#

Targeted bait is not really profitable because the only alternative is trash, so you recoup nothing from "misses".

brittle pasture
#

true. what about one layer up (ice pips/ghostfish)?

teal bridge
#

You might get perhaps 10 lava eels in a day if you're really lucky? Which isn't bad, I suppose, but it's much worse than conventional money-making strats.

plucky reef
#

I thought the strat was lava eel fish pools.

brittle pasture
#

the thing about other money making strats is that they primarily use crops/machines right? so you have to wait around anyway

teal bridge
#

Yeah, lava eel ponds are not bad (but compared to spending that space on a shed full of kegs, still not nearly an optimal profit strategy, just decent).

#

I mean, if we are talking minmaxing then your thousand kegs will be running 24/7.

brittle pasture
#

unless at one point you have so many sheds and kegs you spend all your time running around collecting them (and resources to make them)

#

yeah

gilded comet
teal bridge
#

Late-late game strategies include the garden pot shed to keep up with insane levels of kegging (like filling 2 sheds + quarry + desert + railroad)

#

I use Automate, so I don't run around collecting from kegs. Maybe it subtracts a point from my "balance" cred but Stardew gets too tedious without it.

brittle pasture
#

yeah there's a fine line between fun and balance. I do use AutomateChests (need Hoppers to activate Automate) to make that line finer

gilded comet
teal bridge
#

To me, the fun is the planning and expansion. Where will the resources come from, how can you keep inputs and outputs balanced, what territory is available, etc.

brittle pasture
#

ItemContextManager.GetColorFromTags doesn't handle colored objects. the dye menu function does (and in fact calls GetColorFromTags for uncolored objects)

uncut viper
#

(oh i lied earlier its GetColorFromTags that i use lmao)

teal bridge
#

The fun is not the drudgery of hauling items from point A to point B. That's called fetch quests, haha.

uncut viper
#

(luckily i didnt need to care about coloured objects for my use case of it)

teal bridge
#

Anyhoo, maybe I'll sonar it. Would make sonar go from totally useless item to pretty OP item, but it does totally fit with the idea of "sonar" as not just some lame thing that lets you see which fish is on the hook but actually lets you scan the surroundings.

gilded comet
#

are flowers of the same type but different colors of type ColoredObject or

brittle pasture
#

yes

gilded comet
#

thanks!!

#

i should have just remembered looking at the object tilesheet

teal bridge
#

(With apologies to Button for essentially making "even better sonar bobber")

uncut viper
#

better is always subjective! to me id rather a new bobber. wont stop me from calling my own better than vanilla though, i think the vanilla one is, as you say, utterly useless

brittle pasture
#

it's fine, UI Info already did that (well technically the inverse, there's an option to gate its fishing-related features behind the sonar bobber)

uncut viper
#

(also, two cakes)

teal bridge
#

Using the sonar bobber (or any tackle) actually adds some balance in another way, because until you get mastery, you won't be able to equip a spinner, curiosity lure, etc.

#

So you can fish-scum, but you'll have to wait longer for a catch.

#

New bobber/tackle type would imply sprite work, crafting recipes, shop edits, etc. Definitely not my area of specialization. (and sonar would still be useless in that case)

brittle pasture
#

come to the content modder dark side. I made my first "serious" content mod with Chicken Feed and I loved it

teal bridge
#

nah

brittle pasture
#

but you get to write mail! and draw pixel art!

teal bridge
#

I'll need some content for StarLog, when I get there. But that project has gotten down low on the priority list.

#

I did actually add mail to Pen Pals.

#

Pixel art is a definite nope.

gilded comet
#

aww pixel art is fun

teal bridge
#

It's fun if you can do art, yes. I'm not opposed to making pixel art, I'm opposed to me making pixel art.

unreal estuary
#

Does anyone know which file in my unpacked folder would have these missing tiles?
Spring, screenshot from bus stop. Used spring_outdoorsTileSheet for the grass recolour but don’t see these missing tiles on there.

brittle pasture
#

I believe it's in one of the 1.6 tile sheets

gilded comet
#

have you checked cursors yet

unreal estuary
brittle pasture
#

Maps/spring_outdoorsTileSheet2 (and other seasons)

#

and some other stuff in Maps

unreal estuary
#

Found it, thanks so much!SDVpufferheart

dusty scarab
#

one Stardew day is 1750 minutes, as far as processing time goes for machines, right? there's no way to simply make it be 'ready the next morning' instead of a set amount of in-game minutes?

gilded comet
#

you could probably do it but you might need c# if it's not already a feature

#

(well you can do like anything with c#, so)

worn coral
brave fable
#

has anyone worked with BaseItemDataDefinition using some custom Identifier SDVpufferfush

GetData uses the custom qualifier in ParsedItemData.QualifiedItemId, but CreateItem uses "(BC)" in Item.QualifiedItemId

the custom item is a bigcraftable, but shouldn't its own identifier/qualifier be used instead? the items are being marked as error items ingame and i don't know if this is why

dusty scarab
#

well, to perhaps put it better, I'm adding some custom items to the ||Dehydrator||, and I'd like it if I could make them be done the next morning, just like the Dehydrator does with vanilla items. will -anything- that goes into a Dehydrator be done the next morning, even if it's a custom item?

next plaza
dusty scarab
#

or would it work like I want it to if instead of "MinutesUntilReady 1750", I put it as "DaysUntilReady 1"?

worn coral
brave fable
worn coral
#

The difference will be the DaysUntilReady will be the next morning regardless what time the input went in, Minutes will take exact amount of time so it will technically be a "day" but will finish at the same time next day in 1750m

next plaza
#

Oh I misread you question blueberry

#

Or rather missed the second part

#

Hmm

#

Remind in 12 hours to look into blueberry’s question (if they haven’t solved it already)

#

…Uber?

dusty scarab
brave fable
#

remind me in 12 hours to be pinged

patent lanceBOT
#

I'd rather boot myself on an unprotected windows XP install than deal with you but we can't all have what we want, can we? (#6229523) (12h | <t:1725823633>)

next plaza
#

Maybe it didn’t like the parenthesis

brave fable
#

remind me SDVdemetriums

next plaza
#

OHHHH

#

Remind me in 12 hours to look into blueberry’s question (if they haven’t solved it already)

patent lanceBOT
#

私のユニコードパーサーが壊れているのを助ける (#6229525) (12h | <t:1725823669>)

worn coral
next plaza
#

(I just went to bed, hence the delay 😛 )

dusty scarab
#

ahh, fair, I'll go do that

worn coral
#

I didn't know Maru bot made language jokes, that's hilarious VMVLmaoDog

lucid mulch
brave fable
#

the constructors are like this atm:

public class OutdoorPot : StardewValley.Objects.IndoorPot {}

public OutdoorPot() : this(itemId: null, tile: Vector2.Zero) {}

public OutdoorPot(string itemId, Vector2 tile)
{
    this.initNetFields();

    // Item
    itemId = this.ValidateUnqualifiedItemId(itemId);
    this.ItemId = itemId ?? OutdoorPot.GenericName;

    // Object
    this.Name = itemId;
    this.TileLocation = tile;
    this.IsRecipe = false;
    this.bigCraftable.Value = true;
    this.CanBeSetDown = true;
    this.setOutdoors.Value = true;
    this.setIndoors.Value = true;
    this.Type = "Crafting";
    this.Category = OutdoorPot.BigCraftableCategory;
    this.Fragility = OutdoorPot.fragility_Removable;
    this.Edibility = OutdoorPot.inedible;

    // IndoorPot & OutdoorPot stuff
    // . . .
}
lucid mulch
#

If OutdoorPot isn't overriding TypeDefinitionId to set it to BB_RGB, then its just going to inherit the behaviour and be (O) or (BC)

brave fable
#

is that so

lucid mulch
#

and IndoorPot overridesTypeDefinitionId to just unconditionally be (BC)

#

the ItemDataDefinition is to provide a standardized interface to create arbitrary items regardless of what type backs it, but its the underling items job to say the correct thing once its been instantiated

#

looking at the various 1.6 native items are a good reference for it, with ||Mannequin|| and ||Trinket||

brave fable
#

omg it works

dusty scarab
#

what does BC stand for? Big Craftable?

lucid mulch
#

yes

brave fable
#

i think it's an emoticon

#

oh

#

thank you! it's no longer an error and it's working like normal

#

and it spawns through cjb which wipes out so many mod comments

lucid mulch
#

for context, the code for QualifiedItemId

/// <summary>A globally unique item ID which includes the <see cref="P:StardewValley.Item.TypeDefinitionId" /> and <see cref="P:StardewValley.Item.ItemId" />.</summary>
public string QualifiedItemId
{
    get
    {
        if (this._qualifiedItemId == null)
        {
            this._qualifiedItemId = this.TypeDefinitionId + this.ItemId;
        }
        return this._qualifiedItemId;
    }
}

as to why that behaviour happens and why TypeDefinitionId is important

indigo yoke
#

Late to the conversation, but why not use Tempestarii? It's an old medieval term for a magic user who controls the weather.

And it's 11 characters like archaeology, so it would fit.

dusty scarab
#

does anyone know why my seeds aren't showing up in Sandy's shop after the Beet Seeds? Beet Seeds should be object number 494, but using either BeetSeeds or (0)494 results in this error being thrown

vernal crest
dusty scarab
#

...that would probably do it, yeah XD thank you for being the extra set of eyes to see what I didn't type correctly

#

yep, that was absolutely it. it's fixed now, thank you again

vernal crest
#

You're welcome! :)

brave fable
#

one step closer :')

dusty scarab
#

aww, those are cute!

brave fable
#

theyll be cuter when they show up in the gd crafting page :')

lucid mulch
#

oh was already answered nevermind

dusty scarab
#

Mavis Beacon Teaches Typing had failed me, what can I say? XD

brave fable
#

yay it's craftable again

#

does khloe's Better Crafting still require you to do huge api implementations to get custom class items to appaer in the custom crafting menu?

#

it doesn't craft. wonder why SDVpufferfush

// CraftingRecipe.cs
public virtual ParsedItemData GetItemData(bool useFirst = false)
{
    string id = (useFirst ? itemToProduce.FirstOrDefault() : Game1.random.ChooseFrom(itemToProduce));
    return ItemRegistry.GetDataOrErrorItem(bigCraftable ? ("(BC)" + id) : ("(O)" + id));
}
#

couldn't crafting recipes just use qualified item ids SDVpufferflat

ornate trellis
#

that moment you try making your second NPC and they down exist when you test and you dont know why :I

#

when i go debug where and it tells me my npc doesnt exist does that automatically mean i already got the dispo wrong or...thonking

hallow prism
#

maybe! you can show the code so we can see if something is mmissing

ornate trellis
#

wait

#

I think I already found the issue omg

#

lemme see if thats the problem before i bother you with looking over my textwall

hallow prism
#

sure! 🙂

ornate trellis
#

huh, i got another error now

hallow prism
#

progress!!

ornate trellis
#

normally id go "oh so i forgot a comma but...there is one, hm

blissful panther
#

Ah, I see it!

hallow prism
#

extra }, or missing },

blissful panther
#

The closing curly brace on line 177 closes the Changes block.

#

So extra one, yes!

hallow prism
#

thanks, i wasn't sure in which direction it was 😄

ornate trellis
#

dangit, i already took one out further above lmao

hallow prism
#

it happens, i know i did that plenty of time when copying stuff

blissful panther
#

Wait a minute, no it doesn't, I think I was wrong!

ornate trellis
#

O:

#

wait....do i have one too less

hallow prism
#

i still think it's an issue of bracket somewhere but it's hard to spot

ornate trellis
#

when i click the last one it is only closing my entries but not the edit

#

yes!

blissful panther
#

Yeah, it's missing one!

ornate trellis
#

thats it

#

omg

#

brackets and commas are the arch enemy of basically every mod maker, huh

velvet narwhal
#

shrimply, let intellisense do your brackets and commas

ornate trellis
#

i already have a thinge that automatically closes my " and any brackets but thats useless when you copy paste

#

vscode is too intimidating to use, im staying with notepad++

#

lets see if she appears now

#

hurray!

worthy rose
#

heey guys, how do i reload on the fly

#

load, unload, and reload are all non-wrking in smapi console

#

any secrets i dont know?

#

i like debugging cuz i can breakpoint, but i hate relaunching the game and going thru menu to test every little change

velvet narwhal
#

!reload

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

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

ornate trellis
#

nows the question...do i put the skeleton of each npc in first or work on this ones dialogue for now....(events I always leave for later cuz i dont like making them lol)

velvet narwhal
#

what is it again?

#

.choose skeleton, dialogue

patent lanceBOT
#

Choose result: dialogue

ornate trellis
#

fine

#

but first i gonna make some food

velvet narwhal
#

i should trade you, i'll script your events but i want the grungly music, 3 events per grungly bgm SDVkrobusnaughty

ornate trellis
#

too bad i never know the outcome of my music fgjggkdfgfd

#

tho ive been thinking to see if i can find another free music maker thingie to play around with

velvet narwhal
#

i tried soundtrap but it's annoying without a midi keyboard

worthy rose
#

hey guys any way to get a list of all SButtons that are for controller?

#

and all SButtons that are for keyboard?

worthy rose
#

i found that when im debugging i can just hot reload most of thew small changes

#

ahh yes your note says that

#

yeah im shcked that actually works in this case haha

ornate trellis
#

you know what nevermind with the music rn cuz windows wont let me isntall more cuz C is too full and i cant use my other drive because ofc all dumb proggram nowadays still want to install core components to C despite selecting isntall oin a different drive, sigh

#

and I am not confident taking out my old C drive and slapping my new one into the motherboard all on my own :I

#

ill just make my food and work on dialogue like i originally decided

worthy rose
#

hey guys quick question, what constitutes a "tick"

#

such as, JustPressed checking current tick

#

what does that mean

spice inlet
#

afaik in sdv/game dev terms a tick would describe a update cycle iteration, of which in sdv theres ~60 every second, while in general cs terms tick would usually mean singular increment cycles, like the system clock incrementing its tick count every cycle

calm nebula
#

(yes, the 60hz tick, not the 100ns tick.)

lone ice
#

morning all, I'm trying to clean up my mod process and make sure I'm not doing anything that's frowned upon/problematic; if I want to use the cotton candy concession sprite as a standard food item, what's the preferred way to include the vanilla sprite?

drowsy pewter
#

you can simply write in the filename in the Texture field and it will use the vanilla image (LooseSprites/Concessions)

lone ice
#

ok

#

thank you!

drowsy pewter
#

make sure to adjust the spriteindex as well

wheat void
#

Are there any modding softwares for SDV? I wanna try to mod

hallow prism
#

basically you need to tell us a bit about what kind of mod you want to make, but

#

there's no modding software per se, we use mainly

#
  • text editing
  • image editing allowing pixel art
  • whatever the C# modders use to code C#
  • tiled for maps
#

!software

ocean sailBOT
wheat void
#

I want to make a mod where you can pick up the children XD it’s very random

hallow prism
#

it sounds like C# territory. I can't tell the complexity

wheat void
#

Ah okay

hallow prism
#

i would suggest starting with something maybe easier then see if you want to do it still

#

depending if you already know some coding language or not

worthy rose
#

OK So i figured everything out.... except..... when i go to my journal, everything stops working

#

nothing else breaks my dictionary like this lmao

#

but man im so proud i got it working this well, i prob just have to mirro rthe data somehow, opening journal doesnt like... reassign hotbar order, does itr?

#

nah even my debugger stops noticing the keys

#

i wonder if it kills the MP player ID

calm nebula
worthy rose
calm nebula
worthy rose
#

man i am LOST now, any mod veterans here who can tell me what the heck is going on id love u forever ty

#

basically, i set slot 5 to J, i set slot 6 to K i set slot 7 to 9, i press j k 9 and watch it fly around the slots, for a half hour, then i hit F , not even set anything to it, just hit F, it brings up journal, i close it, suddenly none work... hmmm i bet its simpler than im thinking

#

i bet its storing an extra button somehow

worthy rose
#

certain buttons are getting "stuck"

#

idk why

nova gale
#

in event dialog, when doing the response ids, do those need to be unique across the game or just within the event/character? and can they be strings or numeric only?

#

the wiki only shows numeric examples for response ID's so I'm hoping they are only unique for the character to prevent collision!

vernal crest
#

Response IDs need to be unique across the whole game and strings are totally fine now.

hallow prism
#

yeah strings are fine in response, someone confirmed that recently

#

and i believe there are some ways to check for such responses with a GSQ or something so they are across the whole game (otherwise you wouldn't be able toc heck them)

nova gale
#

so long as they're strings that works, with numbers i was just envisioning the conflicts 😛

#

I am also trying to puzzel out when to use $q vs $y vs question vs quickQuestion 😛

hallow prism
#

yeah it's so quick with numbers, we got mostly lucky that for event ids there was a convention before

#

ah yeah

#

i like quickQuestions in event

#

since atra made me see the light

#

and understood that you CAN have multiple commands in a block

nova gale
#

how do you specify which NPC is speaking the question?

hallow prism
#

if you separate them by \\

#

usually

#

i do the question in a speak

#

and then a stuff like "what do you answer" in the quickquestion

nova gale
#

ah gotcha

#

so you only use the quick question for the farmers response

#

not the initial question itself

#

that makes sense

#

gives it the ol' college try

hallow prism
#

yeah it is also good when the npc doesn't ask a question but i want to offer the player the choice of response

#

ex :
"InnMoira6HMoira06":"I got nice comments, but it's pretty much all.", "InnMoira6HFarmerQuestion":"(What do you say?)",

vernal crest
#

Can you even use $q in events?

#

That seems like it would be complex given the number of dialogue keys you need for it.

nova gale
#

yeah, i've used it in speak commands before

#

but yeah, it is complex, and frankly annoying, which is why I was digging around in the wiki for options

#

and vanilla uses all 4 methods I brought up, it was part of my confusion honestly

vernal crest
#

Hmm that means you can probably have nested questions in events then.

hallow prism
#

yeah i feel CA was a bit "hmm i made a question thing but it's not convenient for this use case, let's make another"

vernal crest
#

Yeah probably lol

nova gale
#

I'm very amature at events/dialogue so i'm fumbling around quit a bit with how it works myself

#

hopefully I can get away with only a few events for this mod and then call it a day. Actually since you folks have done this more, is there a trick to making multiple NPCs move at the same time without one of them repeating the movement and going way off track?

hallow prism
#

yes, advanced move

#

and also

#

you can get away with pretty much everything, nearly no event is totally a viable approach

#

i didn't have a lot in VMV initial release, i will have more soon, but it's BECAUSE i was able to accept that it was ok to not have a lot of events

#

if you don't like making them, don't

nova gale
#

yeah, the only ones I feel like I really "need" is the one that unlocks the new area and the one that plays when you get knocked out in the dungeon, I'll probably avoid having much more then that

#

and I'm going to leave the schedules pretty basic for the NPCs since their primary job is to be shop owners

#

I was originally going to make another NPC to build stuff in the new area, but decided I'd just make Robin slog to the deep dark cave and build me a shed 😛

vernal crest
#

She'd probably enjoy the challenge tbh

calm nebula
#

There are four options and only one is implemented in a way that doesn't make me want to tear my hair out

nova gale
#

unless i need the response id's for reactive dialogue I assume

#

(which I don't)

hallow prism
#

(well, depend of what reactive dialogue you want but there's CT and mail flag)

calm nebula
#

Even if you do it's about nine million times easier to add a mail flag tbh

hallow prism
#

(if you do want to keep options open)

royal nimbus
#

hey im wondering. is every single texture (piece of furniture) for the town interior on the towninterior.png? or maybe another png like furnitire.png? or is some of it maybe hardcoded? for example im not seeing jas' pink bed or emily's big blue bed on there. ive also been unable to locate a couple other textures as well.

rancid temple
#

My two go-to options for finding stuff is opening the map in Tiled and right clicking the tile I'm interested in with the stamp tool selected, takes you to the appropriate tileset and selects that tile, you can edit the tileset to see what the name of the sheet is; And using Lookup Anything in game to see what is being used during actual runtime

hallow prism
#

there's a towninterior2

#

if you're on tiled open the map you wonder about

#

right click on the asset you wonder about

hallow prism
#

see what tilesheet it focus on, see what is it named

royal nimbus
hallow prism
#

and yes it's what rokugin said already

royal nimbus
#

but yeah finding things can be tricky

rancid temple
#

As far as Jas's bed goes, it looks like a regular bed to me

#

So maybe you already have a mod replacing it?

royal nimbus
#

nah not yet. but i am redoing some of the rooms

#

but yeah i will take a look with tiled

rancid temple
#

Emily's bed is also just a normal double sized bed for me

royal nimbus
#

i found it on furniture but im not sure if thats the asset for it

rancid musk
royal nimbus
#

i dont think it is since i changed all the furniture on that png. i think those are just for the player

hallow prism
#

can you show a screenshot of what stuff you mean?

#

and yes, furniture isn't used in maps

royal nimbus
#

ah okay. good to kno

drowsy pewter
vernal crest
#

They have to be inside the Maps folder to be used in maps - what 6480 said lol

worthy rose
#

yall got any good examples of pulling config parameters into the code?

worthy rose
#

for anyone with my problem in the future, it was simply that my else wasnt resetting the buttons pressed -_-

#

ahh c# models

#

easy enough

#

does it have to be Modconfig.cs?

calm nebula
#

No

worthy rose
#

kk ty

calm nebula
#

But that is standard

worthy rose
#

yeah might as well

rancid temple
#

I don't believe it has to be that, just make sure you're pointing to the correct script when you access it with the helper

worthy rose
#

i already got ModEntry.cs

rancid temple
#

I find that the more you deviate from convention/tutorials, the harder it is to remember to make the change every time

worthy rose
#

unless you change all at ocne with rider or smth

#

but stillbetter practice

calm nebula
#

I already had to Google "python equivalent of cref" once already today lol

#

God I hate docstrings

worthy rose
#

dont u dare talk smack on my beloved

#

i started as c# dev

calm nebula
#

I can't believe I'm about to defend xml but I miss xml docs

worthy rose
#

and now im a py architect hahaha

calm nebula
#

(I don't know what architect means here.)

worthy rose
#

docstrings are slkuppt tho

#

sloppy*, i am the father of a code base for a company

#

its my stack, i birthed it, i will see it to adulthood

#

fastAPI/htmx/mongodb

#

i will refactor it at least 8 more times, as is tradition

#

tbh, not to derial this chatroom any further than my last message on the matter, its a bitcoin miing and solar panel farm with over 10000 antminer s19, s21 and whatsminers, and thosuands of solar panels in massive fields, and those things all have python libs for their built in apis, but not nuget packages, so the choice was obvious

rancid temple
#

If you were the father, wouldn't that mean you did very little and will ignore it until it does something to make you proud? /j

worthy rose
#

and then scream at me all the time

#

😢

iron ridge
worthy rose
#

yeee

#

i should really go there

#

i clearly have an itch to scratch

#

anyway, we can write to these configs programmatically?

rancid temple
#

Outside of using GMCM to update values, never tried. Is there a benefit?

worthy rose
#

idk ,just to store it to pull it next tim the play i was thinking

#

so they set a few diff keybind shortcuts im sure theyd like that to auto load next time

#

and its cool to see it in the config i think? not sure

rancid temple
#

It creates a json that stores all that

worthy rose
#

oh wow rad

#

wait, the mod does? by default?

#

even if im not telling it to?

rancid temple
#

SMAPI I think?

#

Oh yeah, if you're not using GMCM looks like you have to write the changes to the config yourself

plucky reef
#

Prior to gmcm being commonplace I would run the game to generate the config json, exit the game, edit each json to change config settings, and those persist.

#

Gmcm is huge.

rancid temple
#

Did the config not generate with whatever values you set in the model?

plucky reef
#

No they did, just to customize from the defaults.

#

Unless you were speaking to youstaygold.

rancid temple
#

Nah, you. Just wasn't sure if you meant like to ship a different set of defaults or for the actual modification of config files

plucky reef
#

The second one for when I was setting up a new run.
On the topic of mods and GMCM though, I saw someone say they were putting a GMCM api .cs into their mod. I don't have that but GMCM still works for me when all I have is the configMenu.Register on my ModEntry OnGameLaunched event. Is pulling in an instance of the API required?

calm nebula
#

I have no clue what you're trying to say

#

My guess - and this is a guess - is that you don't need to copy the api interface because you hard reference spacecore

plucky reef
#

that's probably it yeah

rain lion
#

I just converted my JA crop mod to CP, I made sure the object IDs are consistent with the JA version but don't think I can do the same for the crop IDs. How are people handling releasing a new version with a breaking change like this on nexus? should I release it as a separate mod and deprecate the old one? or upload it as a new file with a note that it'll break any crops planted from the old versions?

tiny zealot
#

shouldn't objects have the same issue with IDs, since the point of Json Assets was to assign IDs?

rain lion
#

I thought it would but it was looking for a string ID that was something like username.modId_seedName

#

so I was able to use the same ID

dim vector
#

hi! if anyone has the time and knows anything about mods could someone help me with my smapi crashing? sorry if im interrupting btw !!!

rancid temple
dim vector
#

thank you!!

tiny zealot
ivory plume
rain lion
calm nebula
#

( @brave fable )

#

Wait I thought you were a rhubarb

tiny zealot
rain lion
#

okay yeah that's what I was thinking

#

thanks for your input!!

lucid iron
#

can you ItemRegistry.Create a flavored item

brittle pasture
#

no

#

but you can assign flavors to it after the fact

#

or just use the FLAVORED_ITEM query tbh

lucid iron
#

basically i was try to make sturgeon roe icon

brittle pasture
#

definitely use FLAVORED_ITEM then (or CreateFlavoredRoe)

lucid iron
#

originally i thought i can just get color from sturgeon but turns out sturgeon is hardcoded

naive monolith
#

where can i find spritesheet of inventory, and those windows which appear when you pick items?

calm nebula
#

Maps/menutiles

naive monolith
#

thanks

brisk kraken
hallow prism
#

you loaded the dialogue before that?

#

you need to basically create the file (load it) to edit it after

brisk kraken
#

in the content.json?

#

If it is that, yes

hallow prism
#

also note that naming your npc just Dorian isn't very solid and that the naming convention is having something like yourmodid_dorian

brisk kraken
hallow prism
#

can you show the content.json then?

brisk kraken
#

Sure

brisk kraken
#

Oh wait, maybe is "Load" instead of "include"?

hallow prism
#

ok you're doing that here : { "LogName": "Blank JSON load", "Action": "Load", "Target": "Characters/Dialogue/Dorian, Characters/schedules/Dorian, Strings/schedules/Dorian", "FromFile": "assets/data/blank.json" }

#

so it's good

brisk kraken
#

Yes I can send the full error message

hallow prism
#

(it's suggested to share the log using

#

!log

ocean sailBOT
#

Important note: Your computer username may appear in the log. If your username is your full name, please be aware of this before uploading it.

Please share your SMAPI log file. To do so:

  1. Open this page: smapi.io/log.
  2. Follow the instructions at the top of the page to upload the log file. (Don't copy & paste from the console window!)
  3. After uploading, it will show a green box with a URL to share. Post that URL here.

Please do it even if you don't see any errors. This has useful info like what mods and versions you have, what the mods are doing, etc. If the issue didn’t occur in your last session, please load the game to the point where the issue occurs, then upload the log.

hallow prism
#

)

#

and basically something is wrong with your blank file

#

is it litteraly blank?

brisk kraken
#

It is

hallow prism
#

try

#

{ }

#

adding this to it, test if it solves the error

#

if not, provide a fresh log using the link

brisk kraken
#

Ahhhh, yes, it should be that. I skipped that part in the tutorial... let me check

#

Yes, the dialogue works now, thanks

lucid iron
#

the checkbox is Frame > Lane > Image, while the item icons are Frame > Lane > Lane > Panel > Image

#

if i move the focusable up to Frame > Lane > Lane > Panel it is fixed Bolb

teal bridge
#

If you can submit a simple repro case then I will definitely look into it. The "vertical lane of horizontal lanes inside a scrollable view" is one that I'm using in SL so it doesn't seem to happen with every possible configuration.
(Focus search behavior is recursive and therefore complex so there are likely to be some obscure edge cases; I'll likely only discover them as people submit them.)

#

Btw, that looks vastly improved over the other day's prototype, so grats on that.

lucid iron
#

i gotta figure out what do with all this whitespace blobcatgooglyblep

teal bridge
#

You could just make the frame thinner.

#

Although it could look slightly silly at like 200px wide.

plucky reef
#

Ok I got the harpsword working with left click being sword swing and right click being a "hold still, charge a shot, play a sound when it's charged, and releasing shoots a projectile." Still needs some work for the polish but it works.
But, it's still a melee weapon so the action button enters the parry animation and function. Is there a way to suppress the action but keep the cooldown? Also to change the cooldown? Do I have to use Harmony prefix to stop the parry from happening and can I make it only suppress the harpsword and not other swords?

#

BTW I did try making it a custom slingshot instead but found it was being a little cumbersome to create it as a slingshot when it's much easier to create a custom melee, and to do the custom bits of swapping the aim/shoot and sword part, especially when the only thing I wanted from slingshot was the "aim" bit but without ammo, so I went melee weapon.

tiny zealot
#

i don't know the answer off the cuff, but i would not be at all surprised if the melee weapon right-click behavior was hardcoded for sword/dagger/club, so be prepared to use harmony

plucky reef
#

I am thinking so.

tiny zealot
#

depending on which method you intercept and how the result is processed, it may be possible to do via postfix, which i recommend whenever it is possible

plucky reef
#

I was thinking prefix so when the action button is pressed, the prefix intercepts the defenseSwordEvent, but could a postfix take the event and trash it and that's better?

tiny zealot
#

postfixes are generally more desirable for compatibility/reliability, since they aren't skipped. but sometimes they aren't suitable for a given problem (letting an undesired event happen and then trying to negate it is one of those times, i suspect)

plucky reef
#

I bet it will be a prefix on MeleeWeapon doAnimateSpecialMove but I need to read up more on Harmony.

shell dirge
#

excuse me, can someone explain to me how the Leah bot and the mod showcase channel work? how does one even get their mod to be showcased here? i'm just a lil confused, i kinda couldn't find any explanation for that anywhere

brittle pasture
#

you need to have the mod author rule (orange username)

#

which needs level 25

#

otherwise you can ask a mod author to showcase on your behalf

shell dirge
#

err and how does one even get levels?

next plaza
#

Next SpaceCore will have a fix for zero schedules causing problems with showing in the wrong location and broken schedules on some days.

(This isn't in the base game yet because we're concerned about regressions this late in 1.6.9 - much easier for me to re-release a new version of SpaceCore if something is broken rather than do a new game release)

brittle pasture
patent lanceBOT
patent lanceBOT
next plaza
#

It looked like it was solved already

lucid iron
#

if you want a mod you made showcased someone who is mod author can do so for you

shell dirge
next plaza
#

It's not spamming the chat

lucid iron
next plaza
#

It's participating in the community

lucid iron
#

do you have something you want to share Bolb

teal bridge
ornate trellis
#

spamming the chat wont work anyway afaik you only get lvl points, like, every minute or so thonking

#

anyway, chat, how OP would it be if a normal dialogue would give the farmer a stardrop tea(or would it be more balanced to give it in a little mini event)

lucid iron
#

maybe if it only happens once

next plaza
#

It would be more about how often you gave it

lucid iron
#

or once a year at most

ornate trellis
#

hmm

shell dirge
# next plaza It's participating in the community

running my mouth for no purpose, when i have nothing really to add to the conversation is yapping, last time i checked and yapping in text = spamming
but thanks, 😕
i guess, i will just hope for the best, that my mod wont get spammed forward by useless machine-translation mods in droves.

lucid iron
next plaza
lucid iron
#

aka the channel where ppl actually play game instead of testing mods all day

ornate trellis
#

it would be no "no purpose" if you just normally talk in chat, thats what you usually do in a chatroom, no?

formal crown
#

[You actually get points for one message per 30 mins, afaik]

ornate trellis
#

hm, maybe ill jsut give another tea instead of the stardrop one. i dont want to make it too complicated 🤔 just wanted a "hey i mentioned wanting to give you a cup of tea" kinda moment

shell dirge
ornate trellis
next plaza
#

That's fair, I usually try to figure out stuff myself too

lucid iron
ornate trellis
#

i got a whole of two teas

#

that you just cook lmao

formal crown
#

Teas? I like tea SDVpufferheart

next plaza
#

Completely unrelated, but did I ever show S&S's dual wielding here

#

(Implemented recently)

ornate trellis
#

dual wielding?

lucid iron
#

ive only seen the chakram

blissful panther
#

You should either way, because it's cool. SDVpufferlurk

ornate trellis
#

did you mean helicopter /j

formal crown
#

Like using two weapons at once?

next plaza
next plaza
formal crown
#

I'm curious now

uncut viper
ornate trellis
#

my two teas btw

#

i didnt wanna figure out the keg so its just....like any cooking recipe...

plucky reef
ornate trellis
#

(both are rose teas btw)

blissful panther
#

(The most interesting part to me is that there's no XP curve per se. It's 300 for every level.)

next plaza
#

Still a couple bugs to work out when using custom weapon types (like chakrams showing in-hand when you guard, or using the chakram ability doesn't let the guard work if the sword is in the offhand), but for vanilla ones it's fully functional

#

You can even equip two daggers and get double the stabs

ornate trellis
#

lowkey wondering if i should go a bit bonkers with teas afterall since constance does like them quite a bit but, hmm

blissful panther
#

There can never be too much tea.

ornate trellis
#

can i put a torch in my offhand

plucky reef
#

Oh that's cool.

next plaza
ornate trellis
#

burn the enemy

next plaza
#

(Specifically melee weapons, no slingshot)

formal crown
#

Slingshot probably would be a pain, since you need to aim it

next plaza
#

Yeah

ornate trellis
#

you can do that with your teeth

blissful panther
#

Time for an auto-aiming slingshot!

ornate trellis
#

become one man band but with weapons

next plaza
#

Oh and the chakram combo swings don't seem to work when chakrams are in the offhand

formal crown
#

Fun fact: There IS code for slingshots to auto-fire, but its blocked off from player-access for some reason

next plaza
#

First set of swings is chakram offhand, second is chakram main hand

#

When chakrams are in the main hand, they have different swing patterns consecutively

ornate trellis
#

how about...two penny frying pans...

next plaza
#

That works

#

Those are just swords (or clubs?)

ornate trellis
#

beautiful

next plaza
#

...If you manage to get two of them

formal crown
#

You can buy them both from DF theoretically

next plaza
#

Can't you get one a year though

#

I didn't mean to imply you couldn't

#

Just that it would take a while

formal crown
#

I know, dw 😆

ornate trellis
#

go into mines, make everything fear you with two infinity gavels /j

#

also idk how likely you can get em, i jsut live for the mental image

#

goes to add more tea to my possible scope creep fishmongger update list

#

ill never finish this update :)

next plaza
#

How in the world is __instance null

#

Apparently I encountered it before since I have that __instance = ...;

#

But... how?

#

Oh I'm patching the static version

blissful panther
#

Rider complains at me for checking if that's null all the time. Take that, Rider. /s

pine ermine
#

I think I remember someone mentioning there being dotnet templates?

#

I'm trying to find them if anyone know about them.

uncut viper
#

for stardew mods? I think it was focustense that made one but i can't remember 100%. i just use my own

pine ermine
#

Found it

#

Why is it not on nuget >.<

#

Okay, looks like you can use templates installed from the commandline inside Visual Studio.

uncut viper
#

Rider too! very handy

pine ermine
#

I remember just 4 years ago, you had to make a separate VSIX project if you wanted a template to be usable in Visual Studio. That was annoying.

plucky reef
#

Is the only difference code wise between a sword and a club, the special attack?

next plaza
#

Clubs are generally slower too

#

I think

lucid iron
#

yea they have different base speed

next plaza
#

Also clubs have more knockback

lucid iron
#

all weapons in the game are MeleeWeapon class though, if thats what you care about

#

they just have different parameters

worthy rose
#

apologies if this is a a dumb question, but do items have a unique ID? and if so can i bind a key to whatever slot that item is in by getting an array of items from back pack and then finding the item ID

rancid temple
#

You could iterate over the backpack and find an item by it's ID, though you'll probably want to account for holding multiple stacks

#

All the item ID's can be found in the unpacked files, primarily in Data/Objects but depends on what ID you're looking for

worthy rose
#

aight thanks, and i didnt even think of multiple stacks goddamn i didnt wanna go that deep, welllll do they keep the id across stacks tho?

rancid temple
#

It's all the same ID, it's nothing as unique as like a unique ID for the inventory

pine elbow
#

hi guys, first time doing this, i created a custom hat that replaces the vanilla '???' hat (ID 92), which is normally unlocked after completing the game. the mod works fine, but i'd like to make it so that the player automatically receives the hat as soon as the mod is loaded, instead of having to wait until game completion. what's the best way to do this?

uncut viper
#

you can add the hat with the AddItem action with a trigger action

#

(and probably set a mail f lag too so you dont keep adding it every morning)

rancid temple
#

Could also send it in the mail

#

Was replacing the hat intentional, didn't want to just add a new hat?

uncut viper
#

mail is also the usual way to send items yeah. i just took "as soon as the mod is loaded" to mean like, immediately. but if you want a lore friendly way to do it then mail is the goto for sure

rancid temple
#

I think you're just addicted to trigger actions right now :P

uncut viper
#

i mean, you need them to send the mail too

pine elbow
rancid temple
#

Yeah, that is true

uncut viper
#

(unless you do it in dialogue)

rancid temple
#

Nope, you can make new hats

lucid iron
#

hm im unsure how your mod is different than spawning the hat directly

#

might make more sense to add it to some shop so its got a cost

rancid temple
#

How are you changing the hat currently?

pine elbow
#

i changed the pixel art of the hats.xnb file

rancid temple
#

Oh, yeah xnb modding isn't suggested anymore

uncut viper
#

its an xnb mod and not a Content Patcher mod?

rancid temple
#

!startmodding

ocean sailBOT
#

Making mods can be broadly divided into two categories:

Usually it’s easier to start with making content packs, since you don't need to learn programming.

lucid iron
#

use content patcher and add new hat

uncut viper
#

or do you just mean you unpacked the xnb and edited it after but used it in CP?

lucid iron
#

can checkout fashion sense too

pine elbow
#

no idea tbh what im doing lmao

rancid temple
#

Oh ok, so you did do a CP mod lol

#

!json share your content.json using this site

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.

plucky reef
# lucid iron they just have different parameters

fair, and I can use assetrequested to change the speed/reach/whatever to my liking, although the end result item might look odd. I'm just thinking on what would be easier to override the special action but I'm reading on harmony to see and then I'll play with it.

rancid temple
#

Can you change their parameters after they're in your inventory though?

#

I mean, obviously you could specifically iterate over your inventory and make the change, just don't think asset requested will catch it

#

Unless weapons are different in that regard, haven't tried

plucky reef
#

for the initial balance I'll just tweak until it feels good and make that a base. For updates (like when infusing other weaopns) that will be a fun interaction to explore when I get to that point.

uncut viper
#

oh so its still an xnb mod, ish

rancid temple
#

Lol, a hybrid mod

uncut viper
#

I always forget CP can just load xnbs

rancid temple
#

You don't have to convert the image back to an xnb before using CP to patch it in

uncut viper
#

to add to that, you shouldnt convert it back to an xnb

rancid temple
#

I guess this is technically just a full on XNB mod using CP to do it though huh

pine elbow
rancid temple
#

I mean, it's the least offensive way to do an XNB mod, because it's technically non destructive

uncut viper
#

Content Patcher lets you edit vanilla content or add new content without touching the xnb files so that everyones mods can play nice together

#

I don't actually know if loading an xnb into the hats file would mess with editdata on hats after

#

I'd assume so?

rancid temple
#

I think if it was the first patch to happen it might be fine

#

But if it's later than any others it's just going to load over the whole file

uncut viper
#

I guess it'd be the same as just normally editdata priority affecting things

#

Which I guess isnt technically worse maybe. i dunno

#

as long as you're the only mod loading to hats

rancid temple
#

Goes back to the normal amount of "you shouldn't do this"

teal bridge
rancid temple
#

If this is a personal mod that you don't plan on releasing and you don't have any other hat mods you care about, this is technically still fine to move forward with

pine elbow
hoary lake
#

(Rolls in)

rancid temple
#

!cp I believe this is still a good place to start?

ocean sailBOT
rancid temple
#

For getting familiar with CP itself

hoary lake
#

me had a funny idea of making a bike shop that sells bikes like in the pokemon games!

rancid temple
pine elbow
#

thanks for the help SDVemoteheart

rancid temple
#

Best advice is to find another up to date mod that does either what you want or something similar and see how they did it, as long as it's a CP mod you'll be able to just open their jsons and see everything they're doing

pine elbow
#

yeah, i think i found one so i will try that. thanks again

brave fable
rancid musk
#

It should be the same if you need custom draw code, and easier if you don't need custom draw code.

brave fable
rancid musk
#

I actually have some ideas for how to handle people doing weird drawing things without needing to use the API too, but I haven't gotten there yet.

brave fable
rancid musk
#

It is!

brave fable
#

raised garden beds test release getting warmer SDVdemetriums

#

oh also while you're here, is there a hook for listening to cooking events through better crafting? i think i saw some mention of love of cooking not gaining skill xp with your menu enabled instead of mine

#

i only have a patch on the default menu's on-recipe-clicked behaviour and ofc my own menu, no behaviours for other mods atm

teal bridge
#

For users of the debug repo, I suppose you can't hit breakpoints in methods once they've been through a transpiler, huh? Have any of you found any clever workaround for that?

lucid iron
#

i have a dum idea, what if you copy the function from decompile into a skipping prefix and have break points there

teal bridge
#

It's a very long function that accesses a lot of internal state - I could potentially do that though I suspect it would take all day.

#

For now I guess I'm just going with the "log a whole pile of crap to the console" approach.

calm nebula
#

Once a method is patched breakpoints stop working

teal bridge
#

Yeah, I mean it's understandable since the method being invoked is literally no longer the method in source, it's an entirely different method in an entire different assembly. But I hoped maybe there was some clever source-mapping hack or something.

pine elbow
rancid temple
#

!json share your content

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.

teal bridge
#

I ended up finding the issue, in any event. I was this close to the conclusion that it was a game bug, but nope, turned out I just missed the chance argument to the RNG.

#

(Rule #1, the bug is always in your code. Except when it isn't. But it probably is.)

rancid temple
#

Just realized CJB Item Spawner is working again SDVpufferparty

frail plank
#

How do you stop the player from moving for a certain time. I am trying to get animations to halt the player/slow down a preexisting animation.

plucky reef
#

there is Game1.player.CanMove = true; (replace with false as needed) that you can stick into stuff.

frail plank
#

Awesome, thanks!

worthy rose
teal bridge
#

You might want to use Game1.freezeControls instead of manipulating Farmer.CanMove.

worthy rose
#

the best part at the end, when i set L3 + X to go to food item, it just startes eating for me, amazing considering when i usually need food on the fly

teal bridge
#

It depends on the exact purpose of course - whether you want time to pass normally during that animation where the player can't move. Some vanilla animations freeze time (like eating), others don't (fishing casts).

worthy rose
#

def gonna be a loooot of refinement

#

you speakign to me ort the other dude? prob other dude. but idk i couldnt get supress to work super well yet

#

im at the point where i think i HAVE To make whatever it does - whatever button i end up choosing, whatever i supress, i think i gotta make the key combo also preform one of said action

#

so if its bomb, it should lay the bombv

#

exciting

#

that might actually be the entire mod, i make it just use X thing and then go back to Y , Y being what you had on originally oOOoOo

vernal crest
pine elbow
#

its the same png tho that i used before

vernal crest
#

Was it doing what you wanted before and isn't now?

rancid temple
#

Well, you were doing an XNB mod before and you can change image sizes with that

#

So you should make sure your png is 20x20

worthy rose
#

If I wanted to display what button was bound to each spot, what lib would yall rec

#

Or should I just draw er on

uncut viper
#

if you want something custom drawn you basically gotta draw it yourself a lot of the time

worthy rose
#

Aight, yeah just anal text like L3+X

#

Shouldn't be too bad

#

I am noticing that if I'm on a different page of my backpack the binds still go to slots on those pages anyone know how to make it go to the specific page and slot?

#

And I'm prob gonna allow any button to be a modifier of any button now that I think about it cuz I love that it matters what order I'm hitting the buttons in, so I can have a bind for l3, x, then a bind for x, l3

frail plank
#

So I can manipulate the player's ability to move, but how would I do that for any duration of time?

uncut viper
#

is it always going to be a set amount of time or do you want to return control after something happens/finishes?

teal bridge
#

Which viewport is the "screen" viewport? Like, would work correctly in co-op.

#

Game1.uiViewport apparently is not it.

uncut viper
#

well, some things let you define a function that fires when it finishes. you can always return control at the end of some other method manually. you could use UpdateTicked and just poll for when you should return control. you can also use a DelayedAction. theres not one answer

plucky reef
#

I actually just finished doing that.

pine elbow
#

thanks @rancid temple and @uncut viper for your help. i uploaded the mod SDVemoteheart

teal bridge
#

Figured out re: the viewport, for some reason the width/height are correct but the x/y are weird. Explains why I always ignored x/y in older code.

#

Part 3 of 4 finally done.

rancid temple
pine elbow
#

yea its fine for now maybe another time hah

#

i credited you in the description for your help SDVpufferheart

upper jackal
#

Hey has anyone here worked with the StardewMods repo ? https://github.com/Pathoschild/StardewMods I'm a newbie to C# and I'm getting this compilation error I'm not sure about: 'string' does not contain a definition for 'EqualsIgnoreCase' and no accessible extension method 'EqualsIgnoreCase' accepting a first argument of type 'string' could be found

GitHub

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

brittle pasture
#

EqualsIgnoreCase is an extension method in Stardew 1.6.9

#

so you need to update to the beta if you want to build that repo at HEAD

upper jackal
#

Ohhh thank you so much

half tangle
#

I see in the game code loc.Map.RequireLayer("Buildings") where loc is a GameLocation. However I cannot access RequireLayer with my code... what am I missing here? I also can't use the class Tile which also shows up.

calm nebula
#

right click, take VS's suggestions

#

(I think)

#

(RequireLayer is an extension method.)

half tangle
#

I'm in VSCode...

#

it's not that smart

calm nebula
#

your using for RequireLayer is StardewValley.Extensions

#

for Tile, it Depends TM

#

(I need more context, it might be xTile.Tile?)

half tangle
#

yeah, I think it is

#

and Extensions worked, so ty there

#

Tile tile = loc.Map.RequireLayer("Buildings").Tiles[x, y];

#

for context

#

and using xTile.Tiles got that - thanks for the tip

#

(also VSCode might actually be smart enough, but it also very aggressively automatically inserts random using lines so I turned that feature off so I don't end up having to specify which Vector2 I'm using constantly)

brave fable
#

oh to blacklist using System.Drawing from ever appearing in my projects

uncut viper
#

while we're at it fuck system.numerics too

calm nebula
#

(Ahhh but system.numerics is soooooo goood!)

uncut viper
#

not good enough to know when its not wanted

half tangle
#

(I appreciate the very strong opinions - we are all correct)

calm nebula
#

Don't you want TotalOrderIeee754Comparer<T>?

rancid temple
#

Were light sources given string ID's for a specific reason?

calm nebula
#

Hey, I did say I really wanted to do more simd stuff lol

brave fable
#

for qualified naming most likely

lucid iron
#

removing lights used to need iterating whole light source array

rancid temple
#

Oh, oof

calm nebula
#

(Fwiw this is one place where I'm not exactly sure which version is faster. )

#

N approx 50

#

It's probably the dictionary

plucky reef
#

There seem to be some functions, either private or protected, that I can't mess with using Harmony. Is that working as intended?

rancid temple
#

Private you should be able to patch, I dunno about protected, don't think I've tried

next plaza
#

You can

#

You just can't directly reference them

#

If you use AccessTools.Method to get them it will be fine

uncut viper
#

You can't use nameof() on them but you can just write their names with a string

next plaza
#

(Or just specify the name without nameof-^ for annotations)

plucky reef
#

I probably have something wrong in my syntax then, or I'm calling the wrong things.

next plaza
#

Don't use nameof

#

You can't with private/protected/internal

#

Just use "beginSpecialMove"

plucky reef
#

ah like this

#

that worked but broke only the move part of my charge mechanic which makes me think the "stop player from moving" wasn't working to start, so that's progress!

#

and then later I can add a postfix that adds some kind of animation

#

ty

rancid temple
#

Does SMAPI automatically make lightsource ID's unique between mods?

next plaza
#

No

rancid temple
#

Mk, many thanks

calm nebula
#

(it's at least easier than before?)

teal bridge
#

(if they're already in scope, VS won't try to add imports)

calm nebula
#

(I wish C# had scoped imports)

#

ie, "import this namespace but only in this function" type of thing

teal bridge
#

What would that help with?

calm nebula
#

if you have conflicting imports

#

quite often in stardewland I had to have, like, xTile's Rectangle and Monogame's Rectangle

next plaza
#

Yeah, that's always annoying

teal bridge
#

You can alias them as xRectangle and so on though.

next plaza
#

I did that for one of my game projects, it definitely helps

calm nebula
#

(which is what I do.)

teal bridge
#

Try doing it in Java where you have to write com.company.product.foo.bar.baz.something.utility.manager 80 billion times.

calm nebula
#

but certain other languages I like let me import into smaller spaces 😛

next plaza
#

C++ lets you!

#

I'm not sure that qualifies for "languages I like" for atra though

calm nebula
#

(I think c++ is fine.)

teal bridge
#

Certain others are... Rust? Trying to remember if it actually has that, but can't think of any other language you'd be putting in your "liked" list here.

#

Anyway, on topic again... is it safe to write to realMillisecondsPerX fields, or is that something you should never do?

next plaza
#

I think I've done it before for Capstone Professions

lucid iron
#

are you trying to slowdown/speedup time

next plaza
#

Hmm, nope, that did something else

teal bridge
#

Hm, searching your repo and I don't see it.

#

Speed up, in this case. I know there's ExtraMillisecondsPerBlah for slowing down.

next plaza
#

I could've sworn I've done it at some point

teal bridge
#

And assigning a negative value to the extra seems sketchy.

rancid temple
#

Huh, I just noticed I don't have the GMCM options button in the main menu on the beta

#

It's definitely still there lmao

#

Just invisible

next plaza
#

Oh no

teal bridge
#

Uh oh, that means Casey has to update GMCM, which means I have to update all my hacks.

calm nebula
#

what the hell could have changed

next plaza
#

Well, I'm not writing 2.0 just for that

rancid temple
#

Lemme rip this down to a more basic list and check

next plaza
#

Do you have any mods that recolor it?

teal bridge
#

So no one knows about the game speed thing? I can just try it and see, but I'm figuring a lot of things might be very subtly broken and not show obvious signs right away.

next plaza
#

Though I don't see how that would suddenly break

calm nebula
#

myuu this works??

teal bridge
#

Like, I don't know, NPC schedules and such.

rancid temple
#

Shouldn't have anything that recolors

next plaza
#

I wonder if OnRendered isn't getting called on the title menu anymore

#

Specifically Helper.Events.Display.Rendered

calm nebula
calm nebula
#

you might be able to get away with making all the npcs run

half tangle
#

in 1.6.8 I get the GMCM button doubled sometimes (with a recolor) in case that's useful info

next plaza
#

What do you mean doubled?

teal bridge
#

Oh interesting, I saw gameTimeInterval but didn't even occur to me that it might be writable

half tangle
#

[Mod Options]
[Mod Options]

right on top of each other

lucid iron
#

i feel like that is same thing as modifying realMillisecondsPer* tho

teal bridge
#

That's probably a better bet, thanks.

calm nebula
calm nebula
teal bridge
#

Well, most sub-ten-minute calculations use gameTimeInterval along with one of the realMilliseconds fields, they're always used together. So for some reason I assumed gameTimeInterval was fixed.

rancid temple
#

Just to be sure, took it down to just GMCM and it's not there

next plaza
half tangle
rancid musk
rancid temple
#

Yeah I meant main menu

#

Like title screen main menu

half tangle
#

ah, gotcha, haven't seen that in the main menu so nvm 🙂

calm nebula
teal bridge
#

Actually wait, I think gameTimeInterval is the same as the elapsed milliseconds per frame, and Timespeed is really weird for writing to it.

calm nebula
#

fwiw, it also wouldn't fix npc schedulign issues

teal bridge
#

It's not "milliseconds to use for the next interval", it's "milliseconds that the last interval used"

calm nebula
#

I don't think there's a good way to make sure they don't break

#

unless you like, really really want to rewrite scheduling

#

minus that, just make them run lol

teal bridge
#

Haha, loop through all NPCs and change their speed I guess?

calm nebula
#

yup!

teal bridge
#

I don't deal with a lot of NPC stuff except for penpals, are NPC references all "already spawned"?

calm nebula
#

er

uncut viper
#

would patching the Speed getter suffice

calm nebula
#

do you want the answer?

teal bridge
#

Like GetByCharacterName, that's the actual instance of the NPC?

next plaza
#

SP or MP

calm nebula
#

It's definitely true for the host or single player!

teal bridge
#

Well, I need to know the answer in the sense of "does changing the speed on this thing actually change the NPC's speed"

brave fable
calm nebula
#

(also time fuckery only works on host or single player anyways iirc.)

lucid mulch
teal bridge
#

Hmm, that is a good point, I should perhaps just disable the fast-forward feature entirely in multiplayer.

calm nebula
#

if you wanted to resize

#

you can JUST ASSIGN THAT and don't run into issues with that?

uncut viper
teal bridge
#

Actually maybe it would be kind of cool to be waiting for a fish bite and watch both the clock and NPCs whizzing by at warp speed.

brave fable
#

i use texture2d getdata/setdata all the time lol

#

am i not meant to

lucid mulch
#

that code isn't all that different to what SMAPI has pretty much always done

calm nebula
#

the resize

rancid musk
#

I've started doing dynamic texture stuff a little in Better Crafting, just to match recolors with my custom textures. Stole it (with permission) from Matt and his stuff.

calm nebula
#

Again, GetData/SetData are fine (in moderation)