#making-mods-general

1 messages · Page 41 of 1

royal nimbus
#

there's this texture but i think its for something else

uncut viper
#

easily shoot* (new keyboard woes...)

#

ralo there is literally nothing you can do here without C#

#

you will not find any texture for this. you cannot do it

royal nimbus
#

alright sweatdrop

uncut viper
#

the game uses staminaRect to draw the big blue box in the sky, and staminarect is just a 1x1 white box that is created as a texture in C#, not with an image, when the game loads

ornate trellis
#

all this intro talk made me remember that unholy mayo grandpa that i did...

patent atlas
#

changing a color is probably simple enough you can get into it without MUCH hassle and then you will start coding more and get good at it and then you'll get into complex modding and then into gamedev and then

uncut viper
#

it stretches that 1x1 pixel out to the size required

#

and puts a layer of colour over it to make it blue (hrdcoded)

ornate trellis
#

for a while it was a thing to do totally funny mayo mods

royal nimbus
#

like mayonase? XD

ornate trellis
#

and I did mayo grandpa that was basically addicted to mayo but also a jar of mayo

#

yes

rancid temple
#

I wasn't even using mods during the mayo times lmao

finite ginkgo
#

wdym "totally funny" the mayoverse was very serious /s

velvet narwhal
#

(oh i remembered now why i wanted the footgun, it had something to do with the randomization of birth/adoption events)

ornate trellis
#

funny as in joyous ofc

royal nimbus
#

i never heard of that. i need to see lol

uncut viper
royal nimbus
#

i want to make a cursed mod where i turn literally everything into pam xD

uncut viper
#

unless theres one single function where all it does is check if adoption should happen today and returns a bool

velvet narwhal
#

SDVpufferthink public override bool setUp() i imagine this ain't it

#

but cracks knuckles back into the decompile i go

ornate trellis
#

i started a mod where i turn every townsie into a sock....good thing I stopped at abby already

uncut viper
#

there are a ton of things that have a setUp function so i dont even know what function you're looking at

velvet narwhal
#

sorry brain, it's in the birthingevent.cs

uncut viper
#

as far as i recall from the last time i looked at it the code that checks whether or not the spouse should ask to adopt or have a kid just checks a couple things and then makes a random check in an if statement

#

so theres no way to manipulate that random check

ornate trellis
#

this is all i have to show for it, might come back to it when i hit dark times and need something to laugh at

velvet narwhal
#

that's the backburner then-

royal nimbus
#

nice xD

velvet narwhal
rancid temple
#

Sock puppet villagers would be hilarious lol

ornate trellis
#

looking back to it it wouldve been funnier if everyone were sockpuppets

uncut viper
#

you could, technically, patch the random.NextDouble() function and change the result of that

#

however i dont know what the consequences would be of doing that overnight

ornate trellis
uncut viper
#

when a lot of other stuff probably also uses that

plucky reef
#

Sockdew valley.

ornate trellis
#

maybe i will revisit the sock townsies one day

#

like one day i will continue the townsies as goths portraits

royal nimbus
#

but yeah if anyone wants to show off cursed mods, feel free to ping me ;p

uncut viper
# uncut viper when a lot of other stuff probably also uses that

