#making-mods-general

1 messages · Page 43 of 1

dusty scarab
#

yes! thank you :D

dense void
#

Yes, that was exactly it; I typed it wrong.

velvet narwhal
#

are you trying to make it pull something up entirely different?

#

cause if you want them to be interconnected you can do it like this:

  "Name": "FacialHairStyle",
  "When": { "Facial Hair": "Mustache" },
  "Value": "Mustache"
},
{
  "Name": "FacialHairStyle",
  "When": { "Facial Hair": "Beard" },
  "Value": "Beard"
},
{
  "Name": "FacialHairStyle",
  "When": { "Facial Hair": "Stubble" },
  "Value": "Stubble"
},
{
  "Name": "FacialHairStyle",
  "When": { "Facial Hair": "Beard Combo" },
  "Value": "Beard Combo"
},```
where the 'name' is the same, so you can just do a flat `{{FacialHairStyle}}` and it will then pick based on what the when conditions are
dusty scarab
#

hm. the id for the bed isn't in the list of items in the template house furniture, but there's definitely one in the farmhouse when it loads. I wonder if beds are just automagically put in, and I don't need to worry about adding one myself?

gilded comet
#

how would i add context tags to object data with c# 😭

#

the OnAssetRequested thing didn't work

lucid mulch
dusty scarab
#

awesome, not something I need to worry about, then. thank you for verifying that for me!

gilded comet
#

i just needed to invalidate the flower cache before the editing. for some reason

silver pelican
#

I have a question about creating custom maps. I'm just a bit confused.
I have layers Buildings and Buildings1 (Buildings1 being on top of layer Building), yet when the map is rendered in the game, items in the Building1 does not have any collision or that is completely passable. I kind of assumed that items in Building layers would be automatically non-passable (or idk if I need to set the property to Passable 0).

rancid temple
#

Buildings is the only layer with collision

#

Any iterations on that layer won't get them

velvet narwhal
#

Buildings2 electric boogaloo is just layering capabilities

silver pelican
rancid temple
#

Passable is used on Buildings to make it passable or Back to make it impassable

uncut viper
#

is passable one of those ones where it doesnt care the value it just checks existence

rancid temple
#

The true or false doesn't matter in either case, it's just a value for you to remember what it does

#

And also it has to have any value

uncut viper
#

very cool

velvet narwhal
#

i had this corundum my first time making a map, it's hardcoded to be buildings specifically

silver pelican
#

this is so saad aaa :'>
okii then SDVconcernedCA i'll have to think over how to map these other buildings kwkwkw

rancid temple
#

I'm not sure why you would use Buildings2 to layer something if you didn't have something on Buildings that would create collision though

#

Like if you don't have something on Buildings then you don't need Buildings2

#

For that tile

silver pelican
rancid temple
#

If there was something on the Buildings layer, even if it was invisible, there would be collision though

#

So that makes it seem like you're somehow losing whatever you put on Buildings or are setting Passable on the TileData

silver pelican
rancid temple
#

The seat part should be on Buildings and the top part on Front I believe

#

Basically that for all of them

#

The bottom tile would be buildings, that would create collision and the top part would be on Front or Buildings2, since they have fence behind them

#

Front is good for if you don't have anything behind them so you can walk behind them properly, but not necessary here

rancid temple
#

If all that fence is on Buildings, you should probably make it only the bottom tile of those too, with the rest of the fence on Front

silver pelican
#

thats brilliant. i'll give it a go rn.

#

then, what is the purpose of doing layers of BuildingsX if it wont create collision?

rancid temple
#

Generally, so you can have stuff on the same z layer

silver pelican
#

hmmm SDVpufferthinkblob

rancid temple
#

It's kind of a niche use case

#

Like it's not very common that you would stack stuff on top of each other like that in such a way that you can't just use a different layer or would definitely need to use a different layer

#

I guess anything you're placing on like a wall next to the ground is a good example

#

You don't want it on Front or AlwaysFront because then it can cause bad clipping when you're walking next to it

#

And you can't put it on Back because it'll be under the wall that's on Buildings

#

So you put it on Buildings2 so that it renders above Buildings but still behind the player

#

Z depth can be a difficult concept to contend with in 2D games

#

I think it's funny how many wall tops inside houses are just on Front, so if you walk next to them with a hat on it clips really badly all over the place

silver pelican
#

thats interesting, i guess i could try to explore this one via mods with their own tilesheets and uses layers of it. this is very useful information

rancid temple
#

Front only renders in front of the player if their Y position is higher than I think the center of the tile

rancid temple
#

Otherwise you render in front of it, but with a normal player sprite you can't tell, but big hats stick out far enough to clip in front and behind over and over

velvet narwhal
#

i have gone a little crazy in my own Buildings2 electric boogaloo, i have a lot of transparent tiles in buildings because of tight corners SDVpufferpain

vernal crest
#

Yep, I tend to avoid Front quite a bit unless I specifically need the front/back aspect of it because it causes weird clipping.

silver pelican
rancid temple
#

Lol, it's an easy way to make your characters model wider than it usually is

dusty scarab
#

I can't seem to find the ID of this Seasonal Plant on the ID Github. is that because it's got a different appearance with every season?

velvet narwhal
#

don't look at the rest of the room, it's a mess

#

smh slob

silver pelican
vernal crest
#

I have a buildings-1 in one of my maps. Not sure why haha

dusty scarab
#

hey, the kitchen is clean, and that's where all the real magic happens

silver pelican
#

kekw

silver pelican
velvet narwhal
#

i think i quite literally went

#

"Buildings is impassable, okay, gonna make this all transparent tiles then so i don't have to think about it later"

vernal crest
rancid temple
#

A shame if you decide to change it though

dusty scarab
#

ahhh, the seasonal plants are in BigCraftable (for some weird reason)

silver pelican
dusty scarab
rancid temple
#

There's also chests in there

uncut viper
#

and scarecrows!

rancid temple
#

The tilesheet is TileSheets/Craftables FYI

velvet narwhal
#

is that useful enough to include into betas, a scarecrow increment SDVpufferthinkblob

uncut viper
#

a what

velvet narwhal
#

a trigger anytime the scarecrow gets a +1

uncut viper
#

oh

rancid temple
#

Like crows it scared?

velvet narwhal
#

ye

uncut viper
#

i dont know how they actually work

velvet narwhal
#

same

#

a trigger for every time the haunted mannquin moved

uncut viper
#

i think those things all just happen on day start anyway

velvet narwhal
#

oh, fair

#

i thought they moved at random intervals

uncut viper
#

(i do not know for sure)

silver pelican
#

that bag doesnt seem so trashuspicious right? is it me? SDVpufferchicksweatsip

velvet narwhal
#

i know you made an (action) make a machine ready, but what about the opposite, a trigger for the machine ready? SDVpufferthinkblob

#

although yknow probably a bad idea

dusty scarab
#

how it's supposed to look, vs 'why is my seasonal plant a 🚫??'

uncut viper
#

that would happen a lot i think

velvet narwhal
#

seeing the images in modded-farmers with their ridiculous amount of machines is asking for trouble

uncut viper
#

yeah

velvet narwhal
#

something about the item ID

#

or actually maybe a bad texture load? quite unsure without seeing the code

silver pelican
#

seconded 6026bunnycrazy

dusty scarab
#

the item in question is (poorly) circled so it stands out a little more. do I need to append it with (BC) since it isn't an actual 'furniture' item?

rancid temple
#

Can you use qualified ID's?

#

Or does it automatically?

uncut viper
#

SDVpufferthinkblob the fact that the others dont need qualified IDs makes me wonder if its hardcoded to add (F) automatically

rancid temple
#

Yeah, it's probably trying to do F

uncut viper
#

it does hardcode the (F)

dusty scarab
uncut viper
#

it only creates Furniture types

rancid temple
#

There isn't a (F)200 so it's an error item

uncut viper
#

even if you write (BC) it uses ItemRegistry.Create<Furniture>

rancid temple
#

Big oof

#

You could create a furniture that is that plant I guess lmao

dusty scarab
#

darn, so that means I can't have the pretty seasonal plant for the starting farmhouse. oh well, I'll just pick another plant, no big deal

velvet narwhal
#

you can probably shove it into the welcome bundle

dusty scarab
#

oh, the rug didn't change either, need to fix that

rancid temple
#

Or mail it

#

"Have this beautiful seasonal plant as a housewarming gift"

#

*the name is smudged out and the ink is strangely... warm?*

velvet narwhal
#

where even is the edit for the welcome bundle

dusty scarab
unique sigil
#

you can add the seasonal plant into the starter gift as a compromise?

unique sigil
dusty scarab
velvet narwhal
#

....i just had a horrible idea

silver pelican
#

spill

dusty scarab
#

tell me!

velvet narwhal
#

i don't know if i can implement it though

#

letting mod authors spawn animals out of huge crops being broken SDVpufferthinkblob

dusty scarab
#

that would be hilarious

silver pelican
velvet narwhal
#

well the very first thought was popping a baby out of the big crops but SDVkrobusgiggle

unique sigil
silver pelican
unique sigil
#

that would be hilarious bc theres a local folklore with that exact concept here. except it was a baby, not animals

spice inlet
#

afaik animals are bound to their coops and barns. How would you solve that?

silver pelican
#

What folkloooree

velvet narwhal
#

brain was thinking of "momotaro"

unique sigil
#

yeah like momotaro. except im not japanese haha

velvet narwhal
#

i'd probably figure some way around getting the player to select a building

#

i'm just thinking of more chaos to put into customfields SDVpufferthinkblob

silver pelican
#

what if

#

you get randomly warped somewhere upon breaking a huge crop (like RNG)?

dusty scarab
#

also @unique sigil, thank you for letting me peek at your farm's stuff to figure out how to make config files. it was very, very helpful :D

velvet narwhal
#

BETAS can probably do that better, in terms of like the breaking... of a large crop? idk

unique sigil
uncut viper
#

breaking a giant crop wont count as harvesting a crop for BETAS trigger purposes

velvet narwhal
#

is it the same effect as chopping a tree down

uncut viper
#

¯_(ツ)_/¯

velvet narwhal
#

time to dig

rancid temple
#

Atra has a mod or two revolving around giant crops you could look at

dusty scarab
unique sigil
#

which reminds me i should probably eventually make a farm cave bundle

velvet narwhal
#
{
    giantCrops = GiantCrop.GetGiantCropsFor("(O)" + this.indexOfHarvest.Value);
    return giantCrops.Count > 0;
}```
this is the only thing i see the object for so iunno
unique sigil
#

