#making-mods-general

1 messages · Page 60 of 1

tender bloom
#

And you can use trig to find x and y given theta

brave fable
#

i'd just do a sin on the globalwind minus baseline, but at the same time i want that inertia behaviour where it swings away from the resting point and back

steep frost
#

I feel dumb there's already a not human mod it just needs compatibility patches

tender bloom
#

Vinegar in mandarin is 醋 and goose is 鵝, which respectively sound like chu and e

tender bloom
vernal crest
tender bloom
#

You can try screwing with the constants maybe as functions of wind??

#

Like g (gravity)

#

Maybe not L (pendulum length)

#

Possibly w (oscillation speed)

brave fable
#

yeah length is a trick here since the sprite is rotating around an origin of 0.5x 0y

#

so technically no length from the axis

#

.. but only moves to one side

lucid iron
#

can the wind number become positive

brave fable
#

wind only moves one way in sdv, left and slightly down

#

but whether or not it's going to be blowing the other way, the object should still swing back right after being blown left

calm nebula
#

Do you have gravity modeled in

heady crest
#

guys, is there any wiki page that elaborates on how to make dialogues like these? with choices on them and different npc reactions

brave fable
#

in the sense that i've got r = math.clamp(r - 0.0035, 0, 1), yes

hallow prism
#

i suggest looking at quickquestion in event, and i don't remember the name for dialogue, but question is a good start

brave fable
#

well there's not exactly a defined time, maybe the method will make some sense. again, butchered shake code

public void UpdateRotation(GameTime time)
{
  float d = (float)Math.PI / 300f;
  this.RotationMax += Math.Abs(Game1.windGust) * this.Data.Resistance * 1.5f;
  if (this.RotationMax > 0)
  {
    if (this.Direction != -1)
    {
      this.Rotation -= d;
      if (this.Rotation <= -this.RotationMax)
      {
        this.Direction = -1;
      }
    }
    else
    {
      this.Rotation += d;
      if (this.Rotation >= this.RotationMax)
      {
        this.Direction = 1;
      }
    }
    this.RotationMax = Math.Clamp(this.RotationMax - this.Data.Resistance, 0, 1);
  }
  float scale = (float)Math.PI * this.Data.Limit;
  float ratio = 1f - Math.Abs(this.Rotation) / 1f;
  // CircularFromRatio(ratio) = 0.5f + 0.5f * (float)(Math.Sin(-Math.PI * 0.5f + ratio * Math.PI * 2f));
  float rotation = Utils.CircularFromRatio(ratio) * scale;
  this.DisplayRotation = rotation;
}
#

first video used rotation, second used displayrotation

#

maybe i can just screw with circularfromratio to give a wobbly result

lucid iron
#

whats CircularFromRatio

brave fable
#

it's in the comment SDVdemetriums

#

it just turns some 0..1 value into an equivalent along a sin wave

#

never had to use wolfram alpha for modding before lol

#

though it wasn't for this, it was for the colour and position of a sunset. somehow

lucid iron
#

rotation is the value that goes into draw right

brave fable
#

but this.Rotation and this.DisplayRotation to clarify, not rotation

lucid iron
#

i meant in general, you are do maths to derive the rotation argument of spritebatch.draw on the lantern

brave fable
#

oh right, yep that's just plugged right into the rotation arg

calm nebula
#

Hmm, I see pendulums

brave fable
#

i think math.pi * 2 * this.rotation might be it SDVpufferthinkblob if only the gd wind would blow

#

nvm it sucks

calm nebula
#

I would just yeet all code and go with a simple pendulum

#

Derive that from scratch

#

I would do that for you but I can't hear you over, well

true coyote
#

Oh blueberry I had a question while you're here

calm nebula
brave fable
#

if it's about wind or pendulums i don't need it

true coyote
#

Lol no

#

I'm guessing you're maybe aware of the error with upgrading the frying pans and having ui info suite? If not I can post the bug when I upgrade my pan next but it spams the console trying to fetch info about it (maybe the icon like the other tools for upgrading?)

calm nebula
#

That's a UIInfoSuite bug

brave fable
#

oh dw i know about it since yesterday, supposedly uiis has a fix for that but it hasn't been merged/released for like 4 months

true coyote
#

Ohhh alright, I always have a hard time figuring out who's end the bug is on

brave fable
#

the only fix i can make on my end is using the sprite indexes for the trashcan, but i have no idea what that'll break

true coyote
#

Yeah

#

I just had it crash once yesterday when I was playing

#

Or 2 days ago?

brave fable
#

i could probably just harmony patch uiis

true coyote
#

Idk it didn't like it that day

brave fable
#

honestly transpiling a different mod sounds more appealing than looking at maths letters like t and funny w and italics g

calm nebula
#

Lol

#

Simple pendulum is pretty easy

#

Right, Mathperson?

brave fable
#

i wish that took longer SDVpufferfush back to wind

tender bloom
calm nebula
#

Simple pendulum + wind force + damping is still only three forces right?

spice cloud
#

It's silly, but anyone know where the crop fairy sprites are in the unpacked folder? Trying to find them and can't put my finger on it SDVpuffersquee

#

... Found them, in Cursors. I had it open but they're so pale I didn't see it on the transparent grib background arf

slate totem
#

Hello! I'm not quite understanding this section of the Modding Dialogue wiki. Does this mean I have to first edit the Strings/StringsFromCSFiles to a question and then add the give_ action to character dialogue? Or am I completely wrong there? For context I want to add custom dialogue for Leo when accepting the pendant like Krobus has.

lucid iron
#

hm is this needed in 1.6?

true coyote
#

I did it

#

Im

#

coated in cheeto dust

slate totem
#

I've read that the strings are not hardcoded anymore so I'm assuming not, but thats where my knowledge ends

lucid iron
#

you can use keys like "AcceptGift_(O)109"

slate totem
#

Alright I'll try that!

ivory plume
#

You can add an AcceptBouquet key to their dialogue file instead in 1.6.

slate totem
#

Is that the same as the pendant?

ivory plume
#

For engagement dialogue, you can add an <npc>_Engaged key in Strings/StringsFromCSFiles.

#

(I'll update the dialogue page for the new 1.6 keys.)

slate totem
#

So like this?

#
  "Action": "EditData",
   "Target": "Strings/StringsFromCSFiles",
   "Entries": {
      "Leo_Engaged": "{{i18n:Leo.Pendant.Platonic}}"
              } 
    }```
#

Or have I misunderstood

ivory plume
#

Yep, that looks right.

slate totem
#

Perfect I'll go test it thank you so much!

old edge
#

Hello

#

Making my first farm map currently

#

It's supposed to be an island but does anyone know if someone has made custom ginger island tilesheets? I need more darker grass tiles!!!!SDVpufferchickpopcorn

lucid iron
#

why does it need to be island specifically bolbthinking

ivory plume
#

Which tiles are you missing? You can reference the game's Ginger Island tilesheets for any tiles you want to use on those.

slate totem
ivory plume
#

Welcome!

#

(The dialogue wiki page is now updated for the 1.6 changes.)

#

Random fun detail: when a Junimo harvester drops a crop that doesn't fit into its hut, they always toss it in the direction of the player.

patent lanceBOT
#

@calm nebula: remember Canadian Thanksgiving is on the 14th (20d ago)

brave fable
#

it's funny that the game makes the same number of 16~64 WeatherDebris instances no matter how large your screen is SDVpufferthinkblob maybe 64 crammed into 1280x720, or 16 spread out over 3840x2160

calm nebula
#

(Ditto with rain)

#

You get 70 raindrops regardless

drowsy plume
#

New dev here but I'm curious if there is a way to load directly into a stardew valley save file so I can bypass the title screen and test my mod faster.

#

I've honked so many times since I've started.

uncut viper
#

the Skip Intro mod can skip you straight to the save loading screen

calm nebula
#

!hotreload

uncut viper
#

dont know if theres one that will skip to a specific save though (or if skip int ocan already do that? i just use it to skip the intro)

old edge
#

I need Cliffs w the darker grass from the islands jungles

calm nebula
#

Damn I seriously thought that was a command

#

!reload

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

-You cannot reload tokens, that's a forced restart unfortunately
-If you've done any CHANGES, then type into SMAPI:
patch reload YourMod.UniqueID
-If you've done i18n DEFAULT.jSON changes, then type into SMAPI:
reload_i18n then
patch reload YourMod.UniqueID
-C# Visual Studio has a feature called Hot Reload
-C# Rider also has Hot Reload
-Generally working in C# it will be called "Hot Reload" (usage may vary)

brave fable
drowsy plume
uncut viper
#

do also look into the reloading stuff in the command atra had the governor post too, if its not something you absolutely need to restart your game for

brave fable
#

🔥SDVdemetriums

public void UpdateRotation(GameTime time)
{
  float dt = time.ElapsedGameTime.Milliseconds / 50f;
  float wind = dt * -Game1.windGust / 2500f;
  this.Momentum = Math.Clamp(this.Momentum + wind, 0, 1);
  this.Velocity += wind;

  float d = 0;
  float alpha = 0;
  float theta = this.Rotation;
  float v = this.Velocity;
  float g = this.Data.Resistance;
  float accel = (float)(g * Math.Cos(theta));
  float r = (this.Data.TextureRegion.Width + this.Data.TextureRegion.Height) / 2f;

  d = (float)(v * dt + accel * (Math.Pow(dt, 2) / 2));
  v = (float)(v + accel * dt) * this.Momentum;
  alpha = v * (float)(Math.Acos(d / r));

  this.Momentum = (float)(Math.Max(0, this.Momentum - Math.Pow(g, 2)));
  this.Velocity = v;
  this.Rotation += alpha;
  this.DisplayRotation = (float)(-Math.PI / 2f + this.Rotation);
}
#

so much work for so little reward

tiny zealot
calm nebula
#

Super useful

drowsy plume
#

Interesting linux quirk. I have a windows dev partition too.

drowsy plume
brave fable
#

maths is the exact opposite of beauty 😌

drowsy plume
#

Not that I'm saying it's ugly, I just don't understand it. 😐

calm nebula
#

Math is the only beautiful part of the world

brave fable
#

wow so we're getting personal now huh

calm nebula
#

Yes

next plaza
#

I dunno, cats are pretty beautiful

calm nebula
#

Please consult my discord username

next plaza
#

(So are women but that’s just me
Being Lesbian ™️)

calm nebula
#

V is likely velocity. The heck is alpha other than maybe theta?

uncut viper
#

i appreciate the addition of the ™

calm nebula
brave fable
#

i'm sorry how long has mathf existed

drowsy plume
#

Or go the meme route and use chatgpt

calm nebula
#

Yeah alpha is what I would call theta

calm nebula
next plaza
#

I thought

#

Is it .net 5?

calm nebula
#

Actually it's super old

next plaza
#

Ah I was thinking of mathhelper maybe?

calm nebula
next plaza
#

Hmm

calm nebula
#

See, I'm confused because momentum doesn't have a mass

drowsy plume
#

Another quick question regarding hot reloading.
patch reload LittleFarmer.Fell.LittleFarmer is the command I'm trying, and after typing it I get [22:14:17 ERROR Content Patcher] No Content Patcher content pack with the unique ID "LittleFarmer.Fell.LittleFarmer".
This is my manifest.json file.

{
  "Name": "Little Farmer",
  "Author": "Fell",
  "Version": "1.0.0",
  "Description": "",
  "UniqueID": "Fell.LittleFarmer",
  "EntryDll": "LittleFarmer.dll",
  "UpdateKeys": []
}
next plaza
#

Patch reload is for Content Patcher packs

#

Hot reload is a feature in your IDE (or dotnet watch if you’re using the command line)

#

Hot reload is specifically for c# mods

drowsy plume
#

Nah, trudging through Microsoft Visual Studio.

next plaza
#

I’d get a screenshot but I’m already in bed

#

But when the game is running there should be a red fire icon near the pause button

#

(In Vs)

brave fable
#

(does it still need to be enabled manually, or is it on by default?)

drowsy plume
#

I see the attached article the bot supplied. My VS doesn't have anything with a pause or fire button yet.

next plaza
drowsy plume
next plaza
#

Specifically the filled green triangle

drowsy plume
next plaza
#

Yeah, that’ll also let you set breakpoints to pause the game execution at certain lines of code in your mod for example

#

To let you look at variable values and such

drowsy plume
#

And trying to build the solution with the game running nets me this write error message.

Error (active)        [mod build package] Failed trying to deploy the mod.
System.IO.IOException: The process cannot access the file 'C:\Program Files (x86)\GOG Galaxy\Games\Stardew Valley\Mods\LittleFarmer\LittleFarmer.dll' because it is being used by another process.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.File.InternalCopy(String sourceFileName, String destFileName, Boolean overwrite, Boolean checkHost)
   at StardewModdingAPI.ModBuildConfig.DeployModTask.CreateModFolder(IDictionary`2 modPackages, String outputPath)
   at StardewModdingAPI.ModBuildConfig.DeployModTask.Execute()    LittleFarmer    C:\Users\mdaga\.nuget\packages\pathoschild.stardew.modbuildconfig\4.3.0\build\Pathoschild.Stardew.ModBuildConfig.targets    87    