(ftr avi when i say "a lot of other stuff" i mean this isnt a stardew random check this is literally System.Random, so. id expect it would break a shit ton of random rng checks that should normally happen. but who knows maybe you're fine with breaking them for one night only)

velvet narwhal
#

there wasn't anything else i can think of off the top of my head that i could throw a prefix in with the footgun, most of my problems will come from my actual c# implementation

#

yeah i figured i need a specific bool checking only for the adoption/birthing question

uncut viper
#

it would actually be very very easy to write a transpiler here

#

it just hardcodedly checks whether the rng between 0 and 1 returned less than 0.05

#

so you could just change every instance of 0.05 found in the function to like, 1

#

you'd wanna double check you wanted to change it first which would ideally also be in the transpiler but that wouldnt be too difficult either

tender bloom
uncut viper
#

alternatively if you're already using C# anyway you could just patch the transpiler when you want to and unpatch your transpiler when you dont

#

its in pickPersonalFarmEvent

velvet narwhal
#

i was gonna attempt to set it to a different bool, something like being able to set it to a gsq

uncut viper
#

the BirthingEvent itself has no RNG thats when the child arrives. you cant delay that and probably wouldnt want to

velvet narwhal
#

yeah my baby steps of even trying to make the angry goose is going to be my toes into c# SDVpufferflat ...then it's maybe the birthingevent derandomization... then it's the karaoke suffering

uncut viper
#

(at the time that message was sent anyway. it did move on to normal C# afte tht)

#

(i swear i will get used to this new keyboard eventually pls forgive my dumb typos until then)

velvet narwhal
#

(you're just leveling up to your purple shorts)

calm nebula
#

Fun fact

uncut viper
#

Random r = Utility.CreateRandom(Game1.stats.DaysPlayed, Game1.uniqueIDForThisGame / 2uL, 470124797.0, Game1.player.UniqueMultiplayerID);

#

top of the function

calm nebula
#

Probably my most hilarious random yet

rancid temple
#

Atra needs little segment drops where a banner comes down and some music plays

uncut viper
#

this is an unrelated question now, but what does "file" do before the "sealed class" part

#

i havent seen that before

uncut viper
#

interesting... is there a practical use for that in a stardew mod vs just something like private

velvet narwhal
#

would that let me yoink the random and not screw with the other randoms? SDVpufferthink
i imagine so since yours is quite literally "no random i'm done"

uncut viper
#

technically yeah if you replaced that random declaration with your own. but a postfix would be easier

uncut viper
#

in normal C# land dr elizabeth mathperson was right you can just normally postfix this

calm nebula
#

I don't like it when my code has random boring irrelevant classes in internal name spaces

uncut viper
#

you dont need to change the existing rng check you can just do your own afterwards

calm nebula
#

I like things to be clean and neat

uncut viper
#

fair enough

uncut viper
#

tbf to you, people should probably ignore that feature more often than not SDVpuffersquee

tender bloom
#

SoundInTheNightEvent.cs or whatever it's called is kind of a funky class generally

#

It's full of like a mix of content (events code) and C#

velvet narwhal
#

(the footgun will most likely go unused, i am just itching to do c# but something isn't clicking in the gears)

uncut viper
#

on a list of things that could be bad choices to start figuring out how to use C# for, this probably isnt on there at least

#

most of the code is already written for you from the original pickPersonalFarmEvent, you can just copy it but without the RNG check into your postfix

#

and if it resolves to true then change the __result

#

assuming you're trying to guarantee it happens

#

probably want to check a mail flag or something too so you're not doing this every 3 days or however long it takes for a child to be born

velvet narwhal
#

i'd probably set it to the mailflag

uncut viper
#

well, you'll still wanna check the other stuff anyway

velvet narwhal
#

yeah the birthingevent.cs has the -- ok

uncut viper
#

just to make sure that they are actually married, the player is actually at home, and that the NPC in question can actually have/want kids

#

(and that they arent already setting up to have/adopt kids)

velvet narwhal
#

sorry, pigeon brain got distracted, i could probably add the using reference to the birthingevent.cs to grab all of that necessary info though, yeah?

uncut viper
#

you dont touch birthingevent

#

you just patch pickPersonalFarmEvent

#

which is in StardewValley.Utility

#

pickPersonalFarmEvent returns a FarmEvent to whatever calls it, and the QuestionEvent it returns for adoption/pregnancy s one of those, so you would just intercept the function after it finishes to go "you're trying to return the UFO sound in the middle of the night event? sorry, actually, you're going to return a pregnancy/adoption event bc i said so"

#

(actually it would be the "dogs" nightly event not the ufo but w/e the concept is the same)

unique sigil
#

hey yall, i need some help with checking my content.json. is this the correct format for adding a new minecart network that's only available after finishing the boiler room bundle?

rancid temple
#

You're trying to create a new network or add to Default?

uncut viper
#

i dont know the format off the top of my head but i do wanna ask if you know why you're putting your DisplayName inside a LocationName tokenizable string

unique sigil
noble jolt
#

this is how I added a new stop on my farm.

{
        "Action":"EditData",
        "Target": "Data/Minecarts",
        "TargetField": ["Default","Destinations"],
        "Entries": {
            "Zinnalynn_ModdedMeadowFarm": {
                "Id": "Zinnalynn_ModdedMeadowFarm",
                "DisplayName":"[LocationName Farm]",
                "Condition": "LOCATION_ACCESSIBLE Custom_ModdedMeadowFarm",

                "TargetLocation": "Farm",
                "TargetTile": {"X":38, "Y":13}
            }
        }
},
{
    "Action": "EditMap",
        "Target": "Maps/Zinnalynn_ModdedMeadowFarm",
        "MapTiles": [
        {
            "Position": { 
              "X": 38,
              "Y": 12
            },
            "Layer": "Buildings",
            "SetProperties": {
              "Action": "MinecartTransport Default Farm"
            }
          }
        ]
},```
rancid temple
#

That's still not a new network, hang on

uncut viper
rancid temple
#

The LocationName is for pulling the DisplayName of the location, you don't need it if you're gonna use an i18n token

uncut viper
#

im not even sure if itd work inside the LocationName token if the i18n doesnt resolve to an internal ID anyway

unique sigil
uncut viper
#

it looks like itd just return an error so yeah i think you need to remove it and just put the i18n directly

unique sigil
#

alright, i'll try it out

rancid temple
#

You wouldn't use TargetField if you're creating a new network

uncut viper
#

(an error and make the string null, anyway)

rancid temple
#

Your whole Entries section should be the establishment of the network with the destinations in it

noble jolt
#

The default would just be changed to what the new network added is no?

rancid temple
#

If you want the whole network to be locked behind the boiler room, you can use the UnlockCondition field otherwise if you only want some of the destinations locked then you need the Condition field in each destination entry

#

I don't think TargetField creates new entries if it doesn't exist

uncut viper
noble jolt
#

ah

unique sigil
#

alright so: i delete the TargetField part, put the {{i18n}} token directly, and since i want the whole network to be locked behind boiler room, swap Condition for UnlockCondition?

rancid temple
#

Not exactly, I'm making an example, gonna take a minute though

noble jolt
#

I actually had to put a fix out for that one today because I had it set to target my map file, so taking it would just reload a fresh version of the map instead of taking to the one that's already been worked on.

uncut viper
#

ill let roku get the example ready but you'll need to change the structure of your entrire entry

#

bc currently your existing json is right if you just want to add one destination

#

not a whole new network

#

(or it would be right if you were targeting the destinations field in default, but i digress)

#

if you open up Data/minecarts in your unpacked folder, that entire block that starts with "Default": { and ends at the bottom of the file, is what you'll need to make for your new network

#

but just to be clear, this is creating a new network entirely, not a new stop you can choose from the normal minecarts

unique sigil
#

yeah that's what im planning, making a new network

uncut viper
#

with just the one stop?

rancid temple
#
{
  "Action": "EditData",
  "Target": "Data/Minecarts",
  "Entries": {
    "{{ModId}}_YourNetworkNameHere": {
      "UnlockCondition": "PLAYER_HAS_MAIL Host ccBoilerRoom Received",
      "Destinations": [
        {
          "Id": "FarmCave_SG",
          "DisplayName": "{{i18n: ui.farmcave.mincart}}",
          "TargetLocation": "FarmCave",
          "TargetTile": {
            "X": 8,
            "Y": 43
          },
          "TargetDirection": "right"
        }
      ]
    }
  }
}```
unique sigil
uncut viper
#

gotcha, just making sure. remember you'll also need a tile action (or w/e its called) on your map to open the network list too

unique sigil
#

goddamn it's 3 am already????

rancid temple
#

Big mood

velvet narwhal
#

time for a burger

rancid temple
#

Time for more caffeine

unique sigil
#

sleep deprivation ftw

#

the silly part is that this map is like, 2 small maps put together, but somehow writing up this cave area is the one that takes ages

velvet narwhal
#

(oh there's already plenty of mods that affect the baby chance thing, i can just read this and infer since my brain is empty, i am but a pigeon)

unique sigil
#

very good thing i've playtested everything else but the cave

rancid temple
#

Man, tell you what, Tiled doesn't like when it can see all of a map that's 500x with even just one layer full

quaint moss
#

Does this work for multiple different conversation topics? If so I assume it works like /e where you must input the precondition for each one as in /A <ct1> /A <ct2> and so on?

cobalt anvil
#

are you using content patcher?

#

if so, i'm not sure how universal it is but i think it can be used with most EditData patches, you can probably use a "When" attribute. I have never made a mod where dialogue was added though, so like... idk, that's just my guess. it's how I usually set additional situational requirements

uncut viper
#

are you responding to Konata? theyre asking about event preconditions, something entirely different from content patcher when conditions

cobalt anvil
#

oh okay. yea i was. it was just my guess. i had a question but i didn't want to like add it and then bury them lol

uncut viper
#

(i dont know the answer, is why i havent spoken up before)

#

event preconditions refer to the requirements the game checks when it sees if you have any events to watch when you enter a location, so something unrelated to editdata or when conditions or anything like that

#

feel free to ask your own question tho!

rancid temple
#

I don't know what other rendering issues there were, but it looks like the tree rendering one still happens with maps wider than 199 tiles

calm nebula
#

Do you see z fighting/flickrr?

velvet narwhal
#

(i tried digging into the decompile for the A conversation_topic and came up empty, i imagine event lookup would show it though considering it shows all of my chaos as long as it's not behind a 'when' condition)

rancid temple
cobalt anvil
tranquil socket
#

Hi trying to figure out Farm Type Manager, and I'm going off existing mods' jsons for examples, I think I completely understand the Areas : [] portion, but I'm trying to grasp the purpose of everything after that. I'm noticing different jsons re-add different vanilla features? Why is this and which ones should I worry about in different cases. Sorry if this is super confusing, I can explain more with the files I'm working with.

calm nebula
hallow prism
#

what do you mean, re add different vanilla features?

velvet narwhal
#

SDVpufferthumbsup works just fine with just A {{conversationtopic}}/A {{conversationtopic}}
"Testing/A {{ModId}}_Conversation1/A {{ModId}}_Conversation2/f {{Marlon}} 250": "continue/64 15/farmer 0 0 0/pause 1500/end"

tranquil socket
hallow prism
#

like what?

velvet narwhal
quaint moss
tranquil socket
hallow prism
#

yes, some mods use FTM to spawn ores nodes to specific quarry locations, which wasn't possible without FTM in previous versions of the game, but i believe now can be done with map property/CP too

#

however if you make a non farm map it's still useful to have FTM for that

tranquil socket
#

I'm not looking to do anything with ore spawns, I don't think, I'm looking to add new foragables to be dug up

#

Thanks so much for helping btw, this is my first time working with FTM

plucky reef
#

Is FTM now not required at all? A lot of maps still require it (could be holdovers who don't want to update to CP).

tranquil socket
#

WAIT FR?

#

I thought you needed it to add forage

hallow prism
#

FTM is pretty much required for a lot of stuff still

lucid iron
#

FTM is actually the spawn stuff framework

#

not the custom farm framework

#

if u wanna spawn stuff u need it

plucky reef
#

So I could make a quarry on a farm without FTM, but to do it fancy you need FTM.

hallow prism
#

forages can be added by CP BUT you don't get that much control of stuff like spawning in specific areas of the map and there's no real way to have stuff like "spawn 5 mushrooms after each rainy day"

lucid iron
#

yea iirc game only has basic quarry tiles so u cant customize

plucky reef
#

ahhh very fancy spawns, makes sense.

finite ginkgo
#

There's also technically still a benefit to using FTM for forage spawning even without any special conditions (vanilla can only spawn a small amount of forage at a location at a time, so the more modded forage you have the less likely you are to see a lot of it)

hallow prism
#

(i really appreciate being able to do stuff with CP, but while it can handle pretty well any sort of elaborated condition for what to spawn, the when/where is limited)

tranquil socket
#

Makes sense, time to keep using FTM

hallow prism
#

i had a mod that used only CP for the rerelease that will also have FTM in next update because it's more convenient with it for some stuff like, indeed, ensuring that i add to vanilla forage rather than replacing it

finite ginkgo
hallow prism
#

(i dislike strongly being in spring 13 with still no dandelion found)

hallow prism
calm nebula
#

It should be working

#

But vanilla has less forage imo

tranquil socket
#

Ok so stupid question, what happens if I just leave everything in Ore spawn settings blank or null? (I'm looking at the FTM readme again and the specific names of these fields are indicated as (global)

finite ginkgo
#

Huh, didn't know that one was a field; still, it's not likely forage mods will change that field since they don't assume players will be playing with a lot of forage-adding mods (and even if they did it would likely still become too low at some point) so FTM is still favorable in some cases

calm nebula
#

You can just leave off bits you don't need iirc

calm nebula
tranquil socket
calm nebula
#

No idea

#

Have never used ftm personally

tranquil socket
#

fair enough

#

Keeping it prob doesn't hurt?

hallow prism
rancid temple
#

Hm, don't try to take a screenshot of a 500x map

#

It does eventually work, but wow that took a long time

#

It's a uh, 32,000x32,000 png lmao

#

Well, based on previous messages and my testing, I think the rendering issue with height is no longer a problem

#

I'm sorely tempted to reduce the width of my map and scale up the height just to see how far I can go before I break something else

uncut viper
#

int.MaxValue height

finite ginkgo
#

so you're telling me i can make a 199x2000 map and nothing'll break?

rancid temple
#

I can test that lol, I have only gone up to 500 so far

finite ginkgo
#

(something will break by 2000 i just know it)

rancid temple
#

Technically even at higher than 200 on width, the only issue I'm seeing is the tree stumps rendering over the trees

#

I honestly think that Tiled is going to give out before SDV does

#

I think if I stay zoomed in then it should mitigate most of the slowdown issues I'm getting in Tiled lmao

lucid iron
#

when are you porting daggerfall into sdv

#

say what are the reasons to use smapi reflection helper

#

i ask cus i had some reflection stuff with in a static method, and im unsure if its worth refactoring to use helper

uncut viper
#

smapi does some caching stuff with reflection i think

velvet narwhal
calm nebula
#

I'm kinda surprised at the lack of zfighting

lucid iron
rancid temple
#

My tree stacking at the top of the map is using 4 Buildings layers and 2 Back layers to get it and I don't notice any flickering up there

lucid iron
#

but if i use smapi's would it be shared across mods and be nicer

uncut viper
#

disclaimer i have no idea WHAT kind of caching or optimizing stuff it does i just recall it. i dont use the helper

calm nebula
#

I tend to want to go one step further and cache delegates

#

Which smapi does not do for you

rancid temple
#

Width wise no flickering, so I'll move some down lower and see if it happens there

calm nebula
#

Yeah, I expect to happen at around a couple of hundred in the y axis tbh

rancid temple
#

Put some down at the very bottom, close to 500, 500 and they look fine

#

Running around, staring at them, nothing really changing

uncut viper
#

but do they change when theyre not observed though

rancid temple
#

Hm, Schrodinger's pine tree

uncut viper
#

possible name for a candle scent

rancid temple
#

Lmao

velvet narwhal
#

oh yknow, that's something i'll probably put into my expansion, "treants"

rancid temple
#

You walk off screen, come back and that tree is just gone

velvet narwhal
#

exactly, terrifying

rancid temple
#

Lol, putting in a 202x2000 map seems fine

#

No z fighting still, not seeing any rendering issues

#

I might be biased but maybe the load time was slightly longer

calm nebula
#

Interesting we had a lot reports of z fighting on 1.5.6

#

Maybe monogame made the sort on that stablw

rancid temple
#

I'd seen a lot of people saying they thought 1.6 changed the size limitations, but nobody was very sure which is what led me down this rabbithole, so maybe the rendering is at least fixed

#

Aside from trees when the width is over 199

#

Though it's actually trees that are past 199 on the X

lucid iron
#

is it "trees" or any terrain feature

rancid temple
#

And it's only ones you can chop down

#

Hm, good question, not sure what other terrain features I can plop down

#

Without some C#

lucid iron
#

flooring ig

#

u can use ftm to spawn some stuff if nothing else

finite ginkgo
final folio
#

Hello, does anyone know what event or at what time this lewis sprite is used?

rancid temple
#

When eating the big omelet

#

It's an event that happens after you complete the egg special order

final folio
#

thank you very much!!!!!!!!!!!!!
I can now move forward with my mod

rancid temple
#

Event ID 3206194 in Data/Events/Saloon, if you need that

old edge
#

Making a new map but I want it to have a puzzle mechanic anyone got ideas. I was watching pokemon fire red stream and saw one cave with a "don't step on twice tiles". How to best implement?

#

I already have a Map with hole sprites touch action warps

velvet narwhal
#

is there even any 'sliding' feature SDVpufferthinkblob

#

ig you could also do an invisible maze in the form of the pool, with 'whirlpools' that teleport you out/around SDVpufferthinkblob

rancid temple
#

Sliding like forced movement?

lucid iron
#

horse only tiles DokkanStare

rancid temple
#

Chair puzzle, you have to bring a chair to bypass obstacles (I actually don't know if this works anymore lol)

lucid iron
#

how cursed

#

but hm i can sort of imagine how to do forced movement

#

you need to set farmer CanMove false

#

and maybe use specific frame

rancid temple
#

Doesn't getting into and out of water have forced movement?

calm nebula
#

Forced movement is easy

finite ginkgo
lucid iron
#

1 way chair tiles AnnelieStare

#

its like pokeman ledges

rancid temple
buoyant atlas
#

How do you do the mods on Stardew PC version?

rancid temple
#

If you mean how do you install mods, #modded-stardew has some pinned info that will be more helpful

#

Were you looking for that or help getting started making mods?

brave fable
#

changing time with console commands briefly lets you see the world without natural light.
i must uncover the secrets of the shadow realm(tm) to exploit for my own nefarious ends SDVdemetriums

velvet narwhal
#

i was hoping for an outdoor ambientlight so i could have a darker feel for my maps SDVpufferthink

rancid temple
#

You can use AmbientLight outdoor if you set the location to ignore outdoor lighting

#

I can't remember if that's specific to a location type or something you can change

velvet narwhal
#

yeah i'm digging through maps docs

#

is it... TreatAsOutdoors..?
says spawning though idk about that

rancid temple
#

I'm gonna guess it has to do with the location type rather than anything you can set

#

The Woods uses it, but there's nothing in the properties for it

finite ginkgo
#

I swear I once had a custom outdoors map that used AmbientLight with no issue, or maybe my memory is failing me SDVpufferthinkblob

rancid temple
#

Woods has a whole method for messing with its lighting

#

It's location reset method disables ignoreOutdoorLighting and then calls a method that does a bunch of hardcoded lighting changes

brave fable
velvet narwhal
#

Type (Optional) The full name of the C# location class to create. This must be one of the vanilla types to avoid a crash when saving. There are too many to list here, but the most useful types are likely StardewValley.GameLocation (default value) and StardewValley.Locations.DecoratableLocation.

#

would i be able to throw StardewValley.Locations.Woods into that

lucid iron
#

Well there's consequences

rancid temple
#

Yeah, but I don't know if AmbientLight would actually work there

lucid iron
#

Of becoming secret woods type map

velvet narwhal
#

ah right NPC pathing

lucid iron
#

Gotta read whole class and make sure it doesn't have side effects you don't want

velvet narwhal
#

shakes fist at npc pathing

brave fable
#

npc pathing depends on the location name, not the map type in this case

uncut viper
#

you'd also get a slime infestation

finite ginkgo
brave fable
#

instead you'll get hardcoded tile behaviours, slime spawns, seasonal debris, light shafts, secret stardrops, etc

lucid iron
brave fable
#

it might also force your health bar visible while you're there, but not sure

lucid iron
#

You can always become C# mod now

brave fable
#

you could, but the more vanilla capability the better

lucid iron
#

Custom location class had been a theme last couple days

rancid temple
brave fable
#

(sorry about that)

rancid temple
#

(I made my health bar always visible lmao)

finite ginkgo
rancid temple
#

There's only a couple locations that hard set this bool to false

#

You shouldn't even need harmony to change it for your specific map

velvet narwhal
#

throws it into the endless void of c# code that i have stockpiled but have no idea how to implement

calm nebula
#

Sounds great for a framework!

rancid temple
#

Yeah I'm like seriously considering it lmao

brave fable
#

shhh i'm trying to get it in vanilla

rancid temple
#

Data/Locations have a CustomFields

brave fable
#

don't spoil my focus

uncut viper
#

(i dont actually know what you guys are talking about)

calm nebula
#

Easy ebough to do in a ltitle custom fields

brave fable
#

i hate custom fields. it doesn't respect my ideas

calm nebula
#

We're talking about our ocerdramatic coffee maker of cours

rancid temple
#

My last like 2 or three mods now have been based on CustomFields lmao

lucid iron
#

yea it is bit succ that u can only str in there

finite ginkgo
lucid iron
#

does C# have equiv of ast.literal_eval LilyDerp

rancid temple
#

At the rate I'm going, I can mash all these CustomFields frameworks together and call it CustomFields Utilities or some crap

lucid iron
#

custom custom fields...

uncut viper
#

Custom Thing Fields, or CTF

velvet narwhal
#

Unlimited Custom Fields

rancid temple
#

Customizable CustomFields Custom Edition

uncut viper
calm nebula
#

Why

#

Probably yes. But why

lucid iron
#

yea ig it make no sense in strong type language

#

and i should really just go json str -> newtonsoft -> a model

calm nebula
#

You either want json deserialziafoon

#

Or you want source gen

uncut viper
#

tbf literal eval like that woulda been very nice for BETAS
but the only good solution i found woulda required me to ship another dll with it and i didnt want to
but if you didnt care you could do it

calm nebula
next plaza
#

absorbs everybody's mods into SpaceCore

velvet narwhal
#

it's that perpetual self conflict, do you become another spacecore and dump all of your ideas into a singular core, or do you pump out little frameworks

uncut viper
#

id rather everyone had their own core lib than everything shoved into spacecore

calm nebula
#

(Net 9 makes me actively happy.)

next plaza
#

I sorta agree, but on the other hand... so many deps to download

uncut viper
#

(with nothing against spacecore, i just like when the mod i install for dependency reasons does what i need it to without anything else)

calm nebula
brittle pasture
#

IMO there's a balance between "everything in SpaceCore" and "this framework dehardcodes exactly one function"

velvet narwhal
#

i'm pretty sure that's the neverending debate in modded-farmers as well

next plaza
uncut viper
next plaza
#

There's a third option, actually

#

Get Pathos to de-hardcode it in the game 😛

#

(Or me, if I would actually take the take to do some of these things)

brave fable
#

yeah we're kind of in a beta with our favourite peon senior software developer at the wheel

uncut viper
#

is it too late into 1.6.9 to ask pathos to turn literally everything into a variable i can change at will?

brave fable
#

i'm sure we can make small requests for single properties to be added to a model lol

brave fable
uncut viper
#

i dont know what you mean but dehardcoding things would be very good for non content patcher mods too

velvet narwhal
#

i would appreciate being able to dig into those bools from cp (from data/locations)

calm nebula
#

(Also fix the issue with backgrounds and sleeping in a tent on island north.)

lucid iron
#

my no1 "pls dehardcode" wish is crab pots

#

no2 is sunflower harvest logic

velvet narwhal
#

i'm willing to pay off roku to remove marnie's monopoly

calm nebula
#

How are crab pots hardcoded

#

Other than their crab pot item

tender bloom
#

I do worry about frameworks getting too big but I personally understand the extensions part of spacecore so I guess I worry less about that

rancid temple
#

Buh, UI hard

lucid iron
#

ik u can do the second one in other ways but it bothers me that they left sunflower seeds where they are in Crop.harvest

brittle pasture
next plaza
uncut viper
#

my biggest personal issue with huge frameworks that do everything is that it is impossible to find a framework you need unless you already know that e.g. spacecore has something for it

calm nebula
#

Also like this is active modder conversation now so I'll go debug work's coffee machine now

#

Have fun!

uncut viper
#

(or ofc by asking in here for smeone else to already know for you)

lucid iron
#

yea nexus search problems

rancid temple
#

Normalize describing every detail of your mod in the title

velvet narwhal
#

are we gonna become amazon titles

finite ginkgo
next plaza
#

I'm gonna need Nexus to increase SpaceCore's title limit

uncut viper
#

while we're at it can we normalize putting your commonly used acronyms in the title of your mod too

brittle pasture
next plaza
brittle pasture
next plaza
#

Somebody convince me to do something productive

velvet narwhal
#

are you finished with your website

calm nebula
#

Please do. It's silly every blasted major expansion has that code

finite ginkgo
calm nebula
brave fable
uncut viper
next plaza
#

I'm not saying I'm looking for something productive to do

#

I have a list of things I could be doing

velvet narwhal
#

oh convince you to do so ok

calm nebula
#

Oh. Go do something productive then

lucid iron
calm nebula
#

Enjoy!

finite ginkgo
velvet narwhal
#

.choose casey should do something productive, casey should take a break

patent lanceBOT
#

Choose result: casey should take a break

velvet narwhal
#

well SOL

lucid iron
#

i need to conjure a visual indicator for "edited"

tender bloom
#

It’s too late at night to be productive

uncut viper
#

my attempt at convincing: it becomes easier to be productive with stuff later if your personal website for docs is set up to easily add more documentation later. the sooner u do that the sooner u can triple ur productivity for free. dont ask me to show my work on that

calm nebula
finite ginkgo
rancid temple
next plaza
#

It's only 7:00 PM here

calm nebula
#

I'm still at work 😦

next plaza
#

Oof

uncut viper
lucid iron
#

where would it go tho

tender bloom
next plaza
#

I have that weird problem of "oh no, only 2-3 hours until I go to bed, that's not enough time for anything"

lucid iron
#

but yes asterisk is what i think of too

rancid temple
#

Top right corner

tender bloom
#

I should do laundry tbh

lucid iron
#

except i think its a funny symbol in sdv font right

uncut viper
#

top right corner, maybe add some padding first

rancid temple
#

If you can, probably needs an outline of an opposite color to it

#

That way no matter what it's sitting on, it should be visible

tender bloom
calm nebula
#

I'm hoping I get to go home before the sun goes down

rancid temple
#

I think asterisk is still in the font? I thought I was using it in a letter since you can't do italics

uncut viper
#

or the border around them

rancid temple
#

Tinted border is also good, though I would definitely need to know beforehand that it was intended to mean something special

#

Even if I don't know that asterisk indicates that something has been edited, I at least associate it with something is special here

next plaza
#

Tinted border + add "Edited" to the tooltip?

uncut viper
#

if it only tints after you edit the machine, i think it would maybe be intuitive enough if it changed only after you changed things

calm nebula
#

Render the machine in italics

next plaza
#

Ah, right, let me just pass SpriteMode.Italics to SpriteBatch

velvet narwhal
#

there's no indication for an enchanted tool, is there?

next plaza
#

Nope

rancid temple
#

Slap EDITED diagonally across the image

#

I've seen the word edited too many times now and it's starting to both lose meaning and look like it's spelled wrong

velvet narwhal
#

honestly the qualifier could also be a good indication since that means it's been "touched"? idk

next plaza
lucid iron
finite ginkgo
lucid iron
#

it'd have to be some actual filter aka work blobcatgooglyblep

uncut viper
#

gray scale would indicate to me that its disabled or unusable somehow anyway

#

not just edited

next plaza
lucid iron
#

yea hm

rancid temple
#

Render the machine in 4k

finite ginkgo
next plaza
#

Considering yours are currently just hypothetical? Yes

finite ginkgo
#

They are indeed hypothetical

#

Can I offer hamster pics at a rate of 0.025 cat pics

next plaza
#

no

finite ginkgo
#

Damn

velvet narwhal
#

(i would've suggested a pencil looking thing as the other option for an indicator but i don't think we have one?)

finite ginkgo
#

(then make one)

calm nebula
#

Show the git diff interface

uncut viper
#

pencil to me = edit_able_ but not edit_ed_

velvet narwhal
#

ah yeah true SDVpufferthinkblob

finite ginkgo
rancid temple
#

(More surprised that you value your hamster pics so low then)

finite ginkgo
#

(it's not me that does; it's casey she set the conversion rates)

next plaza
#

(I'm more of a cat person than a hamster person, you see)

#

(The things that happen on the ES server)

rancid temple
#

(Ah, a biased system /j)

velvet narwhal
#

(would that green x be more understood as like, did you touch this? you did)

#

my pigeon brain was still digging through cursors SDVpufferangy

rancid temple
#

Green X feels more like, selected?

velvet narwhal
#

welp i give up then, i'm out of ideas

tender bloom
brittle pasture
#

I agree that since the effect only shows up once the user edits a machine whatever effects you pick probably isn't that important

#

(I like the pencil though)

calm nebula
#

Well Casey is a cat

#

Astronaut cat

calm nebula
#

Dr. Elizabeth is bisexual flowers

finite ginkgo
tender bloom
next plaza
#

Oh no

tender bloom
#

(Ok maybe I’m not actually very delicate or wilting)

desert pagoda
#

Where does one go to learn to use content patcher?

tiny zealot
#

i'm a chess piece that wore a mouse costume for a little while

tender bloom
rancid temple
#

!cp

ocean sailBOT
tender bloom
#

Ah yes

#

It’s the last link there

#

There’s also extensive CP documentation in the CP GitHub

#

And you’ll want to unpack the game assets to reference them

#

!unpack

ocean sailBOT
#

Follow this guide to unpack the game's content files in order to see and explore how the game data is structured.
It's helpful when making your own mods, or just to learn about how the game works!

rancid temple
#

Is there a command for those docs?

tender bloom
#

There’s some information on the game assets on the wiki as well

velvet narwhal
tender bloom
#

Uh idk one offhand but the docs are linked from the basics page

#

The basics page is literally just meant to get people doing “baby’s first mod” level stuff, once you’ve made one cp mod the cp docs are better

#

But it’s nice to have that wiki page with things broken down and terminology defined

lucid iron
#

i feel like any kind of icon's gonna be bit hard to see think

past crystal
#

Anyone know which folder the Traveling Merchant cart is in? Having some struggling finding it..

velvet narwhal
#

loosesprites/cursors

tender bloom
#

The night market one is in the night market tilesheet

#

Which is under Maps/

tiny zealot
#

which CP doc is it that explains the difference between game asset paths and filesystem paths? i consider that very important basic info to grok

calm nebula
#

But a very pretty flower

brittle pasture
tender bloom
brittle pasture
rancid temple
#

I thought there wasn't a good explanation anywhere, hence why so much time was spent trying to think of a concise way to cram one into a command

velvet narwhal
#

The asset name in the Target field doesn't include the language. For example, "Target": "Dialogue/Abigail" (the asset name) will change the content loaded from Content/Dialogue/Abigail.de-DE.xnb (the file path) when playing in German. If you want to make the same change in every language, you don't need to do anything else. i don't think this is what you were looking for

uncut viper
uncut viper
#

(two discussions i mean)

tiny zealot
#

i'm pretty sure i remember a game asset/file path explanation. maybe it was only good enough for me, a programmer, and not sufficient for laypersons?

tender bloom
#

I just stuffed it into a wiki page, it’s definitely way too long for a command

#

Maybe i should rename the page because right now it’s mostly about game content vs local files

brave fable
#

it isn't at all possible to get the texture2d for a tilesheet in c#, is it?

#

can't even load it from temporarycontent since tilesheet image source is given as a local asset

#

maybe with a little butchery on the smapi asset key SDVpufferthinkblob

finite ginkgo
velvet narwhal
#

or maps/springobjects

uncut viper
tender bloom
#

Ah ok

tender bloom
#

Maybe that one is on the wiki page for CP?

#

But maybe not

#

If it takes a whole discussion to explain it probably could be a wiki page instead of a command

brave fable
#

it's only my own tilesheet so i think i can ModEntry.Instance.Helper.ModContent.Load<Texture2D>(where.Map.GetTileSheet(entry.TileSheetId).ImageSource.Split('/', 3)[^1])

uncut viper
#

well, i think part of the want for a command was to have something to link to at all

tender bloom
#

Or a section of a wiki page

rancid temple
#

Easier to remember commands with links than the links :P

brittle pasture
#

"A filename is how your computer sees the file. An asset is how Stardew Valley sees it. You need to load your file into an asset before you can reference it in Stardew"
idk

calm nebula
#

I don't believe there isn't a way to get the texture2d

#

How does smapi load tilesheets

tender bloom
#

I never got the hang of texture management in C#

tiny zealot
#

the bits are there. there must be a way to get them (but the way may not be pretty, or fun, or efficient)

calm nebula
#

Hah!

tender bloom
#

I wrote working code but I don’t understand it

lucid iron
#

were u doing things more than just load

velvet narwhal
#

i feel like that's gonna be my entire career for c# modding

brave fable
#

nono i think i've got it, it's just being silly

#

just wrote the msg before thinking about it

tender bloom
lucid iron
#

oh fun DokkanStare

brave fable
#

actually no it doesn't work since the map is loaded in a cp component and the code doesn't have those assets lol

tender bloom
#

Not pretty but it worked

past crystal
lucid iron
#

does it have nice api like oiio or are u just doomed

brave fable
#

i'll just add a load for each tilesheet in the cp component ig

calm nebula
#

Or the weird rented array thing I did

calm nebula
#

You are either doing repeated get/set data

#

Or basically calling memcpy

tender bloom
calm nebula
#

I slowly sank into the NO ALLOCATIONS camp huh

next plaza
#

Yeah you really went all in on performance at some point

#

(looks at your wearables implementation)

calm nebula
#

In related, I'm the "no seriously we need proper impedance matching" person at work

next plaza
#

(And the multithreading I commented out from the macro pathfinder)

calm nebula
#

Rain

#

Raiiiiinnnnn

#

Why is stardew raiiiiinnnnnnn so laggy

brave fable
#

new TemporaryAnimatedSprite

lucid iron
#

say sdv being "not thread safe" is just about the fields on various sdv things right

#

can i bread just to load and preemptively cache some stuff in the back

calm nebula
tiny zealot
#

back in 1.5.6 i used a thread to load my mod's music after game launch, since each file took about half a second to load and there wasn't a good time to stop the world to do that

lucid iron
#

i gotta move the texture stuff out then blobcatgooglyblep

#

but hm

#

the thing i wanted to cache is item textures for representing a context tag

calm nebula
#

For the record the issue is that you cannot draw, getdata, or setdata

lucid iron
#

rn i am just get those as needed, which is alright

calm nebula
#

On a Texture2d on a non ui thread

#

Also for the record you should be careful when even viewing data structures other people may edit

brave fable
#

would it be too much to have a custom implementation of nighttiles involving critters

#

temp sprites just won't do SDVdemetriums

calm nebula
#

Yay I get to go home!

calm nebula
#

Or serialized

brave fable
#

perfect 😌

#

fun fact: clouds are critters just the same as frogs and squirrels

tender bloom
#

Maybe clouds have feelings

lucid iron
#

@teal bridge hello it seems like ViewMenu doesn't check bounds of floating elements on overlay, so clicking on a scrollbar in an overlay exits the overlay instead of letting you interact with scrollbar

brittle pasture
#

OK so it turns out Automate registers any CrabPot instance as a Crab Pot Automate machine, and your water sifter class inherits from it, so it wasn't as "not too hard" as expected. I can solve this one of two ways

  1. Make a PR to Automate to not register your water sifter in favor of my own custom integration
  2. Harmony patch Automate itself to do so
    I'm doing 1 (because I've committed enough Harmony crimes against Automate's code already), but that means the integration itself will be weeks away, until Pathos can get back to mod updating after 1.6.9. Just wanna let you know the status
teal bridge
lucid iron
#

yea sure ill poke around

#

i did attempt changing the check from outerbounds to containspoint but that doesnt work consistently think

#

maybe i just make FloatingBounds?

teal bridge
#

Given that floating elements can technically be anywhere, I think it requires an explicit bounds check for every floating element individually, otherwise you could end up in a situation where a float is way off in the corner and you can't click anywhere to dismiss the overlay.

lucid iron
#

kk ill see about why containspoint no work

teal bridge
#

Probably the best performance will be: cache both the actual bounds and a union of actual bounds + all floats, and then if you find a point that's outside the real bounds but inside the union, check the individual floats (that is to avoid iterating the list on every single hover event).

#

If you find yourself in over your head then no worries, I just got the impression from your post that you already had something figured out.

#

ContainsPoint would only be a world of hurt, you'd have to do translations to view-space and even then those queries are not cached very well.

lucid iron
#

i see why it is getting poped but i wasnt sure how to check real bound Bolb

#

but yea what u said makes sense ill give it a shot

indigo yoke
#

that's fair / understandable

teal bridge
#

Yeah, I imagine this could get a little finicky, I don't think I foresaw overlays and floating elements actually interacting.

lucid iron
#

selph what about junimatic intergration

brittle pasture
lucid iron
#

#dehardcodecrabpots2024

indigo yoke
#

Crimes with harmony against automate!

#

tbh a harmony patch might be better.

Like harmony patch a postfix to see if it sees a water sifter instead of a crabpot, to use the right bait

#

tbh I thought I made the water sifter it's own thing based off crab pot and not inherite the crabpot class.

calm nebula
#

I'm pretty damn sure you can just make the damn crab pot a normal data/machines machine tbh

brittle pasture
# lucid iron ~~selph what about junimatic intergration~~

actually, weirdly enough, and only if I'm reading the code right, Junimatic should just work™ because it doesn't do any fancy behaviors; it just tries performObjectDropInAction on every item in the inventory (compared to Automate's bespoke logic)

calm nebula
#

Oh that's. A lot of custom logic tbh

brittle pasture
#

yeah that does mean Junimatic crab pots don't benefit from the xp gain, or ||that book that gives a 25% chance to double harvest||

#

(do we need to spoiler 1.6 stuff in here?normies don't go to this channel right)

calm nebula
#

Yeah machine output delegates get the blasted machine instance

uncut viper
calm nebula
#

Should be super easy to convert to data/machines but also automated has a lot of caching

brittle pasture
#

would be nice. definitely out of scope for 1.6.9 though

teal bridge
#

We encourage spoilering in here? I'd have to think that anyone who's making mods is going to expose themselves to the game content one way or another. I'm definitely not gonna spoiler.

#

I think you forfeit your right to be surprised when you start digging through the game's source/decompiles/unpacked assets, lol

uncut viper
#

its probably a lot less relevant now, s'just what the pin says from when 1.6 launched

vernal crest
#

I have still managed to avoid learning all the 1.6 spoilers SDVpuffercool And I still haven't played enough to actually come across them in game yet either

lucid iron
calm nebula
#

Darth Vader is ||Anakin Skywalker||

#

Harry Potter ||was a horcrux||

#

Bella ||picks Edward||

teal bridge
#

What a twist!

dusty scarab
#

I wish I had twists that weren't niche and could be spoken of without people being either confused or wanting to beat me with a folding chair for talking about it out loud :<

indigo yoke
lucid iron
#

u dont have to use big object for machine rule tho

teal bridge
#

Self-replicating furniture FTW

brittle pasture
indigo yoke
indigo yoke
#

is that made by some one named Selph

#

if it is, shill away

#

I might switch over to that.

#

sadly would kill anyone's water sifters.

brittle pasture
gaunt orbit
indigo yoke
#

1.9 seems like it would be a good switching point

#

1.6.9*

gaunt orbit
#

I haven't spent much time modding lately. but today I spent some time fumbling blindly around writing controller code for hhd. and yesterday I added a thing for per-player instanced locations to mumps because it seemed like fun and I hadn't seen anyone else do it

#

I feel like I have no idea what im doing with controller menu stuff tbh

#

architecturally

uncut viper
#

your best, usually

gaunt orbit
#

HONESTLY

lucid iron
#

what is mumps

gaunt orbit
#

complicated menus are hard in stardew

gaunt orbit
#

it's got some neat stuff in it!

brittle pasture
#

MUMPS! I've been looking forward to that one

lucid iron
#

oh right the maps thing DokkanStare

#

i googled it and got the disease

indigo yoke
# indigo yoke 1.6.9*

But at the same time, recoding the water sifter is going to be a pain in the behind 😭 already did it once

gaunt orbit
#

one of these days I'll actually test everything and publish it

dusty scarab
#

I'm assuming you don't mean the disease when you say mumps

gaunt orbit
#

it's a bad acronym

#

More Useful Map PropertieS

dusty scarab
gaunt orbit
#

the main thing I've been procrastinating on has been the Sound Code for music regions

brittle pasture
#

how about Map Extension And Some Location Extra Stuff

gaunt orbit
#

easy: figuring out where you are and transitioning screen volume
hard: figuring out who should be getting music in split screen

#

maybe I could call it SMUT: Some Map Utility Things

gaunt orbit
#

okay but for real have you ever looked at the music priority code in Game1? it's headache-inducing

brittle pasture
#

the correct solution is obviously play both tracks, one left channel and one right channel

gaunt orbit
#

taking notes

next plaza
#

Sad mono channel noises

#

(I'm actually using headphones, but...)

gaunt orbit
#

wait I could call it Some Useful Map Stuff

lucid iron
#

maybe the caching ought to go on OverlayLayoutData

indigo yoke
velvet narwhal
#

i like the sinz approach, it doesn't exist to me

old edge
gaunt orbit
velvet narwhal
#

OH what if you added in the bool from woods

gaunt orbit
#

hm? like the lighting override? that's in there

velvet narwhal
#

idk if you were taking suggestions-- SDVpufferwow

#

yaaay

gaunt orbit
#

yeah I mean I'm always down for suggestions

velvet narwhal
#

dreamy basically implemented the whole cooledlava bit iirc from volcanodungeon.cs

uncut viper
#

"You may fascinate a woman framework author by giving them a piece of cheese suggestion w/ the implication of using their mod"

velvet narwhal
#

hey, i definitely kept my promise, i just can't find a use for the secret note framework for my currently published mods

lucid iron
#

Is there vanilla touch warp that makes u jump in a hole

calm nebula
#

No

#

Next question?

lucid iron
#

Aw ok

calm nebula
#

There is a jump function though

#

You use it to sit down and ride a horse

lucid iron
#

I have vague ideas for npc mod and one desire is ability to jump into a hole to go to their home area

velvet narwhal
#

ptsd about sims 1

calm nebula
#

What's sims

velvet narwhal
teal bridge
# lucid iron maybe the caching ought to go on OverlayLayoutData

That's where the caching goes, yes. Not sure where ObservableCollection would come into play, it's not used anywhere. Changes to bounds can only happen in a measure pass, and specifically a measure pass that returns true because something has changed. But it's alright, you've got a workaround for now and I'll take a closer look later.

brave fable
#

sometimes u decide that a 1-line map property isn't cool enough, and u end up with a 700 line data file held up by 3 models across 500 lines of code and minus 3 hours

lucid iron
#

But is it pretty

velvet narwhal
#

knowing blueberry's track record it probably slaps

brave fable
#

u right

next plaza
#

Meow!

brave fable
#

cant even send a timelapse since 8hrs at 1s=10min ingame turns into 30mb so you'll just have to imagine i did something cool SDVpufferchicknight

exotic pilot
#

Perms question: Am I allowed to make an unofficial update for a mod that's not open source? It's a simple mod (Fast Forward) so I just made a 1.6 version on my own, so while it technically doesn't use the same source code, I'd also feel bad not crediting the mod that it's based off of...

next plaza
#

I’ve definitely sent “gifs” (webm or whatever it’s called) that size before SDVpufferchicksweatsip

uncut viper
lucid iron
#

depends on if you decompiled the other mod ig

#

if you wrote your own code that happens to do same feature i think it's fine

exotic pilot
#

Hm, okay... I feel a bit weird about it, since it's not that it just "happens" to do the same thing, but rather that I intentionally wrote a replacement... Maybe I'll at least mention it in the mod description? An unofficial unofficial update SBVShyRen

uncut viper
#

i dont think the concept of fast forwarding time in a game is unique enough to feel weird about it, but its not like it hurts either, so you do you basically. but from a permissions standpoint, you dont need to

lucid iron
#

there's a mod line sprinklers that inspired line sprinklers redux, with the later not using any code from original

#

so does your version of fast forward mod explode npc pathing monS

vernal crest
calm nebula
#

Literally

uncut viper
#

// // TODO: override finalizer only if 'Dispose(bool disposing)' has code to free unmanaged resources
have you done this yet atra

calm nebula
#

Lol (yes)

vernal crest
#

I needed rokugin to hold my hand through how to change "press any button" into "press one specific button" because I made zero progress on it on my own. I am still extremely baby at C#.

exotic pilot
calm nebula
#

Oh pressing buttons is straight up in modentry

vernal crest
#

Yeah I can do it now!

#

(Just)

#

I also don't know how to have any .cs files that aren't ModEntry yet

#

Like I said. Baby haha

uncut viper
#

that one is also easy at least, you can just make another one

#

your first one doesnt even need to be named ModEntry.cs

vernal crest
#

Would the game be able to use it just because it's there?

#

I don't have to like...call it from somewhere else?

uncut viper
#

it all gets built into one .dll in the end anyway

vernal crest
#

Is it like with the content.json where I could have it all in one monster cs file if I wanted to?

uncut viper
#

you technically could. not advised but you could

velvet narwhal
#

iirc i vaguely remember "you can shove everything into modentry, while impractical, it'll still work"

vernal crest
#

(I am not expecting personalised teaching btw, so if you are not interested in teaching me more about it then I will not be upset. I am just asking because I am curious and you are replying haha)

velvet narwhal
#

baby's first c#, everything into modentry

exotic pilot
calm nebula
vernal crest
vernal crest
uncut viper
#

you need a file with an Entry function i just meant the file name doesnt have to be literally ModEntry.cs

calm nebula
#

You have to have a class that extends Mod and implements Entry

#

That file can be named SpanishInquistion.cs for all SMAPI cares

#

ModEntry.cs is just conventional

vernal crest
#

Ah, I see.

#

This bit being the entry class?

#

(That is copied from the example mod in the get started page moetrash linked)

calm nebula
#

Yes

gaunt orbit
velvet narwhal
#

(i wish to attend the blueberry school of draw effects, i want to make a really cool pirate ship animation SDVpufferchickcry )

vernal crest
#

Thank you atra, Button, and moetrash for taking time to teach me this stuff SDVpufferheart

#

I can do a t-test for you if you ever need one xD

uncut viper
#

i like seeing people venture into C#

#

i vaguely remember what a t-test is from stats class and the less i have to think about them the better i think

velvet narwhal
#

SDVpuffersquint i feel like i should turn off intellisense while doing my c#

uncut viper
#

why is that

velvet narwhal
#

i hit tab and it just gave me an entire block that i'm not sure is correct

uncut viper
#

(i do not remember what is intellisense and what is intellicode and what is intelli ai or whatever )

velvet narwhal
#

it's vs22's ai

uncut viper
#

oh. yeah probably not the best to learn with

velvet narwhal
#

probably the worst thing for me that i'm staring at it like SDVpufferpain

uncut viper
#

might get you something but if you dont know at all what its doing or how to edit it then, eh. pretty bad

proud wyvern
#

IntelliSense is much more than that

#

i would not recommend completely disabling it

velvet narwhal
#

yeah--i'm back to that pickpersonalfarmevent

{
    helper.Events.GameLoop.DayEnding += GameLoop_DayEnding;
}

private void GameLoop_DayEnding(object? sender, DayEndingEventArgs e)
{
    throw new NotImplementedException();
}``` and i'm like yep, i have no idea if this is correct
#

i just disabled the c# suggestions bit SDVpufferthink

proud wyvern
#

that... doesn't look like the work of the AI bit

uncut viper
#

(if its got other stuff then i would listen and keep it, take my words with that grain of "i dont remember what those things are" SDVpufferthumbsup)

proud wyvern
#

it just implemented the event delegate for you

#

this is 100% correct C# and definitely a way you can do it

velvet narwhal
#

yeah i was mid-typing dayending, hit tab and it finished off the definition

proud wyvern
#

minus the throw line, which is meant to be replaced by you

velvet narwhal
#

SDVpuffersquint time to break some eggs

dusty scarab
#

I don't think that I am using CreateOnLoad right. I'm trying to enable Always Active so that my map can be used in multiplayer. does anyone know what I'm doing wrong?

uncut viper
#

CreateOnLoad is a model, not a boolean

#
"CreateOnLoad": {
  "MapPath": ...
  "AlwaysActive": true
}
dusty scarab
#

ah, okay. thank you!

velvet narwhal
#

oh

#

i had the wrong pickfarmevent

#

yeets

velvet narwhal
#

time to speedrun a spouse to see if this worked

uncut viper
#

theres a debug command for marrying if you need it

velvet narwhal
#

i have 0 idea if i did this correctly SDVpuffersquee but it built and smapi didn't scream at me

#

(lemme just enable cjb because it's acting strange with just pure debug commands)

#

SDVpuffersquint did i put it in the wrong spot

uncut viper
#

can you show what you've done

velvet narwhal
#

i think it's because i need to replace the last part return new SoundInTheNightEvent(2); with QuestionEvent(1); yeah?

uncut viper
#

if you are postfixing with Harmony (you should be postfixing with Harmony) you dont return anything

velvet narwhal
#

insofar i've literally only changed the r.NextBool to be the QuestionEvent(1)

lucid iron
#

Are you aiming for a night event

velvet narwhal
#

yeets this onto github

lucid iron
#

Iirc there was some framework that let u just use event script

velvet narwhal
#

i'm trying to first be able to have a consistent adoption/pregnancy question, then i want to be able to set it to GMCM after i figure that out

#

yeah baby's first c# i wanted something tangible that didn't involve me drawing an angry goose

lucid iron
#

Is the QuestionEvent a vanilla thing I never used it

velvet narwhal
#

yeah button said to postfix pickpersonalfarmevent

uncut viper
#

there is stuff to unpack here but for starters your patch has not patched anything

velvet narwhal
uncut viper
#

because you've not told it what to patch

#

and this is not how harmony patches are made

velvet narwhal
#

sorely clueless

uncut viper
#

uhhhh would you like me to write up a proper patch for you to learn by example or did you want me to try (and possibly fail due to my fault not yours) to explain via text

velvet narwhal
#

if it's fast, i do learn by example

#

if you wanna wear down your keyboard for those sweet chat xp, by all means it's probably helpful to throw it here SDVkrobusgiggle

uncut viper
#

i might be able to do half of both by just finding a good example of a patch for somethin else from one of my mods hold on

velvet narwhal
#

the rest of it, in one ear out the other

uncut viper
#

(tangential but you can do nameof(Utility.pickPersonalFarmEvent) too since its public but the string will work but just lettin u know)

#

the patch in this file is named Postfix so i dont have to tell harmony that it is one, so the only annotation i need is to tell it which function its a postfix for

#

but your postfix will also need to be static void, you're not recreating the signature of the original method

#

you're writing a new method that Harmony will run after the original one

#

pickPersonalFarmEvent takes no arguments so thats fine, but you'll want to add an argument of ref FarmEvent __result which means harmony will give your function the original result that the original method was gonna end up with

#

it needs to be ref because you plan on changing it

#

but once youve got the signature and the annotation set up correctly the code you wrote in your function is like. it will work but its not what you want

#

if you just want to guarantee that the question will be asked, all you need is the relevant checks (if marriedorroommates, can get pregnant, etc) and if those are true, just do:
__result = new QuestionEvent(1)

#

this will overwrite the original result of pickPersonalFarmEvent

#

you dont need to create an rng or do anything with NextBool (which doesnt guarantee it anyway) bc you dont want rng you just want to change the result to the questionevent if the NPC can have children

#

you also dont need the if statement checks for the birthing event and dont need the SoundIntheNightEvent fallback

#

bc you're only concerned with the pregnancy/adoption question

#

(also if you're wondering you dont need to wrap things in a try ... catch block i just do it anyway)

velvet narwhal
#

SDVpuffersquint? c# static void Postfix(ref FarmEvent __result) { NPC npcSpouse = Game1.player.getSpouse(); bool isMarriedOrRoommates = Game1.player.isMarriedOrRoommates(); if (isMarriedOrRoommates) { bool? flag = npcSpouse?.canGetPregnant(); if (flag.HasValue && flag.GetValueOrDefault() && Game1.player.currentLocation == Game1.getLocationFromName(Game1.player.homeLocation) && r.NextDouble() < 0.05 && GameStateQuery.CheckConditions(npcSpouse.GetData()?.SpouseWantsChildren)) { __result = new QuestionEvent(1); } } if (isMarriedOrRoommates && Game1.player.team.GetSpouse(Game1.player.UniqueMultiplayerID).HasValue && Game1.player.GetSpouseFriendship().NextBirthingDate == null && r.NextDouble() < 0.05) { long spouseID = Game1.player.team.GetSpouse(Game1.player.UniqueMultiplayerID).Value; if (Game1.otherFarmers.TryGetValue(spouseID, out var farmerSpouse)) { Farmer spouse = farmerSpouse; if (spouse.currentLocation == Game1.player.currentLocation && (spouse.currentLocation == Game1.getLocationFromName(spouse.homeLocation) || spouse.currentLocation == Game1.getLocationFromName(Game1.player.homeLocation)) && Utility.playersCanGetPregnantHere(spouse.currentLocation as FarmHouse)) { __result = new QuestionEvent(3); } } } }

#

oh wait i forgot the multiplayer part

uncut viper
#

you do not want to skip the other checks

#

you dont want to do it JUST if theyre married or roommates, the other stuff is still important regardless

lucid iron
#

What if u do transpiler

uncut viper
#

you dont want to do it if the NPC in question is set to not want to have or adopt kids, you dont want to do it if the farmer is not actually sleeping at home, you dont want to do it if the NPC is already set to have a birthing event

uncut viper
velvet narwhal
#

and then because of the playerscangetprenganthere i have to implement that last bit right? private static bool playersCanGetPregnantHere(FarmHouse farmHouse) { List<Child> kids = farmHouse.getChildren(); if (farmHouse.cribStyle.Value <= 0) { return false; } if (farmHouse.getChildrenCount() < 2 && farmHouse.upgradeLevel >= 2 && kids.Count < 2) { if (kids.Count != 0) { return kids[0].Age > 2; } return true; } return false; }

uncut viper
#

that code is hard to read on just discord so i will Not and just say you basically just want to copy everything inside that else block in the original function and just remove the r.NextDouble parts from the if statements

#

you do not

#

actually

#

why is that function private whaddahell

velvet narwhal
#

oh copy the whole diggity? ok

uncut viper
#

well. okay. yeah you can just reimplement it yourself then. you could use reflection but thats a bit more to explain unnecessarily

#

you want to copy the whole part inside the else block bc everything it checks in there is still something you wanna check. its just the rng you want to remove

#

and ofc replace both of the return statements with __result =

#

once you've got it working then you will want to go back later and at the top of your postfix do your checks for like mail flags and config and stuff, bc without that this postfix will run every time and your spouse will ask you every single night they can

ivory plume
#

Stardew Valley 1.6.9 beta is now on GOG!

To get the beta:

  1. In GOG Galaxy, click Stardew Valley in your installed games.
  2. From the options icon at the top, click Manage installation > Configure.
  3. In the "Beta channels" dropdown, choose "Change private channel password".
  4. Enter the password stardewvalley169.
  5. In the same dropdown, choose "beta" and click OK.
uncut viper
#

(hello Pathos is it too much to ask for that function to be public'd or is it private for a reason)

velvet narwhal
#

(is there a difference between farmHouse and cabin?)

ivory plume
#

(Sure, I can make it public in the next patch.)

uncut viper
#

theres a couple private functions in Utility actually that would probably be helpful as public SDVpufferthinkblob

#

isCategoryIngredientAvailable() and itemsShippedPercent() mainly

#

prooobably dont need to unprivate the utility function that calls the garbage collector SDVpuffersquee

uncut viper
ivory plume
#

Done in tonight's beta update!

Excerpt from the changelog:

  • Fixed tile index collisions.

    Vanilla logic that checks for a map tile index now consistently checks the tilesheet ID (case-insensitive), which eliminates the entire class of bugs related to tile index collisions (e.g. custom tilesheet tiles being unexpectedly treated as lights).

    Breaking change: if a custom map doesn't follow vanilla conventions (e.g. the paths tilesheet having the ID "Paths"), some vanilla behavior like forage spawning may no longer work.

half tangle
uncut viper
#

(also Avi since that function is gonna be public in 1.6.9 it means once it comes out you won't have to reimplement the function yourself you can just call it normally)

#

(also thank you Pathos i forgot to say after my pufferheart)

ivory plume
velvet narwhal
uncut viper
#

what do you mean

velvet narwhal
#

if i'm calling the playersCanGetPrengantHere, or do you mean it's just going to be automatic because it'll use the Utility.players*

#

for right now i've just deleted the Utilities part of it and reimplemented to get the squiggly to go away SDVpufferthink

uncut viper
#

for now until 1.6.9 you'll need to rewrite the function yourself (the reflectionless way) and then change that part of your patch to call your function instead, which will be identical

#

if you named it the same and its in the same file then yeah just removing Utility works

#

after 1.6.9 you can put the Utility back. you also dont have to use the public Utility one but it would be better to in case someone else patches the function that determines if they can get pregnant there

lucid iron
#

Wait why can't avi use reflection

velvet narwhal
#

i am egg

uncut viper
#

they can i just didnt wanna explain it

velvet narwhal
#

i have 6 training wheels on right now SDVpuffersquee

lucid iron
#

Reflection is just breaking into ppl's houses it's not that complicated

uncut viper
#

i worded it a bit badly i just meant "this is the reflectionless way so you'll need to rewrite it"

velvet narwhal
#

now comes the implementation of gmcm

uncut viper
#

now just double check that doesnt happen every single night after clicking yes

lucid iron
#

In this case you r hoping to call private function which u normally can't do

velvet narwhal
#

oh y'know you're right one second

#

i closed out of excitement eyeshake

#

haven't exactly figured out hot reload myself just yet

lucid iron
#

Just restart everytime sleep

uncut viper
#

at the risk of being the "uhm aktually" person i think it would still only lead to one child SDVpufferthink but idk the inner workings of pregnancy code that much

lucid iron
#

But iirc VS hot reload is automatic right

uncut viper
#

id assume itd just keep overwriting the birth date

#

so itd never arrive

lucid iron
#

As long as u started smapi from VS

#

Rather than from steam

velvet narwhal
#

yeah i'd have to set up my smapi to vs but i haven't bothered

uncut viper
lucid iron
#

Red tape

dusty scarab
velvet narwhal
#

alright now the fun part, writing the modconfig

#

i should really do baby's first c# and shove it all into modentry but i don't think i'm that chaotic

#

also, is the entry(IModHelper) actually necessary or should i just yeet that

uncut viper
#

you need that

#

thats how smapi loads your mod

velvet narwhal
#

oh, even if it only has just the dayending and an empty definition?

uncut viper
#

yes

teal bridge
lucid iron
#

Well you gotta hook your events

#

And apply your patch

#

So yeah entry is important

uncut viper
#

without the Entry function even if SMAPI still loaded it, if it was never called then none of your code would run, bc nothing is asking it to run

proud wyvern
#

(it won't compile without the Entry method.)

uncut viper
#

(i meant more in the sense of "even if it hypothetically would load it anyway")

#

(but yes it wont compile)

lucid iron
#

So this mod is for tweaking pregnancy right

velvet narwhal
#

yeah just for me to learn what the heck i'm even doing

lucid iron
#

/adoption

velvet narwhal
#

okay, now i read how to make a config

teal bridge
#

Hmm, why would SMAPI simply say a mod is no longer compatible, without any specific errors?

lucid iron
#

What is the desired mechanism?

proud wyvern
velvet narwhal
#

basically removing the rng of the event and set it to be configurable, or even set it to a mailflag

teal bridge
#

Ah, you're right, it's in verbose.

proud wyvern
#

verbose/trace. i can never remember which one is which

teal bridge
#

GetContainingBuilding no longer exists... guess I do have some things to fix, sigh.

uncut viper
#

verbace

lucid iron
#

Do u want ppl to be able to set whether they want a baby in some interactive way Bolb

velvet narwhal
#

something like a publicly available key probably kyuuchan_nod2

uncut viper
#

to fix it anyway

lucid iron
#

Or is it more for mod authors

teal bridge
#

I see Automate is also broken - for others who've gone through this, will updating the Pathos mods make them incompatible with 1.6.8?

uncut viper
#

oh i was slightly off its just a field now called GameLocation.ParentBuilding

velvet narwhal
#

more for mod authors, so it can be used like a addmailreceived

lucid iron
#

And develop branch only builds for 1.6.9 *without change

#

Spacecore needs change too, casey posted it in this channel yesterday

teal bridge
#

Ironically, AFS (the fishing mod, which is more transpiler-heavy than any other mod I've made) seems to have problem at all. Ah well, tomorrow.

uncut viper
teal bridge
#

(I don't run Spacecore, but yeah, I saw that)

lucid iron
#

Oh and cjb cheat menu broke couple builds ago

uncut viper
#

10 speed for debugging i miss you every day

lucid iron
#

Need to do the fix yourself

#

Or just comment it out if u don't care about the social quest

teal bridge
#

Yeesh, even Content Patcher is broken. This'll be an adventure.

uncut viper
#

i was gonna say content patcher worked for me earlier but i guess i didnt test it on the very very latest beta version so iunno

lucid iron
#

That one has a beta build on nexus which works I think

teal bridge
#

Well, that's what the trace says anyway.

Broken code in ContentPatcher.dll: reference to StardewValley.ArgUtility.TryGetEnum (no such method).`

uncut viper
#

i think you just have outdated beta CP

teal bridge
#

I don't have beta CP at all. I was on 1.6.8 until 10 minutes ago.

uncut viper
#

oh i thought you meant like the latest beta broke CP's beta, mb

lucid iron
#

Tbh if u got pathos repo checked out u can just build from develop bolbpopcornhat

#

Btw does AFS have way to turn off jelly predictions

teal bridge
#

Sure, in the settings. Every rule can be set to "never".

lucid iron
#

Ah it's in SDVpufferfish

teal bridge
#

Well, on the bright side, only one of my mods seems to be "fail to load" tier broken. We'll see how many actually still work.

lucid iron
#

I'm not 100% sure yet but I think whatever VMV did to spawn fish bubbles causes AFS to display fish bubble countdown all the time think

teal bridge
#

Well in theory there should always be one visible - there's always a current or next splash spot.

#

Except at like, midnight.

#

I'm not sure what VMV would be doing differently - splash spots are one of the few things that does not involve transpilers or other funny business, it's just a straight recreation of the seeded random logic.

lucid iron
#

I do remember hearing that VMV has bespoke C# for spawning fish bubbles

velvet narwhal
#

(SDVpufferpain the customfields on npc_data wiki has circular logic, but i'm going to assume it's string->string, to which i need to google how da heck)

lucid iron
#

But yeah I haven't checked in detail blobcatgooglyblep

#

Its prob not worth fixing/changing

teal bridge
#

Depends how bespoke it is, I guess.

uncut viper
#

you've already got part of the if statements checking npcSpouse.GetData so you can just get that data a little bit earlier to check the custom fields (and then reuse the data in the if statement later on so you dont have to use Getdata twice)

velvet narwhal
#

SDVpufferthink lost i'll just finish attempting this

#

it is definitely screaming at me because i'm trying to use a bool

uncut viper
#

in your customfields?

velvet narwhal
#

y-ea-h

uncut viper
#

yeah, its a string to string dictionary. cant use bools. just strings

#

you need to check in your C# whether that string is parseable as a bool

velvet narwhal
#

npc doesn't contain a customfield?

#

digs into decompile

uncut viper
#

NPC the class doesnt, but the CharacterData returned by GetData does

#

same way it gets SpouseWantsChildren

velvet narwhal
#

i seem to be stupid

#

npcSpouse.GetData()?.CustomFields(); although i think attempting to follow the cropdata example is losing me in the process

uncut viper
#

CustomFields isnt a function

#

its just a field

#

CustomFields IS the dictionary

#

so you'd use things like CustomFields.TryGetValue(etc etc)

velvet narwhal
#

oh

#

OH

#
    if (string.IsNullOrEmpty(stringName)) {
        __result = new QuestionEvent(2);
    }
    if (stringName == "Yes")
    {``` ![kyuuchan_nod2](https://cdn.discordapp.com/emojis/1288315405084917862.webp?size=128 "kyuuchan_nod2")
#

the rest of it, idk i'm pretty sure i'm doing it wrong

brave fable
#

i feel like you should turn intellisense back on

velvet narwhal
#

but the red squiggly of screaming is gone

#

it is back on now

#

well it's been on since button held my hand like the baby i am

uncut viper
#

i dont know what questionevent(2) is or why you'd wanna change the result to it, but all that seems roughly functional assuming you have more code after the bottom

velvet narwhal
#

2 is the wolf howling

uncut viper
#

why do you wanna make the wolf howling event happen every night