repurpose the ones ive made for my mods at least

dusty scarab
#

hooray! I was able to add it to my starting gift!

silver pelican
dusty scarab
unique sigil
#

understandable. i use aimon's right now, but i enjoy adding customized farm caves to my recent farms

dusty scarab
#

...this is weird, I can't seem to find the one I use on the nexus anymore. not by searching for file name, not for searching by author, and it doesn't have update keys

rancid temple
#

Maybe they unlisted it, Nexus search is also pretty bad

dusty scarab
#

maybe. that's bizzare

uncut viper
#

to create a makeshift custom trigger

#

actually it does also get called before the giant crop is destroyed if the farmer has the shaving enchantment on their axe

#

so not perfect

#

but not that bad

velvet narwhal
#

so betas can do it SDVkrobusgiggle back to the drawing board of what i put in my -core

uncut viper
#

well, BETAS can let you run an action when (mostly) a giant crop is destroyed, but thats it

velvet narwhal
#

everything pretty much has a customfield huh

#

SDVpufferthink ...wait

#

public override bool IsVillager => false; how much chaos can i sew by changing this to true in the child.cs

uncut viper
#

a lot most likely, and thats if that isnt inlined into something you can't patch

velvet narwhal
#

brain too dead to think more on that

#

...wait

#

i can make my own trees glow now

dusty scarab
#

hm... is a greenhouse that holds 8000 crops truly ludicrous, or should I aim higher? XD

nocturne pumice
#

Im creating a mod to collect data from stardew, any idea how I can get the details of the fishing activity? Like the how far the bait landed, bar progress while fishing, time taken, if there were rewards boxes in it?

uncut viper
#

by finding the relevant functions in the game code and tracking that stuff manually with various code and harmony patches

#

for fishing stuff specifically id explore the FishingRod class

nocturne pumice
#

Hmm so harmony patches guide is the the wiki?

uncut viper
#

there are pages about harmony on the wiki and i think there might be some guides on the modding specific wiki but i dont remember

rancid temple
#

Atra was gonna rewrite the harmony guide tomorrow I think, not sure exactly what they're wanting to change

velvet narwhal
#

i think it's because the example of postfix is written... in... reflection...?

rancid temple
#

Something about unnecessary reflection

nocturne pumice
#

Ohk then I’ll wait for the update ig

velvet narwhal
nocturne pumice
#

Is there a harmony patch mod i can look at the code?

uncut viper
#

i also dont know what atra wanted to change or understand what they meant by unnecessary reflection

#

and there are probably hundreds of mods that use harmony

rancid temple
#

Yeah no idea which guide, they didn't link the specific issue lol

velvet narwhal
#

tbh i have had no luck looking by example cause there's a multitude of things going on that isn't harmony

rancid temple
nocturne pumice
#

Also does harmony patches cause frequent crashes?

rancid temple
#

The game itself shouldn't crash, but your mod might

#

Harmony can break shit real good though

velvet narwhal
#

Using harmony assumes you know c# unless you get handheld like me SDVpuffersquee

nocturne pumice
#

Yeah I already have a working mod with c#

#

But I don’t want the mod to crash because of harmony

uncut viper
#

it only crashes if either you write code that doesnt work or someone else writes code that breaks your code. and the second can happen whether you use harmony or not

#

because other people are using harmony whether you're using harmony or not

#

harmony itself does not cause crashes

rancid temple
velvet narwhal
#

(OH I can delete that one line from my code SDVpufferangy )

rancid temple
#

Best bet is to check out the site Avi linked

nocturne pumice
#

I see also stupid q but what is harmony, is it a code injector?

rancid temple
#

It's a library

#

That site also has a good description of what it is lol

nocturne pumice
uncut viper
#

Harmony will modify the method info of functions you tell it to in order to run harmony patches alongside (or within) then

#

so, sort of

velvet narwhal
#

Button says trigger words and I immediately pull up the harmony website SDVpufferflat

rancid temple
#

Aside from transpiling, most of my harmony knowledge has come from that site and seeing how others do things

nocturne pumice
#

Yeah now time to have an llm summarize that website for me

rancid temple
#

Good luck with that I guess

#

Be more useful to just blindly slap your keyboard in a C# script

nocturne pumice
#

This is not just for fishing but other stuff too right?

rancid temple
#

Harmony is for everything

nocturne pumice
#

Like any general source code of the game

rancid temple
#

Important to make sure you're enabling Harmony through SMAPI and not installing a separate package for it, since SMAPI ships with a specific version of Harmony that you have to use

nocturne pumice
#

Gotcha

#

also which is the source code repo y'all use: im using

rancid temple
#

First of all, there's only one decompiled repo that's allowed and it's invite only

finite ginkgo
#

Don’t use source code repos.

proud wyvern
#

it's NOT okay to put out the source code like that.

finite ginkgo
#

!decompile

ocean sailBOT
rancid temple
#

Second, that one is for 1.5.6, so you should decompile the code yourself to the latest version

nocturne pumice
#

ohh mb

proud wyvern
#

this annoys me

rancid temple
#

Yeah, the whole thing is insane

nocturne pumice
#

ty

#

also is the stardewvalley.dll in the same folder as the exe (windows and steam setting)

dusty scarab
#

I would delete that link to that unauthorized decompiled code. I think people could use that to recompile the game and thus own it without buying it

rancid temple
#

I would actually be surprised if it recompiled and worked lol

proud wyvern
#

you'd still need the content files anyway

calm nebula
#

Re: harmony not causing crashes

#

Harmony also isn't exactly child safe

#

While you can (mostly) avoid crashes if you know exactly what you are doing, you have to know exactly what you are doing

#

Good luck have fun making chatgpt do that!

tiny zealot
#

currently having a sensible chuckle at this line of code:
this.ReloadTextureIfNeeded(forceReload: true);

lucid mulch
#

wait people are trying to get LLM's to write harmony patches? lmao

#

I barely trust it enough to name my silly mods with heavy supervision, let alone write some of the most alien C# code possible

brittle pasture
#

oh yes they do, saw at least a couple case posted here myself

#

someone asked ChatGPT to write code that reskins the tractor into a tank while hiding the player sprite, it spat out some impressively mind boggling code that patches TractorTool's draw code