brave fable
#

the SDV wiki isn't meant to include instructions for VS and other software, these have their own docs and tutorials elsewhere

next plaza
#

It can’t overwrite the DLL if you have the game already launched it

drowsy plume
#

Oh, I misunderstood. I thought there was some sort of hot reload or something for non content packs.

next plaza
#

There is

uncut viper
#

there is. but its not SDV specific behaviour

#

so its not on the SDV wiki

brave fable
next plaza
#

But you have to launch the game through the debugger first

#

If you launch the game otherwise it won’t work (unless you attach the debugger)

next plaza
drowsy plume
#

Oh interesting. I think I found something that works. And I see that play button now and the fire icon.

#

I assume the play button would do the same thing? I'll have to test!

next plaza
#

It should yeah, the mod build config sets it up

drowsy plume
#

It does! Wahoo!

next plaza
#

I gotta sleep now, might be around tomorrow

drowsy plume
calm nebula
#

Good night, Casey!

patent lanceBOT
woeful lintel
#

Holly shit that's awesome, I did not know that it could do that lmao

brittle pasture
#

You can use FTM to place objects on the map, including fences and gates. You can also make them indestructible.
(Disclaimer: I haven't tried it)

#

those are for big terrain features. you want items

tender bloom
#

a gate looks like this underneath:
ABA
or ABBA
where A = fence and B = gate (these are objects)
iirc

#

there's some wonkiness where you can put a gate on a fence

#

but for now you can almost certainly ignore that

haughty charm
#

Heya modders! I want an event to fire on the farm but only once the player has built a Big Coop. I tried this, but the event didn't fire, I suspect because I only have Deluxe Coops on my farm. Any suggestions how I could do this better?

"{{ModId}}.EggNodeArrival/t 600 1200/G BUILDINGS_CONSTRUCTED Here BigCoop":

white token
#

i started watching bogwyytch videos' Something Wicked Witchy Stardew Valley and she had the mod expansion Alchemistry by Morghoula but it can't be found

haughty charm
white token
#

thank you very much

rancid temple
#

I don't really do events, but can you do an ANY on the GSQ in a precondition?
G ANY \"BUILDINGS_CONSTRUCTED Here BigCoop\" \"BUILDINGS_CONSTRUCTED Here DeluxeCoop\"

haughty charm
#

I'm not sure, tbh. It's worth trying!

#

Thank you for the suggestion. SDVpufferheart

rancid temple
#

Here's to hoping

#

Name of the building might also be an issue, since in the data it's Big Coop and Deluxe Coop with spaces

haughty charm
#

Content Patcher does not like that GSQ entry.

#

I wonder if this would be better:
G BUILDINGS_CONSTRUCTED All "Big Coop" \ BUILDINGS_CONSTRUCTED All "DeluxeCoop"

rancid temple
#

Hm, maybe, though I feel like preconditions are probably AND's rather than OR's

haughty charm
#

hmm

finite ginkgo
haughty charm
#

I think the escapes are off, at least my schema isn't yelling at me if I do them this way:

G ANY \"BUILDINGS_CONSTRUCTED Here BigCoop/" \"BUILDINGS_CONSTRUCTED Here DeluxeCoop/"

#

And I should have been clearer, Content Patcher couldn't parse it

#

(that was why it was mad)

uncut viper
#

forward slashes arent gonna escape the quotes though, i dont think that will work either

#

'{{ModId}}.EggNodeArrival/t 600 1200/G ANY "BUILDINGS_CONSTRUCTED Here BigCoop" "BUILDINGS_CONSTRUCTED Here DeluxeCoop"':
does this work? im not sure if content patcher will like this one either tho

haughty charm
#

That didn't work. Trying something slightly different.

uncut viper
#

what error does it give?

haughty charm
#

Well, this didn't have the same JSON parsing error, but I got a whole set of different ones:
"{{ModId}}.EggNodeArrival/t 600 1200/G ANY BUILDINGS_CONSTRUCTED Here \"Big Coop\" BUILDINGS_CONSTRUCTED Here \"Deluxe Coop\"":

uncut viper
#

thats bc the ANY query needs the other GSQs within it to be quoted, bc it treats everything separated by a space as a different query to check

#

unless something is grouped in quotes

haughty charm
#

Ah, gotcha!

rancid temple
#

I'm still getting this error too

#

Was also getting it when I escaped some quotes around the building name

#

Seems to be failing much sooner for some reason

finite ginkgo
#

Why’s it treating each individual word as it’s own condition rather than as arguments PufferThink

uncut viper
#

i also just realized bc i was copying from a previous message that the one i suggested had the building types wrong, so it mightve needed to be this:
'{{ModId}}.EggNodeArrival/t 600 1200/G ANY "BUILDINGS_CONSTRUCTED Here \"Big Coop\"" "BUILDINGS_CONSTRUCTED Here \"Deluxe Coop\""':

haughty charm
#

Let me try that

uncut viper
#

as for why rokus doesnt work, ive got no idea why its not treating the inner query as an actual query... strange

rancid temple
#

It seems like the ANY isn't acknowledging the quotes

#

It's treating every single thing after that as it's own GSQ

uncut viper
#

the 1.6 migration page did mention something about event preconditions now being quote aware b ut i, admittedly, dont really know what that means

haughty charm
# haughty charm Let me try that

This couldn't be parsed at all.

StardewModdingAPI.Framework.Exceptions.SContentLoadException: Failed loading asset 'data/events.json' from SMAPI/logophile.eggalong: an unexpected error occurred. ---> Newtonsoft.Json.JsonReaderException: Can't parse JSON file at /Users/meredith/Library/Application Support/Steam/steamapps/common/Stardew Valley/Contents/MacOS/Mods/Can't We All Egg Along/data/events.json. This doesn't seem to be valid JSON.

uncut viper
#

maybe there needs to be quotes around the ANY itself?

haughty charm
#

inner quotes would need to be escaped, though, right?

finite ginkgo
#

…at this point it might be better to put the GSQ in a trigger action that sets a Mail flag and check for the Mail flag in the event instead

uncut viper
#

'{{ModId}}.EggNodeArrival/t 600 1200/G "ANY \"TRUE\" \"FALSE\""':
does doing this at least let it load?

#

i also agree with what ender says though lol

haughty charm
#

eek. Trigger actions scare me a bit, ngl

#

But, let me try what you suggested, Button.

uncut viper
#

theyre ezpz! nothin to be scared of c:

haughty charm
#

So I don't think it would load.

rancid temple
#

Yeah the key can't use single quotes

uncut viper
#

keys can use single quotes

rancid temple
#

Well maybe the schema can be ignored then

uncut viper
#

i have used both single quotes and no quotes at all before

rancid temple
#

Because it cries with single quotes

uncut viper
#

its not standard json, is why

#

but it is valid newtonsoft json

rancid temple
#

Guess it's not validated with the CP schema then

haughty charm
#

Let me try it with the single quotes.

rancid temple
#

Validates but same error

uncut viper
#
{
  "Action": "EditData",
  "Target": "Data/TriggerActions",
  "Entries": {
    "{{ModId}}.EggNodeArrivalPrecondition": {
      "Id": "{{ModId}}.EggNodeArrivalPrecondition",
      "Trigger": "DayEnding",
      "Condition": 'ANY "BUILDINGS_CONSTRUCTED All \"Big Coop\"" "BUILDINGS_CONSTRUCTED All \"Deluxe Coop\""',
      "Action": "AddMail Current eggnodeMailFlag received"
    }
  }
}

this should work for a trigger action though i think if you just wanna go that route

#

if the ANY doesnt work bc of weird nested quotes you can always do two different trigger actions too

haughty charm
#

I think that might be best, since this route is giving me the twirlies.

uncut viper
#

each one with a different GSQ

haughty charm
#

So if I go the TriggerAction route, then I would need to add a MailFlag received into the event precondition, correct?

uncut viper
#

(in which case the condition would be "Condition": 'BUILDINGS_CONSTRUCTED All "Big Coop"' and similar for deluxe)

#

yep!

haughty charm
#

Oh, hey wait a min! The single quotes worked! My event triggered!

uncut viper
#

oh

haughty charm
#

The dialogue didn't work the way it was supposed to, though.

uncut viper
#

that would be a separate issue, i think

rancid temple
#

Which ones worked? Be good to know lol

haughty charm
#

So, the "true" "false" worked

uncut viper
rancid temple
#

I think the issue is the way it's parsing the ANY

uncut viper
#

with the quotes around the ANY? hmm

rancid temple
#

Because the true/false each one doesn't have any additional arguments to check

uncut viper
#

if the ANY itself needs to be quoted then im not sure how to get the triple nested quotes necessary for the building name

haughty charm
#

I'm totally fine going with a trigger action

#

it seems cleaner somehow

uncut viper
#

if you wanted to confirm that roku you could try replacin it with like, DAY_OF_MONTH or somethin simple

#

i would but i do not have a test content pack ready

rancid temple
#

Well I did try wrapping my any in quotes and it didn't change the error I was getting, but I never simplified to true or false

#

As long as I didn't make the json invalid, the issue kept being that it was treating every space as a break between GSQ's rather than honoring the quotes to check the GSQ and its arguments

uncut viper
#

i think the problem is the precondition code just grabs every argument after the "G" and concatenates it into a string

#

but strips the quotes in the process

#

so it might just not work with any gsq that requires arguments

haughty charm
#

Which would be good to know (and to note on the wiki).

uncut viper
#

im not 100% on that though bc i dont know for sure if the code im looking at is the one responsible for stripping the quotes or if its some other issue with it somewhere else

#

i dont know when/where/how arguments first get loaded and shoved into an args array

rancid temple
#

Okay, so it'll accept GSQ's that have arguments, but if you need to wrap anything in quotes it scrubs them out which causes issues

#

So I can check if I have a Coop built but not a Big Coop

#

Wrapping Big Coop in quotes causes it to think I'm checking if I have Coop number of Big's built

#

Tried checking for BigCoop and Big_Coop but neither of those are valid for the building name

#

The curse of spaces in internal names

#

Though it definitely seems like there's a lot more wrong with just the way preconditions are handling this in general

velvet narwhal
#

SDVpufferclueless i didn't even know G was an available event condition

rancid temple
#

It's still on the migration page

velvet narwhal
#

that's fair

rancid temple
#

It's an alias for GameStateQuery

#

Which is the easier way to find it on that page lol

velvet narwhal
#

would the singular ' work in forcing it to ignore the quotes with the any? probably not since it's just concat the whole string, right?
i just read up

rancid temple
#

Need a way to escape spaces lmao

velvet narwhal
#

SDVpufferclueless this is what i get for sleeping between 1pm to 9pm

#

oh this falls into that weird thing where if you have no conditions in a string event ID it'll never fire, huh SDVpufferthinkblob

rancid temple
#

I wonder if this is just not working then

uncut viper
#

that would work as far as i can tell bc it just turns it into SEASON Spring as a query

rancid temple
#

Yeah I'm actually not sure why that would even be necessary there

velvet narwhal
#

maybe it's not 'quote aware' but 'quote ignorant' ? lmao

uncut viper
#

the problem is that when it tries to turn what comes after the G into a query, it splits the rest of that precondition bit by spaces and quote aware, and the end result is everything in that resulting array of strings has their quotes removed. they keep the spaces, but dont keep the quotes

rancid temple
#

Well I'm using this to check for the Coop and it works

uncut viper
#

yeah. so its only fucked if you need to quote something within a query itself

rancid temple
#

So it's weird to add quote awareness to a part that doesn't need it lol

haughty charm
#

which doesn't make sense, since we're told to use quotes for buildings with spaces

uncut viper
#

thats the kicker, eh

velvet narwhal
#

it's the same for the addtemporaryactor of like, a Blue Chicken, or something, you have to escape quote \"Blue Chicken\" to get it

rancid temple
#

Right but that actually works lmao

haughty charm
#

Yeah, but escaping quotes in a query in an event precondition doesn't seem to work, lol

uncut viper
#

it might be that /G was just used as an example bc it was something being added in 1.6 too but the quote awareness is really only useful for other preconditions, maybe

#

bc unless im missin somethin i also dont see why you'd need to wrap SEASON Spring in quotes

velvet narwhal
#

squints at addtemporaryactor code

uncut viper
#

might be worth asking Pathos about?

rancid temple
#

Yeah I'm not familiar enough with preconditions to know if any of them would benefit from quote awareness

uncut viper
#

same ive never done event stuff

rancid temple
#

This test is the first time I've ever written any event script lmao

velvet narwhal
#

SDVpufferthinkblob i don't... need quote awareness in the basics

haughty charm
#

Ok, I might be mush-brained, but if my TriggerAction is adding: EggNodeMailFlag received

Then my event precondition would be:
n EggNodeMailFlag
??

uncut viper
#

i believe so

rancid temple
#

Seems right

haughty charm
#

Ok. Just making sure. Thank you!

uncut viper
#

love the three different degrees of certainty we displayed there

rancid temple
#

Lmao

haughty charm
#

lmao

velvet narwhal
#

like the most craziest i have is LEFeelings/e LERealization/l {{ModId}}_10HeartJACK/A {{ModId}}_10HeartPause/f Lance 2500/ if i actually needed something via a GSQ i just naturally turn it into a mailflag because.. idk, i guess i'm crazy

haughty charm
#

Maybe not?

rancid temple
#

Well, you weren't aware of G before :P

haughty charm
#

I mean, trying to use a GSQ in an event precondition is a little crazy (as I've found out)

velvet narwhal
#

i guess if you didn't want to touch trigger actions, but it's so embeded into anything i do that it just comes second nature SDVdemetriums

uncut viper
#

(at least its only a lil bit!)

rancid temple
#

I love trigger actions

haughty charm
#

This would be my first, so it's all new to me.

#

The last mod I worked on with events was pre 1.6 and all of this

rancid temple
#

I opted to make a couple of my debug commands into trigger actions instead lol

velvet narwhal
#

looks disapprovingly at my 3 jsons of trigger actions from two different frameworks and vanilla SDVdemetriums

haughty charm
#

They do seem much easier to implement than GSQs

uncut viper
#

was anyone else gonna be brave and actually ping pathos to ask about the precondition stuff by the way

velvet narwhal
#

oh p event condition sounds fun, y'know, i might go a little buckwild with my event conditions-

#

i was trying to find the code for GSQ

#

and then i'll ping

haughty charm
#

I would ping him, but I wouldn't know how to explain it

uncut viper
#

seems like somethin thatd be nice to have in 1.6.9, if it even can be made to work with that stuff

severe wren
#

Do you guys know a simple custom npc I can reflect on so I can learn to make an npc

uncut viper
#

i also have not yet bc i was tryin to make sure i fully understood the issue first and am only like 90% there

rancid temple
#

Oh man, I already made a bunch of work for Pathos the other day when chu/e and I discovered the save serializer changes had borked a bunch of stuff lmao

velvet narwhal
haughty charm
#

Except to say, hey, this doesn't work

velvet narwhal
#

!npc

ocean sailBOT
#
Creating a Custom NPC

Keep in mind that making NPCs is a complex process that requires learning many different aspects of Stardew modding.
Here are a few links that can help get you started on all that you need to know:

velvet narwhal
#

is the command in Event.cs?

rancid temple
#

I'm not sure where event script parsing is

velvet narwhal
#

i had it at some point

#

it was like, case: A etc etc

uncut viper
#

this particular issue starts in Event.CheckPrecondition i believe

rancid temple
#

I remember looking for it but I don't know if I ever found it

uncut viper
#

where the precondition is split into an array of strings

rancid temple
#

Thought it would be easier to learn events from the C# side rather than events I'd never make lol

velvet narwhal
#

ah yeah it's in StardewValley.Preconditions

#

cracks knuckles

uncut viper
#

im just trying to make sure im not totally missing something where the quote awareness for a /G precondition is actually helpful bc i feel like i must be missing something lmao

velvet narwhal
#

...item_context?

#

but then it won't work, right?

#

awareness is the idea that the code actually sees the quotes, right? which is like, not exactly what we want

rancid temple
#

Just register your own C# preconditions

velvet narwhal
#
[OtherNames(new string[] { "G" })]
public static bool GameStateQuery(GameLocation location, string eventId, string[] args)
{
    if (!ArgUtility.TryGetRemainder(args, 1, out var query, out var _, ' ', "string query"))
    {
        return Event.LogPreconditionError(location, eventId, args, "must specify a game state query");
    }
    return StardewValley.GameStateQuery.CheckConditions(query, location);
}```
uncut viper
#

the quote awareness means that if you write G "BUILDINGS_CONSTRUCTED All Coop" that it will get sent to the precondition parser with two strings in the array:

  1. G
    B) BUILDINGS_CONSTRUCTED All Coop

if you didnt put quotes or it wasnt aware of them then you'd have more strings in the array for every word separated by a space (so it would also be "BUILDINGS_CONSTRUCTED and Coop"

#

which is all fine and good but when the G precondition actually parses the query itself, it takes every remaining argument after it and puts it all into one query string

#

so BUILDINGS_CONSTRUCTED All Coop is equivalent to several strings of BUILDINGS_CONSTRUCTED, All, and Coop anyway

haughty charm
#

@ivory plume, hiya! I ran into a wee bit of trouble trying to use
\G ANY \"BUILDINGS_CONSTRUCTED Here BigCoop\" \"BUILDINGS_CONSTRUCTED Here DeluxeCoop\"
in an event precondition.

(if you want to backread, the conversation starts here-ish #making-mods-general message).

What I wanted was for the event to fire if the player had built at least 1 Big Coop anywhere.

We tried several variations of quotes, quote escaping, and nothing appeared to have worked.

uncut viper
#

the quotes are discarded when the precondition is first parsed, theyre just used to make sure you split at the right place

velvet narwhal
#

ah we force the junimo to do it SMCKekLmaoDog that works

uncut viper
#

but theyre needed for queries with things you need to add quotes around

velvet narwhal
#

SDVpufferthinkblob buildings_constructed sure is wordy

rancid temple
#

Aren't there worse GSQ's? lol

velvet narwhal
#

yeah, any of the item ones because even i still can't grasp it without staring at BETAS/item docs SMCKekLmaoDog

rancid temple
#

PLAYER_BASE_FORAGING_LEVEL

#

PLAYER_SPECIAL_ORDER_RULE_ACTIVE lmao

uncut viper
#

those dont seem long to me

velvet narwhal
#

WORLD_STATE_FIELD is fun because it's parsing things

#

oh yeah, my context is me staring at the code

#

the only one that actually consistently trips me up is PLAYER_HAS_MAIL because HasFlag

haughty charm
#

Well the first is a GSQ and the second is a CPatcher When condition, right?

#

So at that point it's about choosing which one to use based on purpose

velvet narwhal
#

my constant screwup is: PLAYER_HAS_FLAG SDVkrobusgiggle

haughty charm
#

I have all the flags; I don't know what you're talking about.

velvet narwhal
#

oh that's what i was going to do

#

i was trying to create a local variable of Vector2 so i could use the add(new crow) bit for my buildings

dusty scarab
#

does anyone know the size of a portrait in pixels, off the top of their heads?

haughty charm
#

64x64

uncut viper
#

64x64 iirc

dusty scarab
#

thank you

haughty charm
#

The event didn't fire. SDVpufferflat

velvet narwhal
#

new save?

uncut viper
#

yeah id double check with a new save to make sure its not the issue of the trigger action already being applied or the event already being seen from when you did the true/false thing

haughty charm
#

oh, that's a good point.

#

Well, I can still debug the event to see if it works properly.

#

It does, so at least there's that.

#

Thank you all for the help, btw. I hadn't said that yet.

velvet narwhal
#

stares blank faced at my map properties to see what other fun things i could do

uncut viper
#

always happy to help SDVpufferheart and always happy to know its not me being dumb when my help fails and is instead just the game—

haughty charm
#

With the exception of the event firing, everything seems to be working accordingly. The item is given, I can put it in a coop incubator, so next step is seeing if the creatures behave the way they're supposed to.

velvet narwhal
#

i can't tell if it's my internet, but nexus takes like, 3 business days to load

dusty scarab
velvet narwhal
#

considering the whole house is asleep save for my husband and i, it shouldn't be my internet cause my youtube is fine

#

SDVpufferclueless welp guess that means no checking on any bug reports for me goes back to my c# blank stares

dusty scarab
#

also, ugh, 64x64 is huge compared to what I'm used to working with XD

velvet narwhal
#

maybe i'll actually be able to get something to stick by reading button's dynamic patcher SDVpufferclueless

rancid temple
#

Hehehe, it's crows

hallow prism
#

Im on phone so i may have missed context

uncut viper
#

thats probably a typo bc our other experiments had it with the G proper

haughty charm
#

Yes, sorry!

velvet narwhal
hearty tide
#

Btw is chicken feed mod working on custom coops?

hallow prism
#

Ok!

#

What if you try with any ?

uncut viper
#

thats what the original issue was

hallow prism
#

If you didnt already

#

Ok

rancid temple
#

Yeah I have no idea what I'm doing for the art still, I just needed a placeholder that wasn't absolute dumpster fire bad

dusty scarab
uncut viper
#

we tried basically every combo of ANY and quotes and escape characters

hallow prism
#

Dirty test that in a trigger action and set a flag to use in event? See where the issue is?

uncut viper
#

using a trigger action for a flag instead was the eventual solution

hallow prism
#

Ok so its quote parsing in event the issue then

uncut viper
#

unfortunately so SDVpufferpensive

hallow prism
#

Not like the gsq itself or another thing

haughty charm
#

I fixed the typo to show the right query we were trying to use.

uncut viper
#

its definitely the precondition parsing that causes the issue

hallow prism
#

Ok!

uncut viper
#

just only with queries that you need to do quotes with like when writing "Big Coop"

haughty charm
#

Thank you for looking, though, Lumi! SDVpufferheart

hallow prism
#

I used several gsq as event precondition but i dont believe i used any with quote

#

Sure

dusty scarab
#

...you know, I wonder if instead of making a farm building and having to make an NPC to sell from said farm building, could I turn Fizz into an NPC that only sells this stuff once Perfection is achieved? or is he hardcoded to only sell Perfection waivers, and nothing else can be added to his 'store'?

hallow prism
#

It is frustrating when you hit a wall

haughty charm
#

Indeed, it is. Especially when the wall doesn't behave like a wall and instead acts like a wormhole.

uncut viper
#

i dont think Fizz is an actual NPC in Data/Characters but its not like thats stopped anyone from revamping a fake NPC before. just a lot more work

haughty charm
#

Fizz is hardcoded, iirc

hallow prism
#

You can easily patch a little stall or something

dusty scarab
#

darn. yeah, sounds like a little stall would be easier than trying to revamp a whole NPC to be more 'real'

uncut viper
#

doesnt Lance have an actual disposition at least though? or has it been too long since ive actually played sve

velvet narwhal
#

no my marlon mod

uncut viper
#

oh

#

i also thought he had a disposition

velvet narwhal
#

he does but he doesn't actually have a schedule, nor does he move

uncut viper
#

Fizz on the other hand has literally nothin

#

besides his hardcoded existence

velvet narwhal
#

hardcoded like gil SDVpufferfush

haughty charm
#

At least Gil has a chair to sit on.

uncut viper
#

Gil has a disposition!

haughty charm
#

Fizz just stands at the back of that cave.

hallow prism
uncut viper
#

beggars cant be choosers n all that

dusty scarab
#

anything to free me from this wheel of 64x64 character portraits XD

velvet narwhal
#

SDVpufferangy i need to make a debugging folder for just my c# now

#

oh, i'm not stupid, i finally got annotations to work

#
[HarmonyPatch(typeof(Farm), "addCrows")]```
now i'm ready for roku's unique id ![SMCKekLmaoDog](https://cdn.discordapp.com/emojis/965981699982901348.webp?size=128 "SMCKekLmaoDog")
rancid temple
#

I question the user who installs two mods to deal with crows lmao

velvet narwhal
uncut viper
#

the people with 1000+ mods probably just install everything that is compatible

velvet narwhal
#

yeah, if i can actively avoid incompat, i will

#

i'm especially avoiding incompat because i'm doing the skip crime

proud wyvern
velvet narwhal
proud wyvern
#

kinda funny there's no docs on it

velvet narwhal
proud wyvern
#

oh there is

#

yeah it's that

woeful lintel
#

haha patch priority

#

never got it to work at all

proud wyvern
#

[HarmonyPriority(Priority.First)] or something

#

oh wait, after

#

then Last

#

or Lower or whatever

#

just anything that goes after Normal

blissful panther
#

Oh, how much tidier things would be if I just used Harmony annotations for patching... SDVpufferwaaah

proud wyvern
#

i still prefer manual

woeful lintel
#

you can define a priority in the HarmonyMethod constructor

proud wyvern
#

yep

woeful lintel
#

but it didn't work for me

proud wyvern
#

it definitely works

velvet narwhal
#

this is kind of my "i'mma throw any harmony crimes i can commit" into, project, so annotations were higher up on the list of things to learn

#

SDVpufferthinkblob i don't have a ... harmony method constructor ... i think?

proud wyvern
#

don't worry about it, use the HarmonyPriority attrib

#

HarmonyMethod ctor is for manual patching

velvet narwhal
#

oh that's my fallback

#
Harmony.Patch(
    original: AccessTools.Method(typeof(Utility), nameof(Utility.pickPersonalFarmEvent)),
    postfix: new HarmonyMethod(typeof(Postfixes), nameof(Postfixes.Postfix)));

Harmony.Patch(
    original: AccessTools.Method(typeof(Farm), nameof(Farm.addCrows)),
    prefix: new HarmonyMethod(typeof(Prefixes), nameof(Prefixes.Prefix)));
*/
Harmony.PatchAll();```
woeful lintel
blissful panther
#

Oh, Harmony.PatchAll can only do assembly-wide. Yeah, that wouldn't work for me!

proud wyvern
#

why not?

#

also you can tell it the assembly to look at

blissful panther
#

Not for MEEP at least. A bunch of features whose patches only get enabled depending on whichever is used.

#

So if I did it annotation-wise, they'd all get their patches patched.

uncut viper
#

you can set patch categories, too

proud wyvern
#

imo you should always patch everything anyway

#

it saves you from the game/SMAPI updating in the future, and you thinking MEEP works just fine, only to realize one of these conditional patches didn't, but no other mod you had used it, so it wasn't patching

blissful panther
#

Good thought...

proud wyvern
#

also helps with any cross-mod compat, if people patch the same methods MEEP does

#

(except MEEP does it conditionally)

blissful panther
#

Just going to force everything to be enabled when running in debug. Problem... partially solved.

proud wyvern
#

yeah, that doesn't solve the latter problem

blissful panther
#

I just... feel icky patching methods I don't need to patch.

velvet narwhal
#

i cannot say the same, mine are conditional based on if there's a field in the customfield and also that my specific keywords are there

#

but i'mma still make harmony acknowledge my patches just incase something blows up

blissful panther
#

I mean I have a two-layer system in essence.

  1. A mod uses a MEEP feature, the feature's patches get run if necessary.
  2. The mod is set to enabled.

I can theoretically run a patch and just not set the mod to enabled, which would just skip everything inside of the patch.

velvet narwhal
#

SDVpufferthinkblob yeah, i did the baby-easy route of setting everything to if statements

#

if exists -> and string is there -> and has the correct 'bool', fire

blissful panther
#

I went the route of demanding a little bit more from people using MEEP! Want to use the closeup interactions?

"DH.MEEP.CloseupInteractions": "" in your manifest, or you're getting nothin'.

#

Downside of this route is I don't think MEEP will ever show up on the mod stats even with enough packs.

velvet narwhal
#

...do i spawn crows from giant crops SDVpufferthinkblob

#

i make a dedicated "crow only" mod for spooky month

blissful panther
dusty scarab
velvet narwhal
#

nah it's gonna be this:

#

why is that so blinky

dusty scarab
#

lol, that works, too

velvet narwhal
#

i forgot to update my build package copy paste SDVpufferclueless

oak dragon
#

Hiii a question plz,What should I do if I want to draw something when the mouse is over an area?

astral prism
#

@ivory plume hey sorry for the ping, was there a reason that the UI coordinate display was removed from debug mode? i found it really useful and was just wondering if it is able to be reenabled by some config or something

blissful panther
#

I think in the meantime you could quickly render your own preview with the mouse pixel coordinates multiplied by the UI zoom?

astral prism
#

yeah i could do that tbf

#

just need it for this one menu

astral prism
#

if i'm using Game1.getMousePosition(true) to get my hardcoded UI co-ords, is this a valid way of setting the position ? new Vector2(838 * (Game1.viewport.Width / 1920), 472 * (Game1.viewport.Height / 1080));

#

real programming

tiny latch
astral prism
patent lanceBOT
#

yeah, yeah you'd like that, wouldn't you squint (#6296809) (4h | <t:1728757016>)

astral prism
#

mine’s 1440p so it’s possible that the scales are all off

latent mauve
#

My schedules tend to use 610 rather than 600 because 600 did not work.

brittle pasture
#

If it's a new building then you need to set feed item override in the building data

zenith robin
#

Can content patcher make storage containers?

uneven oar
#

Stumbles back in after months. Hello I am alive i just got a job. Gotta scroll through nexus to see what yall have been doing while I wasnt looking

brittle pasture
zenith robin
#

okay

#

I knew CP couldn't do it in 1.5, but with all the new features it got in 1.6 I was unsure.

tiny latch
ivory plume
ivory plume
astral prism
#

was that a different mod then ?? i'm like 99% sure i used to press the keybind and it'd show the debug mode ui and then in the top left a red bit of text telling me what world space / screen space x&y my mouse was at. this was like, 2 or so years ago at this point

ivory plume
#

Oh, that's the game's built-in debug mode. You can try enabling AllowGameDebug in the mod's settings to bring that back.

astral prism
#

OH

#

thank you 🙏

tiny latch
latent mauve
# tiny latch okay, so i changed it from FarmHouse to Farm and shes still not showing up. chan...

In the Data/Characters json, there is a Home entry that determines a character's spawn point each day. Changing schedules requires sleeping a day for the character to follow the new schedule. If your NPC still cannot path there, then it is most likely either blocked from doing so by a NPC Barrier tile or otherwise attempting to use a path that is hardcoded to exclude NPC pathfinding, such as the backwoods.

#

I would try sending them somewhere that is not the Farm to check if they are just unable to path onto the Farm itself

#

Oh, something else I am just noticing now that I am more awake: schedules need TWO destination points in them to work

#

So you need to add somewhere for them to go after the Farm in this case.

astral prism
# astral prism if i'm using `Game1.getMousePosition(true)` to get my hardcoded UI co-ords, is t...

ended up with this in the end, though i don't know if it's right. it's still off a bit with little weird adjustments depending on the window size and shit but i really dk what to do anymore so it's good enough:

Helper = helper;
BoxBounds = new Rectangle(new Point((int)Utility.getTopLeftPositionForCenteringOnScreen((int)(156 * 11.5 * (Game1.viewport.Width / 2560f)), (int)(96 * 3 * (Game1.viewport.Height / 1440f))).X,
    (int)Utility.getTopLeftPositionForCenteringOnScreen((int)(156 * 11.5 * (Game1.viewport.Width / 2560f)), (int)(96 * 11.5 * (Game1.viewport.Height / 1440f))).Y)
    , new Point((int)(156 * 11.5 * (Game1.viewport.Width / 2560f)), (int)(156 * 7 * (Game1.viewport.Height / 1440f))));

initialize(BoxBounds.Left, BoxBounds.Top, BoxBounds.Width, BoxBounds.Height, true); // initialize (mostly for close button)

populateClickableComponentList();

Vector2 start = new Vector2(846f * (Game1.viewport.Width / 2560f), 504f * (Game1.viewport.Height / 1440f));

BatPositions = new List<Vector2>();

for (int y = 0; y < 2; ++y)
{
    for (int x = 0; x < 4; ++x)
    {
        BatPositions.Add(new Vector2(
          x: start.X + (x * 225 * (Game1.viewport.Width / 2560f)),
          y: start.Y + (y * 225 * (Game1.viewport.Height / 1440f))));
        if (BatPositions.Count > 7)
            break;
    }
    if (BatPositions.Count > 7)
        break;
}


for (int i = 0; i < ((amountOfStardrops > 7) ? 7 : amountOfStardrops); i++)
{
    var tas = new TemporaryAnimatedSprite("", new Rectangle(0, 0, 16, 16), 0f, 0, 9999999, 
        new Vector2((int)Math.Round(BatPositions[i].X), (int)Math.Round(BatPositions[i].Y)), 
        flicker: false, flipped: false, 1f, 0f, Color.White, (11.5f) * (Game1.viewport.Width / 2560f), 0f, 0f, 0f, true) // 1.179487179f is the magic number here and i cba to explain it so stfu
    {
        texture = Helper.ModContent.Load<Texture2D>("assets/bats.png") // if ever need different stamp textures, make list of different paths then access by [i]
    };
    TemporaryAnimatedSprites.Add(tas);
}```
hearty tide
astral prism
#

like it's nearly bang on here but if i shrink the window it all goes skewiff

lucid iron
#

Is it borked only when you resize with menu open?

astral prism
#

no just anytime

#

i have this to fix that:

public override void gameWindowSizeChanged(Rectangle oldBounds, Rectangle newBounds)
{
    BoxBounds = new Rectangle(new Point((int)Utility.getTopLeftPositionForCenteringOnScreen((int)(156 * 11.5 * (Game1.viewport.Width / 2560f)), (int)(96 * 3 * (Game1.viewport.Height / 1440f))).X,
        (int)Utility.getTopLeftPositionForCenteringOnScreen((int)(156 * 11.5 * (Game1.viewport.Width / 2560f)), (int)(96 * 11.5 * (Game1.viewport.Height / 1440f))).Y)
        , new Point((int)(156 * 11.5 * (Game1.viewport.Width / 2560f)), (int)(156 * 7 * (Game1.viewport.Height / 1440f))));
    upperRightCloseButton.bounds.X = xPositionOnScreen + width - 20;
    upperRightCloseButton.bounds.Y = yPositionOnScreen - 24;
    Game1.activeClickableMenu = new TrackerMenu(AmountOfStardrops, Helper);
}```
lucid iron
#

must be some float/int math problem then

#

but as long as it looks good on 1280 1920 its fine kyuuchan_run

tiny latch
#

fixed it. thank you so much. SDVpufferwaaah

astral prism
latent mauve
#

I need someone to talk me out of making rotatable versions of the crane game trees you can get as prizes

#

I don't draw trees but I want it

uneven oar
#

Counterpoint i also want it

#

I believe in you

lucid iron
blissful panther
astral prism
#

thanks though, i'll keep it in mind for future

lucid iron
#

the shared library version is usable rn if u just submodule it

heady crest
#

isnt this what i need to make her spawn? whys she not appearing where i put her

lucid iron
blissful panther
#

...I did not know that existed*.

lucid iron
#

its nice DokkanStare

latent mauve
#

They won't spawn unless they are fully realized with the art and at least one piece of schedule data.

heady crest
#

right

#

thats that then

#

thanks lol

blissful panther
lucid iron
#

well u should probably credit focustense instead kyuuchan_run

latent mauve
#

I have placeholder files for portraits and sprites that I use just to make sure the code stops yelling at me LOL

lucid iron
#

the api version that works through a custom markup lang is prob what you want to use instead in the future

blissful panther
#

Oh, I'll absolutely credit both. SDVkrobusgiggle

heady crest
#

was gonna leave that for last but apparently i cant

lucid iron
#

shared library is why that mod's dll is 372.2kb

latent mauve
#

Well, just adding a spring schedule is enough for a start to get the NPC to spawn

#

Spring is the fallback schedule

heady crest
#

is there any template for that lol

latent mauve
#

I think the wiki gives you Abigail's block in the Scheduling mod page?

lucid iron
#

!npc

ocean sailBOT
#
Creating a Custom NPC

Keep in mind that making NPCs is a complex process that requires learning many different aspects of Stardew modding.
Here are a few links that can help get you started on all that you need to know:

lucid iron
#

3rd bullet point has a template

heady crest
#

im there rn

#

third what

lucid iron
#
  • bullet point
#

the third one in the bot response

#

oh maybe u r on phone so bot formatted weird? line that says

Aviroen has put together a template that will allow you to easily create a romanceable NPC.
heady crest
#

i think the big numbers are the ingame hours, but what are the little ones?

latent mauve
#

Tile Coordinates and facing direction IIRC

heady crest
#

facing direction

#

from 0 to 3?

latent mauve
#

Yeah, it's detailed better on the wiki

#

Which is why I was trying to point you there

heady crest
#

ye im here

latent mauve
#

"(optional) The direction to face after reaching the destination. The possible values are 0 (up), 1 (right), 2 (down), and 3 (left). Defaults to down."

#

That bit is the 3rd small number

heady crest
#

yknow this doenst seem that bad actually

velvet narwhal
#

Who rang SDVpufferclueless

brittle pasture
latent mauve
#

Schedules are easy, events are where the terror comes in

velvet narwhal
#

ehhhhhh

#

the pain of events is debugging it because you want the timing of something to be perfect

latent mauve
#

Depending on if you want to get fancy with it

velvet narwhal
#

personal pain: writing

latent mauve
#

(still stalling on my temporary horse Actor event)

velvet narwhal
#

i assume because you want a character to sit on said horse

latent mauve
#

No, but I need the horse to animate xD

velvet narwhal
#

oh, that's easy SDVkrobusgiggle

#

goes to get the thing

lucid iron
#

horse event!

latent mauve
#

Basic event is Malon taking care of Epona, so I am gonna add a brushing sprite animation to her too, probably

velvet narwhal
#

addTemporaryActor \"Horse\" 32 16 <x> <y> <facing direction> false Animal horseactor

addTemporaryActor \"Duck\" 16 16 95 17 2 false Animal duck1
animate duck1 false true 100 24 25 26 27 28 29 28 26 25 24

#

16x32 it looks like

#

then it's just a matter of fiddling

wet edge
#

I'd like to change the kind of fish I can catch on the farm map to only ocean fish, is there a reference sheet of flags I can look at?

velvet narwhal
#

data/locations has the multiple farm information, there's Farm_Standard, Farm_Beach etc etc
you'll need to understand https://github.com/Pathoschild/StardewMods/blob/develop/ContentPatcher/docs/author-guide/action-editdata.md#target-fields target fields, to be able to get to the "Fish" portion of the fields

GitHub

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

wet edge
#

thanks

patent lanceBOT
royal nimbus
#

hey how do i edit values for hats? i need to make it to where some do/dont remove hair. if someone mentioned it already, im sorry, i lost it.

ornate trellis
faint remnant
#

Sorry if it's dumb but can you have an animal able to be in coop or barn with the "House": "Coop" bit something like "House": "Coop or Barn"in JSON CP Assuming it is a coop spritesheet/size

uncut viper
faint remnant
#

Thanks!

calm nebula
#

Try the dumb thing first

#

"House": "CoopBarn"

#

I recall this being a weird string contains

#

But it might be in the other direction

brittle pasture
#

EAC doesn't support it yet
But atra's thing might work, try it first

uncut viper
#

the building you're trying to move them in would have to contain the whole "CoopBarn" string

brittle pasture
#

if not I'll consider adding it some time later (PC still in 10000 pieces on the ground)

uncut viper
#
if (buildingData?.ValidOccupantTypes != null && buildingData.ValidOccupantTypes.Contains(this.buildingTypeILiveIn.Value) && !building.isUnderConstruction())
{
  return building.GetIndoors() is AnimalHouse;
}
#

(this being the animal)

brittle pasture
#

Hmm
one last workaround you can try is modify the coop and the barn's ValidOccupantTypes list to include your CoopBarn "building"

#

might have to do it for the upgrades as well

#

and need compat with modded buildings

royal nimbus
sterile geyser
#

kitpeek
hi!! im so sorry to bother. i wanted to ask for some help- i'm attempting to make a portrait mod but i have absolutely no idea how a content.json file works and i fear i am too lost to understand the guides. i've tried looking at other portrait mods files but it's either Not There or there's so much text i don't know what to look at

faint remnant
uncut viper
sterile geyser
#

that would be such a smart idea. i should do that 😭

#

OH yes i have looked at that actually

calm nebula
uncut viper
sterile geyser
#

it got me through the first couple steps! but i think it's because it's seasonal/festival portraits im missing something and i am not sure what

calm nebula
#

Enjoy!

sterile geyser
#

or i'm just! reading incorrectly! could equally be that /LH

uncut viper
#

i should ask, are you trying to change portraits for personal use only or to publish a mod?

sterile geyser
#

personal use, i suppose! i know i can just as easily replace existing pngs with my own, but i figured i'd try challenge myself to make it a functional mod that i could publish for my friends to use too

#

it's not the end of the world to me if i get too confused and give up on it haha

uncut viper
#

okay! then, you'll probably wanna use EditImage to replace your portraits instead of Load like in the content patcher examples, but its very similar

sterile geyser
#

interesting interesting i will have a read (and probably be back with more questions) tysm

uncut viper
#

i believe for beach and seasonal portraits you just name the file like Abigail_Winter.png for example?

#

(or Abigail_Beach.png

#

i mean your files dont need to be named that but it'll match them with the targets, which wont have the file extensions

sterile geyser
#

would i have to do that for every season? like repeat it a bunch?

uncut viper
#

just for ease of remembering

#

i thiiink so? i think doing that for all the seasons works, but admittedly NPC stuff aint my wheelhouse. you can also add things to a characters Appearances list using EditData that will replace their portraits or sprites based on conditions you decide, like season or location or festival, but thats a lil more complex for a very beginners mod. not a lot! but more so

#

admittedly i am half hoping that someone more knowledgable about NPC stuff just jumps in instead of me to give you more helpful guidance—

sterile geyser
#

HMMM interesting interesting. that does sound like exactly what i need admittedly HAHA

#

HAHAHAHBAH

drowsy pewter
#

using appearances has more examples from current mods

sterile geyser
#

ur so real for that

#

i love reading other people's files

#

this is so comforting

uncut viper
#

i would also definitely recommend at least Notepad++ for this

sterile geyser
#

got it!!

uncut viper
#

Seasonal Cute Characters actually uses the new appeparances system in 1.6 so like 6480 says it might be a good mod to look at to figure out how to do it

royal nimbus
#

my mod is some how breaking a part of sve's mod where it has an overworld sprite for dusty the dog. yesterday i edited the dog house for all season variants on the map file and that seems to have been what caused it. however, when i reverted the doghouse back to the vanilla one, the sve sprite is still gone. no idea how this is a thing <o>;;

sterile geyser
#

oh perfect! that is in fact the mod i was basing most of this off so im glad im looking in the right place!

uncut viper
#

there is a Lot of code in it though bc it does stuff for the farmer too and for, yknow, every single character, but you can look at just the Abigail.json file inside its assets/Code folder to see the stuff for just abigail as an example

sterile geyser
#

perfect perfect that's actually so helpful. thank you so much!! even if its not your wheelhouse you've been a huge help

uncut viper
#

SDVpufferheart and ofc pls dont be afraid to come in here with questions if you dont understand something still! the more specific the better ofc

#

just make sure you're also keepin the content patcher docs handy to reference while you look at the other mod example

sterile geyser
#

oh 100%

#

i have so many tabs open rn

uncut viper
#

modding in a nutshell

drowsy plume
#

Curious what I'm doing wrong here. I'm learning C# as I learn to mod so bare with me me please. ♥
I'm attempting to read the event argument NewTime from helper.Events.GameLoop.TimeChanged but trying to read from the event argument is giving me this error. What step am I missing here?

Error (active)    CS1061    'EventArgs' does not contain a definition for 'NewTime' and no accessible extension method 'NewTime' accepting a first argument of type 'EventArgs' could be found (are you missing a using directive or an assembly reference?)
        public override void Entry(IModHelper helper)
        {
            helper.Events.GameLoop.TimeChanged += this.OnTimeChanged;

        }
        int i = 0;
        private void OnTimeChanged(object? sender, EventArgs e)
        {
            if (!Context.IsWorldReady) return;
            i++;
            System.Console.WriteLine("Time has updated.", LogLevel.Debug);
            System.Console.WriteLine(i);
            if (e.NewTime = 1600) return;
        }

here is a link to the docs I'm looking at: https://stardewvalleywiki.com/Modding:Modder_Guide/APIs/Events#GameLoop.TimeChanged
Also if there is a better channel to ask questions, let me know. I don't mean to bog down this one.

uncut viper
lucid iron
#

this is the correct channel for your question

#

and hm your IDE should have noted something like that

drowsy plume
lucid iron
#

oh ig its valid cus EventArgs is base class

drowsy plume
#

My programing experience is mostly out the window from a few years ago when I dove head first into JS and react for a bit, but I'm realearning a lot of fundamentals here.

uncut viper
#

yeah, so wont have the stuff specific to timechangedeventargs in it

drowsy plume
uncut viper
#

uhh. to be honest i dont know. i think i originally just sort of assumed it my first time i used it bc the examples i saw had names like that (like DayStartedEventArgs and GameLaunchedEventArgs on the wiki) and once i started typing my IDE started autocompleting and just showed me all the others, so i just knew it from then on ig

lucid iron
#

this is a C# pattern

#

when u have event like this

event EventHandler<GameLaunchedEventArgs> GameLaunched;

it can take on delegate with signature void Handler(object? sender, GameLaunchedEventArgs)

#

not a smapi construct just how C# is

drowsy plume
calm nebula
#

In c# I rely heavily on VS

#

Not in a way where it programs for me

#

But in a way where. Hmm

#

I can have a thought and it'll help me fill it in

drowsy plume
uncut viper
#

yeah sometimes i just start typin just to see where the autocomplete takes me to see whats available

calm nebula
#

Like I'll be like "I'm thinking of a method of his shape on that class"

#

And it'll help me out

brisk wedge
#

Hi sorry if this is a dumb question I know literally nothing about c#, but can you use harmony to patch an internal function? Specificaly I want to add a postfix to ItemContextTagManager.ResetCache but the compiler says that 'ItemContextTagManager' does not contain a definition for 'ResetCache'

uncut viper
calm nebula
#

(That said, why are you patching that.)

brisk wedge
uncut viper
#

i would 100% do that through the content pipeline instead through AssetRequested

brave fable
#

you may have over-engineered it a little lol

#

the game default res is 1280x720 btw in case you're wondering what the minimum to support is

brisk wedge
brisk wedge
uncut viper
#

the asset requested event happens when the asset is being loaded. you can follow the instructions in that link to edit things in the dictionary of objects and add things to specific objects context tags

#

when the Data/Objects asset is requested the dictionary you get access to is a dictionary of every object in the game, like in your unpacked content folder. You don't load a specific object

calm nebula
#

(Fwiw I'm also not sure there is a sane way to do this.)

#

For some assets, the game expects one to be loaded ahead of the other

#

And in particular here, objects is before crops

uncut viper
#

is that an issue for just adding context tags to seed objects?

lucid iron
#

maybe u can patch Crop instead

calm nebula
#

Past Atra apparently decided on a custom query instead

heady crest
#

can someone explain to me what this means

astral prism
#

yeah but resizing / re-positioning the stuff is like

#

needs to be manual tho

#

right?

tender bloom
#

It’s hard to for me to tell in what way it’s wrong

heady crest
#

dialogue keys? what does tha tmean

tender bloom
#

Spring_1 maybe

#

There’s something wrong with how a dialogue is formatted

#

I’m not convinced spring_1 is a valid key tbh

#

Usually heart levels can only be multiples of 2

rancid temple
#

season_# is used for marriage dialogue

heady crest
rancid temple
#

The number being day of month

heady crest
#

i got these from a template online

calm nebula
ornate trellis
#

I'd guess its because the dialogue is all blanks? thonking I usually put "..." in mine until i write actual dialogue lol

unborn raft
#

How do i check if a tile is empty ground or if theres something placed there

velvet narwhal
#

Blanks shouldn't throw errors, should just be a no translation throw

ornate trellis
#

🤔

brave fable
# astral prism yeah but resizing / re-positioning the stuff is like

how do you mean? your menu's going to look the same, no matter what the screen size is right? you're just going to set your starting position to be whatever centres it on the screen, then reapply component positions with that start position

(i'd link you to any of my mod menus, but surprisingly the only one that uses GetTopLeft is totally outdated and bad and never released, and each other mod does things way differently to the next)

velvet narwhal
#

Is this a straight load? I'm not gonna speculate unless I see a json

#

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

heady crest
#

wat

brave fable
#

you do have to update all the components and whatever other variables you have yourself manually, but it's just a matter of lumping all those changes into the gameWindowSizeChanged method, and calling that once on created for your first setup

ornate trellis
rancid temple
#

And share the link, troubleshooting without seeing the code is really difficult

calm nebula
#

Just ignore errors until it's fully filled in. Or remoce lines you aren't usijf

heady crest
velvet narwhal
#

I have plenty of empty strings SMCKekLmaoDog

heady crest
rancid temple
#

Could do both

heady crest
#

do i send it here or

rancid temple
#

Yep

heady crest
#

could this be causing it? thats the only error in the dialogue

rancid temple
#

Possibly, that would certainly cause some issue

ornate trellis
#

id correct it, check if it fixes it and if not jsut send the new json here

heady crest
#

im testing it

pine elbow
#

Does anyone know how to find the tile actions menu? I wanted to find out how to modify Robin's menu (carpenter) specifically in the cabin updates section. I've tried everything to find out where it is, from StardewValley.Menus.Carpenter (but there are only things about building updates here) and StardewValley.GameLocation, which is where the smapi documentation teaches how to register new actions. However, I can't access the registeredTileActions variable correctly because it's a protected variable. I tried using Reflector, but the dictionary variable still comes up empty for me. Can anyone help me find out how to change this part of the updates?

#

Or if anyone knows of a mod that changes the price of the house upgrade for me to analyze the code, maybe I can figure out what to do.

lucid iron
#

house upgrade is in robin's dialog which is nested in the gamelocations

#

check GameLocation.carpenters

#

there is number of branches there, helps if you can describe the desired feature

velvet narwhal
#

Imma finally attempt sleep, atra is correct if you're not using i18n tokens and you haven't set your dialogue keys. You can have large swathes of blanks if you're using i18n though

pine elbow
#

What I want to change is the price of the cabin upgrade, and the materials for the upgrade.

lucid iron
#

fear.

pine elbow
#

The problem is that this is done through a menu, right, unlike other buildings

lucid iron
#

you need to patch GameLocation.houseUpgradeAccept()

#

its most likely a transpiler

#

also need to change the strings ScienceHouse_Carpenter_UpgradeHouse1 2 3 ofc, but thats trivial

pine elbow
#

Thank you very much, I will try to modify the function using Harmony to see if it works.

dusty scarab
#

if I made a 32x32 asset for a building, that would be equal to a 2x2 tile square building footprint, right?

lucid iron
#

it can be 1x2 if you want

dusty scarab
#

or could it be a 1x2 (1 tall, 2 wide) tile footprint>

#

aw, awesome :D

lucid iron
#

need not be fully tangible

#

think obelisks

dusty scarab
#

awesome. I was thinking of making a giant vault, like you'd see in the repaired community center, and you stash your g inside to 'buy' the promissory notes/meme items and then I wouldn't need to worry about having a character portrait because it's a self-serve vault (that mandates honesty, somehow, don't think about it too hard)

lucid iron
#

you better let me go in and swim in the gold scrouge mcduck style

unborn raft
#

Where can i see the documentation for the entire game1 class? Not just whats on the wiki

rancid temple
#

There's not really anything that robust, you can look at the decompile

calm nebula
#

I recall someone saying that return to title was raised for farmhands

dusty scarab
calm nebula
#

Can someone confirm?

brave fable
#

the game doesn't have documentation, even a comment is rare lol

unborn raft
rancid temple
#

!decompile

ocean sailBOT
slate totem
#

Hello everyone! It's me again with another question coonDERP

#

I've been trying to load marriage dialogue (ik that sounds weird) for Leo but I keep getting hit with this

#

Happy to post code or upload zip if needed
Edit: I should also note I am only testing this with Stardew Valley Expanded and Grandpa's farm because that's what my save file is. I have removed all other mods

brave fable
#

i don't have the code on me atm but I do remember it just rebuilds the entire menu whenever you resize the window and I remember thinking that's some real peak dumb

#

basically nothing else does that, so don't you do it too

heady crest
#

do i gotta add the 2 for this to work? ive tried everything but the water overlay doesnt show up ingame

lucid iron
#

is the location outdoors

#

the 2 is footnote, not to be added

#

you can use lookup anything in game to check if your tile property correctly applied PecoWant

#

need tile lookup on

patent lanceBOT
#

@next plaza: look into spacecore animations not working in other languages and the 0-schedule fix breaking marriage schedules (6d ago)

teal bridge
next plaza
#

Remind me in 24 hours to look into spacecore animations not working in other languages and the 0-schedule fix breaking marriage schedules

patent lanceBOT
#

😏 (#6297566) (24h | <t:1728863143>)

next plaza
teal bridge
#

I don't have any personal stake in whatever this 0-schedule thing is, but I think it's time to set the snooze button from 24 hours to "six to eight weeks".

next plaza
#

Well it has to get done before 1.6.9 releases since it's half implemented in the develop branch 😅

#

Alternatively, rip what I have out

lucid iron
#

what stops you from making that vanilla AnnelieStare

next plaza
#

It's too risky of a change for us to do this close to release

#

(I've already asked Pathos)

haughty charm
#

I have an event that's not firing - the precondition is a mailflag added via TriggerAction. I'm not seeing in the patch summary where the mailflag is actually added, though, so does that mean my TriggerAction isn't working?

#

I did confirm that the mod loaded and edits were applied.

brittle pasture
calm nebula
#

(you can move animals later)

brittle pasture
#

right, but in the vanilla game it gets set once to the data field House in the constructor

#

and I'm struggling to think of a use case where you want to change this in mods

lucid iron
#

oh i wanted to ask for letting animals out in winter

pine elbow
#

@lucid iron I followed your tip about the houseUpgrade location, I even managed to make it charge something different for the cabin upgrade, if I have enough for the new value, it charges, but if I have enough for the old value, it charges for the old one... I also found the part that generates the price dialog, I even tried to change it using harmony, but I'm not able to modify the dialog. Even applying the new function using harmony, the old menu continues to appear with the old prices. Não entendo o que to fazendo errado.

lucid iron
#

its fine if u dont want to do it cus ill send PR eventually

brittle pasture
#

lol if you already have a PR then go ahead

lucid iron
lucid iron
pine elbow
#

this function

private void houseUpgradeOffer()
{
switch (Game1.player.houseUpgradeLevel)
{
case 0L:
createQuestionDialogue(Game1.parseText(Game1.content.LoadString("Strings\Locations:ScienceHouse_Carpenter_UpgradeHouse1")), createYesNoResponses(), "upgrade");
break;
case 1L:
createQuestionDialogue(Game1.parseText(Game1.content.LoadString("Strings\Locations:ScienceHouse_Carpenter_UpgradeHouse2", "65,000", "100")), createYesNoResponses(), "upgrade");
break;
case 2L:
createQuestionDialogue(Game1.parseText(Game1.content.LoadString("Strings\Locations:ScienceHouse_Carpenter_UpgradeHouse3")), createYesNoResponses(), "upgrade");
break;
}
}

lucid iron
#

yea just change Strings\Locations

brittle pasture
#

ah okay, in that case I can look into it SDVpufferrad

lucid iron
#

i think its just 1 particular if check to replace

#

but yea this could be something to do per animalhouse DokkanStare

#

dunno if ppl would want it per animal since that seems annoying to manage

brittle pasture
#

though does she want a global check, a per house check or a per animal check

#

the way my mod's set up as a framework means I'll likely do the latter 2, but I can do the first one if needed

lucid iron
#

i got no clue it is not like we spec'd this out blobcatgooglyblep

#

@humble timber sorry for ping but do you have opinion on this "animals can go outside in the winter" proposal?

lucid iron
#

Strings/Locations.json

  "ScienceHouse_Carpenter_UpgradeHouse1": "I can increase the size of your house and add a kitchen. It will cost 10,000g and you'll also need to provide me with 450 pieces of wood. Are you interested?",
  "ScienceHouse_Carpenter_UpgradeHouse2": "I can increase the size of your house and add a nursery. It will cost {0}g and you'll also need to provide me with {1} pieces of hardwood. Are you interested?",
  "ScienceHouse_Carpenter_UpgradeHouse3": "I can add a cellar to your house. The cellar can be used to age certain products, like wine and cheese. It will cost 100,000g. Are you interested?",
#

you can change these with normal content pipeline things

humble timber
#

i mean i think it sounds neat

#

i would prolly use it SDVpuffereyes

lucid iron
#

personally i think per house is best cus, if it was per animal then u would have to open door for particular animal in the winter and let everyone else in the house freeze blobcatgooglyblep

#

vanilla's only got 6 animal house cant be that bad to assign the custom field or whatever for all of em

humble timber
#

per "house" sounds like the play here

#

but idk much about this sorta thang

brittle pasture
#

CustomField sounds good, though that does mean you have to handle compatibility with modded buildings

#

that's why I was wondering about a global toggle

#

then again it's probably not so bad, since I too have to wrassle with modded coops/coop-like buildings in my own mod

pine elbow
#

@lucid iron I managed to edit the dialogue, now my only problem is really the double charge, charging both the old and new price simultaneously.

lucid iron
#

could you send your patch code

#

put it in a gist maybe

pine elbow
ivory plume
# haughty charm <@226803198218731520>, hiya! I ran into a wee bit of trouble trying to use `\G ...

I took a look at your repro content pack; the problem is due to a combination of three issues.

  1. You have an extra " at the beginning (the ' is supposed to be the starting quote).
  2. Escaping quotes in JSON strings is tricky. For example, '"\"example\""' sends '""example""' to the game, since JSON consumes the \. You need to escape the escape, so that JSON doesn't consume it (e.g. '"\\"example\\""' will properly send '\"example\""' to the game).
// current
"'{{ModId}}.EggNodeArrival/t 600 1200/G ANY "BUILDINGS_CONSTRUCTED Here \"Big Coop\"" "BUILDINGS_CONSTRUCTED Here \"Deluxe Coop\""'

// fixed
'{{ModId}}.EggNodeArrival/t 600 1200/G ANY "BUILDINGS_CONSTRUCTED Here \\"Big Coop\\"" "BUILDINGS_CONSTRUCTED Here \\"Deluxe Coop\\""'
  1. The G precondition parsing isn't properly quote-aware, which is fixed in the next 1.6.9 beta patch. Thanks for reporting it!
haughty charm
#

Escaping the escape. lol. Thank you so much, Pathos!

velvet narwhal
#

(*a double escape eyeshake *)

ivory plume
#

(It gets even more fun if you need to triple-nest quotes, like '"\\"\\\\"example\\\\"\\""'.)

haughty charm
#

No thanks. I'll leave the fun to everyone else. 😆

lucid iron
#

it is a pretty small and targeted case though, so not the worst thing to do LilyDerp

pine elbow
lucid iron
#

god why do i get this wrong every time

#

i think it's cus false = not run original in my brain

velvet narwhal
#

cause you don't commit crimes, you're a good child

lucid iron
#

i blame api design for this

uncut viper
#

false = not run original = skip the original

lucid iron
#

then i dunno

#

it's probably the same brain damage that makes me get left and right wrong all the time irl

brave fable
#

it's ok i pick the wrong return value on every vanilla class that deletes itself in bool update()

uncut viper
#

it just means you dont do bool prefixes often which is a good thing

lucid iron
#

yea i just commit transpiler crimes instead

#

well, i am currently doing oop crimes i think

velvet narwhal
#

for stardewui? or your own thing

lucid iron
#

trinket tinker yea

pine elbow
#

My idea is to turn everything into barter, and not use money in the game, the only thing missing was the house improvement, and now the next thing I'm going to edit is the JojaMart package, as for the house improvement, how many gold bars would be a fair price to charge to improve the house, instead of 10 thousand gold? Is 40 gold bars a reasonable price?

lucid iron
#

it's currently 100% harmony free

#

i think the main feature that's gonna require harmony is letting ppl change icon of trinket in tangent with the variant

velvet narwhal
#

i realize, i have never bothered to look at how much bars cost in gold

lucid iron
#

but u know, u can just make a second trinket LilyDerp

velvet narwhal
calm nebula
#

It's not consistent

#

Question for the crowd

#

Does ReturnToTitle fire for farmhands in splitscreen

#

If yes, how do I know for whom it fired

velvet narwhal
rancid temple
#

I think atra means the SMAPI event, but I'm not even sure how to test that lol

velvet narwhal
#

no idea either, but since the button isn't there i'm like ou

tiny zealot
old edge
#

Has anyone had issues with the greenhouse spawning? I added the map property in tiled.

lucid iron
#

in a new game right

calm nebula
#

please don't ask why I've decompiled smapi despite the fact that I could literally open VS to it

#

it's raised here, in this method

#

well, the sgame instance is still valid here....probably...

old edge
#

My issue SDVpufferlurk greenhouse spawns weird in my custom farm map loaded with content patcher and a tiled map property was used

calm nebula
#

ahhh I don't own a controller so I have no bloody idea

lucid iron
#

how can i test for you atra

calm nebula
# lucid iron how can i test for you atra

can you tell me what this prints>>

private void OnReturnToTitle(object? sender, EventArgs args)
{
  this.Monitor.Log($"Return To Title for Player Index {Game1.game1?.instanceIndex ?? -7}");
}
lucid iron
#

Exit with P2
Return To Title for Player Index 1

old edge
#

SDVpuffersalute rename my tilesheet to untitled got it!

calm nebula
#

thank you

#

it's raised for splitscreen players,

#

(player index is zero based)

lucid iron
#

yea exit to p1 gave index 0 even as i was doing inputs on p2

calm nebula
#

huh, that's fun

#

I would have thought exit to title on p1 killed the game

lucid iron
#

it does yea

#

so it is work correct

#

oh well, it doesnt like, quit smapi process

#

u can exit to title as p1

calm nebula
lucid iron
calm nebula
#

wow

lucid iron
#

it boots p2 i think think

#

exit from p2 = return to non split screen mode

#

exit from p1 = return to menu

calm nebula
#

whooot thank you!

lucid iron
#

there's only 1 button in the exit menu for split screen

calm nebula
#

the real question was because I wanted to forcibly replace Game1.mapDisplayDevice with my own implementation, realized I needed to check if someone was fighting me over it

#

realized I needed to check if SMAPI was fighting me over it (SMAPI would not), realized I would need to check if any player returned to title, then started digging through SMAPI code trying to figure out what it would do

#

and I own zero controllers so I can't get into splitscreen mode myself

#

(maybe with a controller emulator?)

teal bridge
tough crater
#

Question: I swear I've seen it somewhere before but Google isn't helping me out. My NPC is supposed to be compatible with Nature's Bounty, but I only want it to be an optional mod (not everyone is into 4/20). How do I make my NPC gift tastes not bug my character out if someone chooses to NOT use that mod?

velvet narwhal
#

iirc gift tastes don't care about things that aren't there, they just skip them

tough crater
#

OH THANK GOD

velvet narwhal
#

considering i put my very niche mushroom item into a gift taste of a completely separate mod and i've gotten no errors, probably safe

tough crater
#

That's a relief! I've encountered a ton of errors with my code because of me trying to format it differently. I tried to model my code similar to Ridgeside Village, but considering how that mod is VERY COMPLEX and doesn't only include NPCs, I shot myself in the foot 😭

velvet narwhal
#

yeah probably not great

#

we got a command for that!

#

!npc

ocean sailBOT
#
Creating a Custom NPC

Keep in mind that making NPCs is a complex process that requires learning many different aspects of Stardew modding.
Here are a few links that can help get you started on all that you need to know:

lucid iron
#

You probably want to look at singular npc mods instead yea

tough crater
#

Yall are a godsend

velvet narwhal
#

i might inevitably throw in my "How to add in gift tastes via text operations cause you're lazy/editing an npc that already exists"

tough crater
#

What is it with Google searches being absolute garbage with looking up stuff for Stardew modding? Almost everything is "my mod isn't working :/ help me troubleshoot a mod i downloaded" but hardly anything for people doing modding 😭

tough crater
brave fable
#

unfortunately, all the knowledge is in here, and nowhere else save for a little on the nodding wiki

calm nebula
brave fable
#

so you'll never find it on a web search

tough crater
#

But are there conditions that look for if a mod is downloaded (and functioning of course lol)?

velvet narwhal
#

if i weren't afraid of screwing the entire wiki formatting, i would've helped move 1.6 into their respective pages

tough crater
#

Specifically for 1.6

calm nebula
patent lanceBOT
#

...ok. but you owe me. big time. (#6297747) (12h | <t:1728828720>)

calm nebula
#

Whooooo

calm nebula
velvet narwhal
#

also, i keep on losing track of that dependency page

tough crater
#

DEPENDENCY, THAT'S THE WORD

calm nebula
calm nebula
#

You add dependencies to prevent your entire mod from loading

#

You use HasMod to prevent parts of your mod from loading

lucid iron
#

I don't think there is lack of public docs so much as presence of out of date docs that muddles the search

#

Esp for things like modding video tutorials blobcatgooglyblep

velvet narwhal
#

yeah unfortunately the video tutorials get outdated real fast

lucid iron
#

If I had time and no terror about posting stuff on the internet I'd make devlogs ukimasu2

calm nebula
#

You just either heard it from someone

velvet narwhal
#

i 100% heard it from someone here, and it's burned in my memory

calm nebula
#

Or you checked the decompile yourself

lucid iron
#

Yeah I think that's just the expectation when working with closed sourced thing

velvet narwhal
#

i checked the decompile to reaffirm that gift tastes is the bane of my existence because an 'npc' no matter the simplicity, needs one

calm nebula
tiny zealot
#

the wiki is the best source we have, but the wiki is just us, and i almost never edit it because 1. i'm busy off in cloud cuckooland and 2. i am terrified of putting incorrect info on there

calm nebula
#

Long time no see

calm nebula
velvet narwhal
old edge
#

Is it easy to add a custom location warp to a custom farm? I want to add a wreck ship entrance.

calm nebula
#

Nothing gets nerds fired up like "someone is wrong on the internet"

lucid iron
#

Yeah sure