lucid iron
#

selph is there any mod using emc extra outputs atm

brittle pasture
#

(spoiler alert: there is no TractorTool)

lucid mulch
#

well yeah Tractors are horses, duh

brittle pasture
lucid mulch
#

I wonder if the LLM only has Shovels code as a reference and as a result all harmony patches for stardew must involve tools

tiny zealot
#

oh that's a very silly thought, i like it 😄

royal nimbus
#

going a little crazy here. i checked this so many times over and copy/pasted it from ones that work, but this bit just isnt working in game. maybe there's something small im missing? idk. his sprite keeps being invisible and portrait is the default one.

finite ginkgo
#

You've overridden the default entry completely, so it only has what you've given it, aka a precedence and no sprite nor portrait, as for the other ones they should work, i don't see any obvious mistakes with those

#

(though the default should be fine since none defaults to the default sprites and portraits)

royal nimbus
#

i have some for all seasons

#

it's just refusing to acknowledge the summer ones. maybe the fall ones too. i can check rq

#

i checked the file placement too and the spelling and its all correct

vernal crest
#

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

I've been getting much further than expected, but I'm stumped on this error
can't find it anywhere either, but I think it's a very basic mistake I've made Cx

Error (active) CS1061 'ModEntry' does not contain a definition for 'Config' and no accessible extension method 'Config' accepting a first argument of type 'ModEntry' could be found (are you missing a using directive or an assembly reference?)

tiny zealot
# ocean sail

recommend running patch summary in the SMAPI console when you see the wrong graphics before uploading a log here

royal nimbus
ocean sailBOT
#

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

tiny zealot
tiny zealot
royal nimbus
#

okay

tiny zealot
#

your log already has some helpful errors and warnings though, so that's a start

royal nimbus
#

yeah what i saw was tmx stuff which im saving for last x__x

ocean sailBOT
#

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

royal nimbus
#

there's so much there, it breaks my brain

finite ginkgo
#

The useful part is
NPC Elliott can't load portraits from 'Portraits/Ralo.GothFriendlyElliott_Fall' (per appearance entry 'Fall' in Data/Characters): Microsoft.Xna.Framework.Content.ContentLoadException: The content file was not found.

You've got some sort of disconnect with the name of the portrait you loaded and the one you're telling it to use

royal nimbus
#

o__O

#

yeah i dont get how as everything's placed right

finite ginkgo
#

Your patch summary shows you're never loading Elliotts new portraits and sprites, are they in a file you forgot to include?

tiny zealot
#

your comments aren't closed above the patches for his portraits

tiny zealot
finite ginkgo
royal nimbus
#

let me see if that makes a difference then

tiny zealot
#

did you turn off syntax highlighting in your editor?

#

it will extremely make a difference

teal bridge
#

Can we have like, a giant undismissable banner on this channel that says "Use an editor with syntax highlighting"?

(I'm joking. Maybe. Kind of.)

tiny zealot
#

definitely a joke. doing so will not solve the problem

finite ginkgo
royal nimbus
#

that fixed it

#

lol wow

#

that is so annoying. thank you tho xD

hallow igloo
finite ginkgo
#

That would be correct, as for the dereference of a possibility null value or whatever the warning is you can safely ignore it

hallow igloo
#

Including this one?

Non-nullable field 'Config' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the field as nullable.

finite ginkgo
#

Yes

inner storm
#

Obligatory "I don't know anything about coding"
I'm unfortunately trying to have my cake and eat it too.

The Yaks mod for 1.6 says you should be able to milk the yaks and they drop fiber overnight. Right now they're dropping both milk and fiber.

I'd like to be able to milk them while the fiber drops overnight, looking into the file I /think/ it's set up to do so but it's just.. not working in game?

hallow igloo
#

update:

[PolyCarts C#] This mod failed in the GameLoop.GameLaunched event. Technical details:
NullReferenceException: Object reference not set to an instance of an object.
   at PolyCarts.ModEntry.<PolyConfig>b__2_2() in \PolyCarts\PolyCarts C#\ModEntry.cs:line 144
   at GenericModConfigMenu.Framework.Api.AddSimpleOption[T](IManifest mod, Func`1 name, Func`1 tooltip, Func`1 getValue, Action`1 setValue, String fieldId) in C:\Users\space\Programming\StardewValley\StardewValleyMods\GenericModConfigMenu\Framework\Api.cs:line 519
   at PolyCarts.ModEntry.PolyConfig(Object sender, GameLaunchedEventArgs e) in \PolyCarts\PolyCarts C#\ModEntry.cs:line 140
   at StardewModdingAPI.Framework.Events.ManagedEvent`1.Raise(TEventArgs args) in SMAPI\Framework\Events\ManagedEvent.cs:line 101```
brittle pasture
#

looks like you tried invoking a null somewhere

brittle pasture
inner storm
#

Sometimes i edit configs in notepad?

hallow igloo
brittle pasture
#

This might be a different null then. What's the code on line 144?

hallow igloo
#

getValue: () => this.Config.SimplifiedCarts,

brittle pasture
#

!cp

ocean sailBOT
hallow igloo
#

public bool SimplifiedCarts { get; set; } = false;

brittle pasture
#

(Also I just recalled our earlier convo in modded-farmers, so what you want is an EditData patch on the custom asset added by Extra Animal Config)

#

(The guide to do so is a bit advanced and assumes familiarity with CP, and CP custom asset editing beforehand)

tiny zealot
inner storm
#

I'll give it my best shot.

tiny zealot
#

try adding
this.Config = helper.ReadConfig<ModConfig>();
to your Entry method

hallow igloo
#

that, seems to have done the trick!

tiny zealot
#

SDVpufferthumbsup (your homework is to discern why /lh)

hallow igloo
#

I guess the class where I define the options stores them, but then the private void I use doesn't know that and this let's it know they exist?

#

okay, now that I've got this to work, can I actually use the configs I set using C# in the CP part of my mod?

finite ginkgo
#

As I replied over in ES, the best way would be to add CP tokens that reflect the value of each config option

hallow igloo
#

maybe I don't understand what you mean then

finite ginkgo
#

So by default configs can only really be read by the mod that add them, this is especially true for CP mods

That said, since you're making a C# mod for the configs, you can use the ContentPatcherAPI to add a cp token that reflects the value of the config, so for example there's your SimplifiedCarts config option, what you'd do is add a SimplifiedCarts CP token that outputs true/false based on the config option, and then in the CP part you'd access that config by using the token, for example {{C# Component modid/SimplifiedCarts}} (custom CP tokens are automatically prefixed with the modid that adds them you can't change that part)

hallow igloo
#

oooh dynamic tokens CAN be shared across mods?

finite ginkgo
#

They're not dynamic tokens, they're just tokens

hallow igloo
#

oh gotcha, fair point

finite ginkgo
#

It's the same way Season is a token, just instead of being added by a different mod Season is provided by CP by default

hallow igloo
#

it's never been useful at all before so this section had been deleted from my memory

latent mauve
#

I forget, can tokens be used in speech for dialogue and events, or just dialogue?

finite ginkgo
#

CP tokens? They can be used anywhere

#

But if you mean things like @ in dialogue turning into the player's name, they work in event dialogue but not textAboveHead

inner storm
#

I can make an omelette with quail eggs but yak milk is a step too far >:T

tender bloom
#

Category milk should make it milk

inner storm
#

it says "Category: "-18""

#

i'm assuming thats... right?

tender bloom
#

try using lookup anything on the yak milk

#

you can fiddle with the config of lookup anything to get it to show a lot of info

inner storm
#

OOOOOOOOOO

#

-6 not -18

ocean sailBOT
hallow igloo
#

okay I get the concept, but directly following the instructions in CP's documentation gives these errors:

lucid iron
#

did you copy the content patcher api

hallow igloo
#

yes

#

that's what gives the last two errors

lucid iron
#

gotta change the namespace in there

#

if u dont need the ParseConditions/ParseTokenString u just delete those from ur copy of the api

hallow igloo
#

I removed the two methods I don't need

#

it still gives the framework error

lucid iron
#

did you change the namespace and usings

vernal crest
#

Man alive it is difficult to google information about github

lucid iron
#

what r u looking for Bolb

hallow igloo
vernal crest
#

I want to know if there's a way to stop github yelling at me about comments when I am looking at a json file

hallow igloo
#

as in github's integrated vscode?

lucid iron
hallow igloo
lucid iron
#

ah then maybe it's wherever you are using IContentPatcherAPI think

#

it'll help if you can paste the full error message

hallow igloo
#

CS0234 The type or namespace name 'Framework' does not exist in the namespace 'ContentPatcher' (are you missing an assembly reference?)

vernal crest
hallow igloo
lucid iron
#

do you have using ContentPatcher.Framework somewhere?

hallow igloo
#

as CPs docs say I have to

lucid iron
#

yea get rid of that u dont need it

hallow igloo
#

okay gg I hate C# documentation so far xD

lucid iron
#

if you compare to my version of the api interface, i only have using StardewModdingAPI;

#

this aint really standard C#, it's pintail Bolb

hallow igloo
#

okay now I'm trying to register tokens, but I'm not sure how to set the value of a token

#

it needs to be a string, but the GMCM API uses a bunch of different things and I can't jsut plug a bool into the register function

lucid iron
#

you are not registering a string

#

instead you are registering a delegate that returns a string

#

(list of strings actually)

#

that is what Func<IEnumerable<string>?> means

hallow igloo
#

okay that's good to know

lucid iron
#

you know what delegates/lambdas are right DokkanStare

hallow igloo
#

I was unsure what the () => {} actually meant

#

I have no idea! I did like 2 chapters of C# on codecademy which was awful

gilded comet
#

short & cute little function declaration

hallow igloo
#

so I just started, which has massively been easier lmao

lucid iron
#

yea pocket functions go

#

so in my example here

CP.RegisterToken(
    ModManifest, "EffectClass",
    () => { return [typeof(TrinketTinkerEffect).AssemblyQualifiedName!]; }
);
#

() => {} is the delegate, it takes no arguments (hence ()) and returns a IEnumerable<string>

#

i could omit the {} actually think

#

() => [typeof(TrinketTinkerEffect).AssemblyQualifiedName!]

rancid musk
#

That could be written as ```cs
CP.RegisterToken(
ModManifest, "EffectClass",
() => [typeof(TrinketTinkerEffect).AssemblyQualifiedName!];
);

lucid iron
#

mabe i had more stuff here b4 kyuuchan_run

#

its fine if you just want to give it a constant, but it still gotta be written as a delegate

#

like () => ["my const string"]

hallow igloo
#

I got this far before, now I got stuck on how to put my Config.SimplifiedCarts here

lucid iron
#

is config a field on your ModEntry?

hallow igloo
#

yes

#

iiuc

lucid iron
#

yea then just like this (in a game launched handling method on ModEntry)

CP.RegisterToken(
    ModManifest, "SimplifiedCarts",
    () => [Config.SimplifiedCarts];
);
#

if its not a string then do .ToString()

hallow igloo
#

oh gfd that should go on the end

#

thanks so much lmao

lucid iron
#

assuming this is bool, then in CP component you can do

"When": {
  "polydot.csharpModId/SimplifiedCarts": true
}
#

dont use the cp mod's id

ornate trellis
#

man, don't you love it when you add a location the other suddenly doesnt exist anymore...

#

i didnt even touch that locatipns code except add a warp to the new location to it evaporated

hallow igloo
#

still getting an error

#

CS8936 Feature 'collection expressions' is not available in C# 10.0. Please use language version 12.0 or greater.

lucid iron
#

Oh u need lang features

hallow igloo
#

let's say, hypothetically, I dpn't know what that means

#

ooh

lucid iron
#

I normally put latestMajor

#

If u don't want to do that then u need to use new instead

#

new string[] { stuff }

calm nebula
#

Why are you making your config a c# mod atra asks

hallow igloo
#

submenus

calm nebula
#

Ugh

hallow igloo
#

I have like 150 settings, with many more to come, and most of them are useless to most players

lucid iron
#

Tbh maybe just don't make a content patcher mod kyuuchan_run

hallow igloo
#

I don't want that to be just one big scroll page

lucid iron
#

Do it all in c# asset pipe lol

hallow igloo
#

no I would die

lucid iron
#

Why do u have 150 settings

hallow igloo
lucid iron
#

It's probably too late to ask but that's a lot

hallow igloo
#

my mod's a minecart overhaul

#

each minecart is optional

#

has an option for a custom name

#

and in a bit they'll have a simplified version as well

ornate trellis
#

guys, big quiestion: why can i still right click my door when i just have a simple addwarps that goes with touching the warp evaporated

hallow igloo
hallow igloo
lucid iron
#

Edit your csproj file

hallow igloo
#

oooh

teal bridge
lucid iron
calm nebula
#

(Tbh it feels like going through CP at all is overcomplicated)

lucid iron
#

Like maybe some extra menu on minecart interaction

calm nebula
#

Yeah

hallow igloo
calm nebula
#

Float a little pencil near the Minecart menu

hallow igloo
hallow igloo
#

maybe I'll get there once

teal bridge
#

Assume that 98% of users will never look at the config menu. Simplified should probably be the default.

gilded comet
hallow igloo
plucky reef
#

C# is a programming language of all time.

hallow igloo
#

it barely is

#

it started out outdated

ornate trellis
#

yeah but how do i not have that....i never made it as a "door" and it doesnt happen to other warps

hallow igloo
#

that's odd

#

is it a custom map?

ornate trellis
#

its a map patch to GI

lucid iron
#

Although I feel the structure of cp config isn't very conductive to this I've wanted ability to preview textures in cp config before

ornate trellis
#

i used to have a different warp but i got rid of the old one

hallow igloo
#

it has image support

lucid iron
#

Some mods like Gwen's craftables have a lot of texture options

ornate trellis
#

and when i look it up with lookup anything it just gives me my one warp

hallow igloo
vernal crest
hallow igloo
#

either in the tile properties, in an object, or in the map properties

lucid iron
lucid iron
#

Or rather, a target in game bolbthinking

hallow igloo
#

in fact, you can only do the full iamge by specifying the full image as a rect

lucid iron
#

The horse texture

hallow igloo
#

wdym?

lucid iron
#

There's a CP horse mod that let you build a horse from parts

ornate trellis
#

i also dont get my other map warp to work wth

lucid iron
#

So the preview needs to show the final horse

hallow igloo
#

besides making thousands of images ofc

#

you should be able to use the parts as overlapping textures

#

not sure if you can have it update live when selecting the config

lucid iron
#

Yea that's a thing which need custom draws with gmcm api

hallow igloo
#

that's really cool btw!

plucky reef
#

what a wonderful mod name.

vernal crest
ornate trellis
#

one sec

hallow igloo
#

I do kinda feel like it would be easier to make it an html5 page that zips your final selection into the mod, as most poepl will only ever pick one skin and keep it that way

ornate trellis
#

also tried 7 3 (hence the walls on the buildings layer) but also not working

#

now for that ladder that right.click warp might be good but idk anymore after that door that isnt a door

vernal crest
#

I think I am missing something because your Lookup Anything is of the Island South map, but your map patch is of an indoor space.

#

How are you patching an indoor map onto an outdoor one without making everything weird?

ornate trellis
#

oh yeah that was just from the other issue with the rightclickable warp there

#

whcih was my other problem

vernal crest
#

Okay, I'm going to think about one at a time or I will get them mixed up

ornate trellis
#

yeah sorry i jsut thought id include it since i mentioned both

vernal crest
#

So can you share a screenshot of the door that is meant to be a TouchAction warp but isn't? The one that's on the IslandSouth map?

ornate trellis
#

the funny thing it is touch like it should be. But it is ALSO right-clickable....

vernal crest
#

Are your object layers hidden in Tiled?

ornate trellis
#

map also has no warp in it via tiled

#

I USED to have a map warp in there but thats long gone

vernal crest
#

Hmm. Try doing a patch export of Island_S and see if anything shows up in Tiled for it

lucid iron
ornate trellis
#

hm

#

what right name would island_S be tho cuz smapi is yelling at me

#

oh wait i forgor folder

#

HUH

#

ok i forgot i had lnhs island overhaul enabled and was like wth are all those tildedata but anyway

#

why this here

#

i deleted those warps, huh

vernal crest
#

Patch summary time?

vernal crest
ornate trellis
#

AH

lucid iron
#

So u see the MizuJakkaru/Cornucopia

ornate trellis
#

I think i found the issue

#

and i cant fix it

lucid iron
#

So u can just replace github.com with vscode.dev/github

ornate trellis
#

i disabled lnhs island overhaul and that pesky warp is gone so its probs from lnh testing to have the overhaul compatible with fishmonger

#

so i guess we can scratch that issue for now...

#

back to the warp that doesnt wanna work then, hm

vernal crest
vernal crest
ornate trellis
#

LowerDeck to The Upper deck aka the original inside map

#

I can go from the top to lower deck but not the otehr way around

vernal crest
ornate trellis
#

yeah but the first one from Island_S with the same does work

#

oh wait

iron ridge
ornate trellis
#

youre onto something tho

#

i think

vernal crest
#

Are your maps and locations name the same?

ornate trellis
#

i named the lowerdeck map wrong tho

#

my lowerdeck target is wrong

#

and no i am dumdum and changed them halfway at some point :B

#

it works now

vernal crest
#

That will be why I wasn't sure which was the issue - I can never remember if it's the location name or the map name that matters in any given situation because I always have them identical. And since I couldn't see your location json I wasn't sure what you'd called them.

ornate trellis
#

now I broke my cjb warps tho when I added some wrps to it while waiting lmfao anyway

ornate trellis
#

now onto fixing the halfasses warps i added to my cjb 🤔

#

ah, a forgotten comma ofc

vernal crest
#

You're welcome, btw 😉

ornate trellis
#

yeah, thanks! tbh i am really glad this channel exist cuz my always confused ass gets so lost in the sauce it gets hard to find the issues sometimes mildcry

vernal crest
#

So it goes! It's usually easier to spot someone else's typos or mismatches than your own because you get so used to just looking at the same code over and over again when it's yours and you stop really reading it.

ornate trellis
#

true, true

#

a totally normal cjb warp list SBVLmaoDog

vernal crest
#

Nothing out of the ordinary here lol

ornate trellis
#

thats what one extra letter does lmao

#

anyway, theres a reason why i prefer the art part of making a mod lol

vernal crest
#

That seems to be the way. I don't know if I have seen anyone say they enjoy both parts equally (or nearly so). I wonder if 6480 might SDVpufferthinkblob

ornate trellis
#

that said, I DO enjoy when it comes together so I accept the suffering xD

vernal crest
#

That is how I feel about the art side haha

ornate trellis
#

its odd how i got attacked to this mod tbh, it all started with a "oh i wanna try making a random npc" and picked a character design i made years ago but never used for any story

#

attacked?

#

attached lol

vernal crest
#

Lol

finite ginkgo
vernal crest
#

Nice!

calm nebula
exotic pilot
vernal crest
#

Yaaay!

hallow prism
#

congrats on the update moe, it's good to see you are back 🙂

final arch
#

dont think its an update

exotic pilot
hallow prism
exotic pilot
hallow prism
final arch
#

I stoll used the fixed up one from atra

#

it throws an exception every time you stop UGiggle

calm nebula
#

It does?

final arch
#

so I prob switch over, ty :3

calm nebula
#

No one told me

final arch
#

I think yeah 😆 its fine it breaks nothing

hallow prism
#

i mean, it just means atra's work exceptional, right?

calm nebula
#

I mean I find it near uncontrollable tbh

#

Also don't expect me to clean it up and post it to Nex7s

hallow prism
# calm nebula No one told me

(that's because i'm shy and it didn't break anything and i didn't care because i have the solution i needed so... )

vernal crest
#

I just couldn't get atra's one to work at all :( I was obviously doing something wrong

hallow prism
#

(also you don't have a lot of free time, why bother you with harmless errors?)

calm nebula
hallow prism
#

if i add a tile data with invalid property game will just ignore it, right?

calm nebula
#

Yes

vernal crest
#

I was just scouring in here downloading everything I could and hoping, lol

calm nebula
#

Oh I see

#

I know the issue, will be fixed

#

Remind me in 28 hours

#

Botto

#

Remind me in 28 hours to fix the obvious disposal error

patent lanceBOT
#

[blinks] what now? yeah uhhh sure thing boss (#6266860) (28h | <t:1727563667>)

hallow prism
# calm nebula Yes

cool, i want to reuse the "do not cut" property of VMV in another mod (since it's a small mod that doesn't really need a whole C# component just for one tree. if players steal tree, well, so be it)

calm nebula
#

It occurs to me

#

That you don't necessarily need to give the tree a valid sapling

#

Just make it any random object like coal or something

lucid iron
#

do you just have 2 versions of the tree then

hallow igloo
#

I actually counted and it's not that bad yet, including the new style options I now have 120 settings!

raw kelp
#

so im not sure why but my custom map that was working yesterday is just... not working now. it doesnt say an error or anything, it just isnt in the game anymore. its still in the files, still in the json, it just doesnt show up for some reason

finite ginkgo
#

And green tea

tender bloom
#

that gives you a bunch of info on what CP did/didn't do

teal bridge
tender bloom
#

!patchsummary

ocean sailBOT
#

Can you do these steps to provide more info?

  1. Load your save and view the content that should be patched.
  2. Type patch summary directly into the SMAPI window and press enter.
  3. Upload your SMAPI log to https://smapi.io/log (see instructions on that page).
  4. Post the log link here.
old edge
#

How do we go about numbering beta versions?

exotic pilot
teal bridge
#

Ah, I see... yes I suppose that's one way around it.

teal bridge
lucid iron
hallow prism
#

(normal bubble may happen in VMV too, they are just rare so i wanted extra. MORE. MORE...)

teal bridge
#

So normal bubbles do still happen? Hm, the incompatibility chu mentioned seemed to indicate that bubbles weren't showing up at the predicted times, but maybe it's because the random state is changing due to other things going on the 10m update.

#

Sounds like I won't get to the bottom of that one without a source dive.

simple rivet
#

Hello! I would like to either make or download a mod that changes professions, Ive read the wiki on how to make a mod and watched some tutorials on youtube, mostly focused around assets, how would I be able to edit something like profession buffs? ive searched on nexus and there doesnt seem to be alot of balancing mods around.
So, how can I edit professions or is there a mod that already balances them? thanks!

hallow prism
teal bridge
#

No no, it's not a bug in your mod, the report was that AFS was mis-predicting bubbles in MV. (Since I just released it a week ago, and since chu only reported it a few days ago, you would not likely have heard of it.)

tender bloom
#

Have you ever programmed before?

teal bridge
#

I was merely trying to get a high-level understanding of why that might be the case.

simple rivet
tender bloom
#

In C# or some other language?

simple rivet
#

Mostly Lua but ive seen some C# on unity

tender bloom
#

Ok, so Stardew is in C#, so you'll definitely need to be/get familiar with C# specifically

#

!decompile this is one important resource

ocean sailBOT
tender bloom
#

Basically, you'll want to read/reference the source code around professions

simple rivet
#

thank you very much, ill take a look at it

tender bloom
#

both of these I believe have source code you can look at to get some idea of the scale involved and clues as to which parts of the source code are relevant

lucid iron
teal bridge
#

Thanks, I appreciate it, though I am not sure a more detailed bug report would point me to the root cause unless we weren't clear on the exact issue (missing bubbles vs. spurious bubbles).

hallow prism
#

(feel free to let me know if something can be changed to accomodate stuff in VMV, i can always ask Sheku to take a look if needed)

teal bridge
#

Will do, thanks. I probably will not know what kind of change (if any) would be helpful until I figure out why the predictions are off, aside from the very general sense of "vanilla vs. not-vanilla".

lucid iron
#

the thing i recall is the train station (on vmv side) having a bubble timer with really long duration

#

without visible bubble anywhere

teal bridge
#

Blue or green duration?

lucid iron
#

but since i only saw it once i should confirm if i just remember wrong

#

blue iirc?

hallow igloo
ocean sailBOT
#

Log Info: SMAPI 4.0.8 with SDV 1.6.8 build 24119 on Microsoft Windows 10 Pro, with 19 C# mods and 17 content packs.
Suggested fixes: One or more mods are out of date, consider updating them

teal bridge
#

Hmm, who knows if it's even a bug then. Blue means upcoming so it's not a long bubble duration, it's a long wait until the next bubbles.

lucid iron
#

oh then i misinterpreted DokkanStare

teal bridge
#

Which, given what we've discussed about VMV doing moar bubbles, is likely erroneous - but nevertheless a different issue from it thinking that bubbles should be there now and not disappearing for another 7 hours or w/e.

next plaza
hallow igloo
#

the documentation says this
/// <param name="allowedValues">The values that can be selected, or <c>null</c> to allow any.</param>

#

I can try, but I fear if I use an empty string it'll use the empty string as the custom name

next plaza
#

Ah, I was thinking you meant for the main value

lucid iron
#

are you returning string? values in your cp tokens?

hallow igloo
#

maybe I am actually!

next plaza
#

Can you show me that line?

lucid iron
#

might want like Config.NullableStr ?? "" instead

teal bridge
#

I think the fundamental question (and I still have not looked at the source code) is: does VMV's moar-bubbles feature interact with performTenMinuteUpdate and fundamentally change how the bubbles are generated, or is it a sort of standalone thing that runs in parallel to the vanilla 10m?

If it changes the random check threshold, that'll definitely throw off predictions. However, even if it uses some separate method to spawn bubbles, if it lets the GameLocation know that those bubbles are the current splash spot (which, normally, only one splash at a time is allowed) then that would still throw off predictions because the intervals at which AFS is checking for "should vanilla bubbles start" is really an interval for "should custom bubbles end" (it's the same random used for starting vs. ending checks).

hallow igloo
#

public string Bus_Stop_Minecart { get; set; } = null;

#

so yes

teal bridge
#

(Anyway, probably TMI, as I said before I'll just have to source-dive)

hallow igloo
#

ur saying if I try "" instead of null it might work

hallow igloo
lucid iron
#

the cp token is expect a list of non nullable strings as the return value yea

hallow igloo
#

I don't know what the nullable thing is really

lucid iron
#

so it'll get confused if u throw a null at it

lucid iron
hallow igloo
#

it did, a LOT of them

lucid iron
#

well yea u should handle it then blobcatgooglyblep

hallow igloo
#

but someone said to ignore the null warns

lucid iron
#

or just use empty str ""

hallow igloo
#

and it works fine everywhere else

lucid iron
#

like many things it's not a problem until it is SDVpuffersquee

hallow igloo
#

it also says this as a sollution for new green lines

lucid iron
#

and personally speaking i believe in handling warnings, especially if im new to the language

hallow igloo
lucid iron
#

what other programming langs do u know Bolb

teal bridge
#

Who said to ignore them?

lucid iron
#

i ask so i can pick right words to describe

hallow igloo
#

html, css, json, regex

#

minecraft commandblock

lucid iron
#

wow none of these r oop bolbonfire

teal bridge
#

I won't say all of us, but many of us use <WarningsAsErrors>Nullable</WarningsAsErrors> and I really highly recommend doing so.

hallow igloo
#

oop?

hallow igloo
teal bridge
#

Well... don't ignore them. If a type is specified as non-nullable, then you shouldn't pass in a null value.

#

That's why the system exists, to prevent buggy code from passing in invalid null values where they aren't expected.

lucid iron
#

so ModEntry is a class which can have instances, and you can use this. to access stuff on the current instance of ModEntry

hallow igloo
#

yeah I get that

lucid iron
#

its optional cus C# does implicit this i think

#

is that right word think

hallow igloo
#

no but I get you

lucid iron
#

so its just the linter is telling u to use this. for style reasons

finite ginkgo
# hallow igloo endertedi I think

Yeah I meant specifically for the ‘private ModConfig Config;’ line (since we know it’s not going to be null) not for everything

hallow igloo
lucid iron
#

same idea, just linter being hung up about it

lucid iron
#

this is ignorable but i am unsure what setting it is to disable

hallow igloo
#

for example the private ModConfig Config; also says Non-nullable field 'Config' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the field as nullable., but it's that way in all mods I looked at for reference

lucid iron
#

see you won't be able to obtain config until Entry, which is not the constructor

hallow igloo
#

aaah so it's just a heads-up, more than a warning

lucid iron
#

so i usually just use nullable mod config like this, which i properly fill in Entry

private ModConfig? config = null;

and i can access it like

config!.whatever
#

the ! is you saying trust me bro its not null to the compiler

hallow igloo
#

oooh that's kinda cute

#

does it also make it so that if it IS null it'll just perish?

finite ginkgo
#

No

lucid iron
#

You would get a exception at runtime if it was null there

hallow igloo
#

yeah that's what I meant

#

I see how that was v unclear tho

lucid iron
#

That happens regardless of whether you use the !

#

There's not much difference between doing this vs just ignoring the warning but it conveys intention

hallow igloo
#

also no warning looks nice

calm nebula
#

Remind me to link you the repo. We have one.

hallow igloo
#

I don't know bout this one, cause it indeed CAN be null

#

as seems to be intended by GMCM

#

no wait that's just for the allowedvalues

teal bridge
#

Because the field itself can be null, even if the config is not.

calm nebula
hallow prism
teal bridge
#

Solution: don't make the config fields nullable.

lucid iron
#

yea i think empty string is more useful here blobcatgooglyblep

calm nebula
#

Feel free to copy this as the gmcm api interface

calm nebula
teal bridge
teal bridge
#

Ok, that definitely adds a challenge if the repo is private... I just assumed it was not.

calm nebula
#

VMV fish spots are also not determined on time alone but also on what the player does

#

It only spawns additional fish spots on maps the player is on

hallow igloo
teal bridge
#

Well, AFS only does its splash spot predictions when you enter a map location, so at least that part is OK.

calm nebula
#

I can send you files later tio

teal bridge
#

Up to you folks. I can live with it being incompatible. I assumed it was just Lumina's mod, didn't realize it was some major collaboration.

calm nebula
hallow prism
#

(i have no prob with that, it was more an info about current state of it)

hallow igloo
#

why is this the only one of 120 calls that has a null warning? (it's the first one)

calm nebula
calm nebula
#

It's 99% lumi, I'm just the contract c# person

hallow prism
#

(well, C# is probably grateful i don't do C# so it is a question of point of view 😄 )

teal bridge
#

Yes but there was a 3rd name mentioned earlier, I forget who.

hallow prism
#

sheku is official maintainer if annoying problem happens

lucid iron
#

although vmv C# isnt really framework for general use, is there a list of things it does somewhere

finite ginkgo
teal bridge
#

Right. So, complicated. Either way - if someone wants to point me to the code, using whatever mechanism is appropriate, then I can try to sort out what's happening and see if it'll fit with the prediction mechanism. Otherwise, I'll just report that it's incompatible.

hallow prism
#

(and i'm very grateful for some of the C# features especially the chest ones that are contributing to make stuff enjoyable a lot)

finite ginkgo
#

Put all of those inside an if (tokens != null) block

hallow prism
#

atra, is it as simple as copying the PanningAndFishingSpotManager.cs in something like (forgot name that is used by json parser) thing and share it with focustense? if yes, i can do a copy paste 😄

finite ginkgo
#

Yes

hallow prism
hallow igloo
#

okay so the big hopefully bugfix is that I used "" instead of null this time

#

let's see

calm nebula
#

Yes

hallow igloo
#

also I really appreciate all of you for helping me out so much <3

finite ginkgo
# hallow igloo like so?

Also make sure to have CP listed as a dependency for the mod otherwise CP won’t let the tokens get added

teal bridge
#

That would very likely answer the initial questions. It's possible I might need to know other things to actually put in compat features, like knowing the location type, which methods to hook, etc. (Just depends on how complicated it ends up being, whether it's a few extra random calls or involves a whole bunch of private state.)

#

But yes sure, if it's a self-contained file then it'll probably at least answer the "why" if not the "how".

hallow igloo
ocean sailBOT
#

Log Info: SMAPI 4.0.8 with SDV 1.6.8 build 24119 on Microsoft Windows 10 Pro, with 19 C# mods and 17 content packs.
Suggested fixes: One or more mods are out of date, consider updating them

calm nebula
#

private ModConfig config = null!;

#

Then just read the config in Entry

velvet narwhal
#

Question about cp randomization, is it like a function signature where if there's more indexes in the random the pinned key won't understand? Or is it just, "pinned key? OK boss"

pine elbow
#

hey if i do a dialogue thing with i18n in the format

{{i18n:name{{Random:{{Range: 1, 10}}, 17, 18, 19, 20, 21, 22, 23}}}} do the numbers outside of the range only show up after the numbers inside of the range have all been seen??

velvet narwhal
#

they're all given a fighting chance if they're used outside of the range

#

effectively you have 17 indexes that all have a chance to get chosen

pine elbow
velvet narwhal
#

it's the exact same, yes

#

range is the same as typing them all out individually, it just reduces the amount of text

pine elbow
#

is there any way to do multiple ranges?

#

i have tried before, but it always gives me an error so i assume im doing it wrong

velvet narwhal
#

i haven't tried but you could maybe attempt {{Range: 1, 10}}, {{Range:17,23}}

#

if that's what you were aiming for

pine elbow
velvet narwhal
#

just make sure your }}s are lining up

#

so you need an extra }} after the four of them, for a total of 6, cause you're closing out that last range, the random, and then the i18n

pine elbow
#

oh so {{i18n:name{{Random:{{Range: 1, 10}}, {{Range: 17, 23}}}}}}

velvet narwhal
#

it gets very messy SDVpufferclueless

#

"{{Season}}_{{Weekday}}{{Hearts:{{Marlon}}}}": "$query {{HasMod|contains=FlashShifter.StardewValleyExpandedCP}}#{{i18n:Marlon.CharacterDialogue.{{Random:{{Range:72, 85}}}}}}#$e#{{i18n:{{Season}}_{{Weekday}}{{Hearts:{{Marlon}}}}_{{Random:{{Range:0,5}}}}}}|{{i18n:{{Season}}_{{Weekday}}{{Hearts:{{Marlon}}}}_{{Random:{{Range:0,5}}}}}}",

#

there's definitely cleaner ways to do this, but this makes sense to me and i can parse the smapi log if i've missed a }} anywhere

tender flicker
#

I got some issue. I tried to replace slime hutch with my edited tilesheet, but the game doesn't load it. SMAPI had no issues to read/load it though.

ocean sailBOT
#

Can you do these steps to provide more info?

  1. Load your save and view the content that should be patched.
  2. Type patch summary directly into the SMAPI window and press enter.
  3. Upload your SMAPI log to https://smapi.io/log (see instructions on that page).
  4. Post the log link here.
pine elbow
#

although i swear some lines are way more common than others? 😭

velvet narwhal
#

shouldn't be, they should all have a fighting chance, but you are set to a seeded random per day

pine elbow
velvet narwhal
#

it also depends on what you're putting the i18n token to, dialogue-wise

#

like if it's just "spring_NPCNAME", and if you have other dialogues inside of spring, they will fight each other if the conditions line up

#

there is a priority system for what dialogue key gets chosen

tender flicker
ocean sailBOT
#

Log Info: SMAPI 4.0.8 with SDV 1.6.8 build 24119 on Microsoft Windows 10 Pro, with 27 C# mods and 6 content packs.
Suggested fixes: One or more mods are out of date, consider updating them

tender flicker
#

UseableSlimeHutch 1.0.0 by Rat | for Content Patcher | Finally some use to it.

Is my mod

finite ginkgo
#

!tilesheetclimbing

ocean sailBOT
#

When creating or editing maps in Tiled, one common error is tilesheet climbing, marked by red text containing "invalid tilesheet path '../../..'. This is caused by SMAPI not being able to find the tilesheets needed by the map file. To prevent this error, make sure that you have a copy of all necessary tilesheets in the folder containing your WIP tmx file. Copies of vanilla tilesheets can later be deleted, but must be present while working on your map.

If you get this error with a completed map, an easy way to fix it is to open your tmx file in VS Code or a similar text editor, find all of the places with <image source=, and remove the filepaths to so that only the tilesheet names remain. For example, if the code says <image source="Content (unpacked)/Maps/townInterior_2" width="512" height="64"/>, change it to just <image source="townInterior_2" width="512" height="64"/>.

tender flicker
#

Omg it works now! Thank you so much!!

raw kelp
ocean sailBOT
#

Log Info: SMAPI 4.0.8 with SDV 1.6.8 build 24119 on Microsoft Windows 11 Home, with 2 C# mods and 1 content packs.

velvet narwhal
#

you have a content.json and a manifest.json alongside your assets folder yeah?

raw kelp
#

yes

pine elbow
#

Can we see them?

#

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

rancid temple
#

Is everything in your content? Any includes?

rancid temple
#

What is dispos.json?

uncut viper
#

what tutorial are you following?

raw kelp
#
Stardew Modding Wiki

So, you're interested in creating a new character for Stardew? Good news: with version 1.6, creating a character is easier and allows for more flexibility than ever. However, NPCs are one of the more complicated things to create for Stardew, as they have a LOT of moving parts. This guide aims to provide a basic but thorough walkthrough for ea...

rancid temple
#

It looks like you set up your character in your content, but as I recall that's normally in the dispos.json for that tutorial

#

So what's in your dispos?

raw kelp
#

i wasnt sure so i put it in both

uncut viper
#

do not do that

raw kelp
#

ill take it out then

#

sorry i am very very new

uncut viper
#

beyond that, you have a bunch of content patcher actions listed in your characters Home list for some reason

pine elbow
rancid temple
#

Yeah, missing a lot of brackets in this content lol

uncut viper
#

those should be written at the same level as your other "Action" stuff, like beneath your Load and Include action at the top of your file

raw kelp
#

alr thank you ive just been copying and pasting things in and changing them around and hoping for the best so far

#

so far it has not been going very well

uncut viper
#

everything in content patcher needs to follow a specific structure or syntax

#

things cannot just go anywhere

raw kelp
#

so load should go first and then action?

uncut viper
#

Load is an action

velvet narwhal
#

if you're doing the content.json with everything in it, you don't have to include any other files

raw kelp
#

yup i realized as soon as i sent that

rancid temple
#

The order doesn't really matter, it's what they're a part of

#

In this case you want them to be part of Changes but not inside of the other Actions

#

Each Action in Changes is it's own little block of what you want CP to do

raw kelp
#

im sorry im not quite following what i need to do then

velvet narwhal
#

(also you're doubling up on characters/dialogue, it needs to be characters/dialogue/marriagedialogue{{NPCNAME}})

#

basically an action block is just that

{
"Action": "An Action Block"
}```
raw kelp
#

ooh ok

rancid temple
#

I guess the first thing you should do is decide if you want to keep following the format of the tutorial or if you want to just have everything in content? Typically when following a tutorial I suggest sticking to that format so you don't have to translate into what you're actually doing

raw kelp
#

yeah im trying to but im having issues knowing exactly what to do

raw kelp
#

i can tell the broad of it, but exactly where im putting things is where im having issues

rancid temple
#

For the tutorial, most things are broken up into their own json files that are included in the main content, which allows you to just have better organization

#

Better might even be generous, it's just different organization

raw kelp
#

so do i need to keep any of them or just do it all in content?

velvet narwhal
#

that's up to you

rancid temple
#

You can do either, but you can't do both

velvet narwhal
#

do you want to have everything in your content.json or do you want them all in different files

uncut viper
#

were you skipping ahead or only looking at the code examples in the tutorial? because the formatting of a lot of your stuff does not match it

rancid temple
#

You can even split some things and keep others in content, just can't have copies of the same stuff in both content and split out

raw kelp
#

ok that makes sense

#

i was reading everything and trying to follow it but, clearly, im not very good at this lol

velvet narwhal
#

it's just, a lot of moving parts and it's not suggested for beginners

rancid temple
#

I think it's fine for beginners, just gotta be careful is all

velvet narwhal
#

especially for the concept of code blocks, if that just wooshes over some people's heads, it will definitely be a headache

raw kelp
#

yeah i know i shouldnt but theres nothing else im interested in doing first so id never have the motivation of actually learning

velvet narwhal
#

i quote myself back when i was aspirant of helping people create as many npcs as they wanted, but my rose tinted glasses are gone now that i've written a tutorial SDVpufferpain

uncut viper
#

(as an unrelated side, i feel like the tutorial should probably use {{ModId}} more often SDVpufferthinkblob)

velvet narwhal
#

(mine does but it's higher end)

uncut viper
#

i thought you just had a template, not a tutorial

velvet narwhal
#

i had some descriptors in there, but i was planning on throwing my entire custom npc github into that tutorial i made SDVpufferpain

uncut viper
rancid temple
#

Jorts and Jean are older NPC's ported up to 1.6 right?

uncut viper
#

i would not call this a tutorial, i would just call it a template. thats not a bad thing im just saying the word tutorial implies like, guidance and steps

#

(idk the answer to the jorts and jean question)

velvet narwhal
#

that's true, i just didn't want to overstep on tia's so i didn't feel necessary to add the steps that tia's already goes over (same)

rancid temple
#

There's mentions of "you should use {{ModId}}" on here but I don't know if Tia actually uses it lol

uncut viper
#

theres mention of it, but the rest of the tutorial does not actually use it except for in i18n

rancid temple
#

It's one of those "don't be like me" but also "I'm not changing it now, that's too much work"

#

I also wonder if it would cause issues with people who already have the mod installed

#

Obviously the guide could just kind of slap it in the right places to give a good example

uncut viper
#

im not saying they should change it for the mod themselves

#

just the tutorial

velvet narwhal
#

oh you can just use formernames if you've already released

uncut viper
#

since using it for something like e.g. the NPC's internal name is pretty important

rancid temple
#

But I think most of the tutorial is kind of just edited copies of the mod

uncut viper
#

well, yes, but that doesnt mean it cant be updated to use modid in the tutorial itself

#

the tutorial does not need to match the actual mod

rancid temple
#

Sure, but also I'm not about to go editing it or fixing all the mistakes in my tutorials any time soon :P

calm nebula
#

Tutorial: okay, so this is a pointer

uncut viper
#

i mean im not saying anyone has to, im just saying that if the intent is to guide someone on how to do something and is already an opinionated tutorial anyway (not opinionated in a bad way i mean it in the software sense) then it should probably also guide on the best practices yeah?

calm nebula
#

Yes

uncut viper
#

esp if its used as like, the NPC tutorial to use

velvet narwhal
#

tbh my own git doesn't use {{ModId}}

calm nebula
#

But also bad practices abound

#

Ie, not using i18n.

uncut viper
#

it does have a small section on i18n at least, but i do still agree there too

rancid temple
#

If I actually made NPC's I would feel better positioned to edit this tutorial, but I only conceptually understand it so I'm not confident in making changes to it

velvet narwhal
#

i don't wanna step on tia's toes or i would

#

i can always edit my own 'template' though SDVpufferclueless

rancid temple
#

You could also just make your own full tutorial, there's nothing wrong with having more than one source for information

velvet narwhal
uncut viper
#

all im sayin is that if we're always telling people to use {{ModId}} f or their item IDs and whatnot we should also be telling them to do it for their NPCs, is all. its not a major gripe or anything, just a random aside thought i had when looking at the tutorial

rancid temple
#

No shade to Tia, but their guide is only "the guide" because there aren't really any others lol

#

Otherwise we could compile a list of guides and use that as the link in the command

faint ingot
#

can someone tell me where in the unpacked game files I can find mine stuff (ore nodes, stones, ladder)?

uncut viper
#

springobjects i think

#

Maps/springobjects

faint ingot
#

thank you I will look

lucid iron
uncut viper
#

dunno about the ladder though

velvet narwhal
#

.choose more c# digging, flesh out the npc template

patent lanceBOT
#

Choose result: more c# digging

calm nebula
#

Ladder is not an item no

velvet narwhal
#

SDVpuffersquee i am absolved

lucid iron
#

what r u dig for

velvet narwhal
#

looking into making a customfield for if this object can glow or not

uncut viper
#

theres a few non-items in springobjects anyway

rancid temple
#

Ladder is Maps/Mines/mine.png

lucid iron
#

object like an inventory item?

uncut viper
#

unless im mistaken and you can actually get a chunk of meteorite in your inventory if you spawn it in

rancid temple
#

Both the kind stuck on the wall and the kind that spawns on the ground

uncut viper
#

or chunk of big stump

velvet narwhal
#

(technically it's because i want to make my one wildtree glow at night, so i'm effectively trying to make it parse the string, string into the "magic" that i'll do)

lucid iron
#

oh thats not an object then

#

but also easier than what i was imagine

rancid temple
#

"Aviroen.Glow": "" color values maybe in the second string?

lucid iron
#

i'd add radius

velvet narwhal
#

yeah i gotta initially figure out how to "create" said glow SDVpufferclueless

rancid temple
#

Light source I'd guess lol

lucid iron
#

reference glow buff and space core PecoWant

#

but yea its just light source stuff

velvet narwhal
#

i was gonna make it bool/color/radius/brightness

lucid iron
#

i recommend you holding off on this until 1.6.9

rancid temple
#

What's the bool for?

lucid iron
#

there's a big api change

velvet narwhal
#

fair enough

#

oh wait you're right i don't have to do a bool

rancid temple
#

Yeah, 1.6.9 broke light sources

velvet narwhal
#

ignorable time/color/radius/brightness

rancid temple
#

And by broke I mean, added a string ID lmao

lucid iron
#

yea its a improvement but a breaking change

#

so just slacc

rancid temple
#

Easy to fix, but just a lil' panic

#

As a treat

velvet narwhal
#

i can learn how to set up my core then, i only managed to separate them into their own .cs but i don't know if anything will break if i shove them into a folder (unless i can just throw them into the using space in my main)

lucid iron
#

in C# namespace and file path are separate concepts

#

using is based on namespace

rancid temple
#

If you're using VS22 I can see how this might be confusing though, because if you make a folder in your project and then a script in that folder, it automatically changes the namespace to match

velvet narwhal
#

oh vs22 dealt with it for me

#

yeah i'm like ???

calm nebula
#

Please for the LOVE OF GOD

#

Make your namespaxes match your filepaths

#

Please

#

For my poor sanity

lucid iron
#

yea i was gonna follow up with "but you should make em match"

velvet narwhal
#

vs22 did it for me you don't have to die

uncut viper
#

i also third this sentiment

calm nebula
#

dies anyways

rancid temple
#

Out of curiosity is that just a preference thing or is there some kind of benefit to not just using the main namespace?

#

For SDV I've just been letting VS handle it for me, but in Unity I don't even get namespaces made so it's not something I'm actually familiar with

tender flicker
#

I have another issue SDVpetcatsad
The FloorID seems to work, but WallID doesn't in my mod. I'm clueless what to do.

uncut viper
#

it would make finding the file it belongs to easier if they match
technically also if you have a different namespace you can make a class with the same name as a class in another namespace too if you need to

calm nebula
#

looks at esca pointedly

uncut viper
#

(idk the esca context)

rancid temple
#

It's actually a good thing you said something though, my crane game overhaul is completely busted because I did all the separation after the scripts were made so they didn't get new namespaces

velvet narwhal
#

i don't actively remember how the floorid/wallpaperid works

tender flicker
#

I even looked into different mod doing exactly same thing as I do, yet mine doesn't work at all.

rancid temple
#

How are you doing it?

lucid iron
#

are you slapping down new wallpaper/floor when you update

tender flicker
rancid temple
#

You definitely named the object TileData?

tender flicker
lucid iron
#

ah its about making the map use wallpaper DokkanStare

#

i misunderstood

tender flicker
latent mauve
#

You also need to add the new WallID/FloorID to the Map Properties from what I recall when I did it.

rancid temple
#

Yeah, unless you're using one of the vanilla ID's

latent mauve
#

And the initial wall and floor tiles you put in as a placeholder need to come from a tilesheet named walls_and_floors

tender flicker
#

Where do I change Map Properties?
Yes i've put vanilla walls_and_floors

latent mauve
#

I appended mine to the map properties using Content Patcher, there's a code block somewhere if I can find it

rancid temple
#

On the map in Tiled, click Map > Map Properties

latent mauve
#

There's also that. 😛

#

Is your WallID supposed to be vanilla also?

#

Just to check before you do extra work

golden basin
#

does anyone know if unlockable bundles has a public beta version?

tender flicker
#

I'll see to edit that Map Properties because for sure its missing WallIDs there

rancid temple
#

Yeah, if you're adding a new decoratable location, then it won't have any of the properties that allow for that

#

If you're patching onto a farmhouse then you actually need to add to the map property already on the farmhouse

velvet narwhal
#

they're patching the slime hutch SDVpufferthinkblob

rancid temple
#

Are those decoratable?

calm nebula
#

They are now

rancid temple
#

Neat

tender flicker
#

The floors are for sure

velvet narwhal
#

is the slime hutch just a fancier shed

calm nebula
#

1.6 I think

rancid temple
#

It's like a shed that can hold slimes I guess lol

#

I dunno if fancier shed is really an accurate description lmao

velvet narwhal
#

is fancier to me, it forces the health bar to pop up

calm nebula
#

Bigger slime hutch would be cool

rancid temple
#

Just make a transpiler that makes the health bar always visible

lucid iron
#

you can only get them slime balls in slime hutch