#making-mods-general

1 messages · Page 66 of 1

ornate trellis
#

🤔

uncut viper
#
bool should_dress = IslandSouth.HasIslandAttire(visitor2);
bool had_first_activity = false;
if (should_dress)
{
  Point dressing_room2 = IslandSouth.GetDressingRoomPoint(visitor2);
  schedule.Append("/a1150 IslandSouth " + dressing_room2.X + " " + dressing_room2.Y + " change_beach");
  had_first_activity = true;
}

from IslandSouth.cs

#

so i think you could probably also add that "change_beach" end of schedule behaviour like... whenever you wanted, i guess. idk i dont know much about scheduling

ornate trellis
#

interesting, i swear there used to be an issue that the npc on their way to willys boat already had their beach attire on when walking on the sand or was that an issue of a mod, now i am not sure anymore

calm nebula
#

It was their SUMMER attire

ornate trellis
#

ohhh

velvet narwhal
#

SDVpufferthinkblob yep i can't understand this

ornate trellis
#

ok yeah makes more sense

#

been too long

velvet narwhal
#

oh nevermind i see it

#

1.6.8: line 1861 of FarmHouse.cs

if (this.previousUpgradeLevel == 0 && this.upgradeLevel >= 0)
{
    need_bed_upgrade = true;
}```

1.6.9 line 1831 of FarmHouse.cs
```bool need_bed_upgrade = this.previousUpgradeLevel == 0 && this.upgradeLevel >= 0;
if (this.previousUpgradeLevel >= 0)
{
    if (this.previousUpgradeLevel < 2 && this.upgradeLevel >= 2)
    {
...```
dim yew
#

Hiii friends, has anyone released a framework for allowing overworld NPC animations larger than 16x32? I know the code exists for it in a couple NPC mods already, I think like Lucikiel maybe? But it’s not public I’m pretty sure

ornate trellis
#

spacecore

dim yew
#

Or just a static pose it doesn’t need to be animation

ornate trellis
#

i use it for example so i get an extra long fishing animation

dim yew
#

When did spacecore add that?? It really does have everything lol

ornate trellis
dim yew
#

Oh nice

#

Thank you!

uncut viper
brave fable
#

i went into Dialogue.cs so innocent and pure hoping to find a nice place to parse dialogue flags

#

noone must know the code i've seen SDVdemetriums

velvet narwhal
#

brain is empty on parsing, i continue to dig

uncut viper
#

(that said i am happy to know that apparently that function in Dialogue.cs IS its own function now in 1.6.9 instead of being baked into a different one! nice to be able to call it separately now)

velvet narwhal
#

also fridge is it's own function too

#

this.fridgePosition = this.GetFridgePositionFromMap() ?? Point.Zero;

brave fable
#

oh i was rather hoping that'd be the tileaction property handler for fridge

velvet narwhal
#
{
    Layer layer = base.map.RequireLayer("Buildings");
    for (int y = 0; y < layer.LayerHeight; y++)
    {
        for (int x = 0; x < layer.LayerWidth; x++)
        {
            if (layer.GetTileIndexAt(x, y, "untitled tile sheet") == 173)
            {
                return new Point(x, y);
            }
        }
    }
    return null;
}```
lucid iron
#

what if you just spawn a fridge (big object)

brittle pasture
#

It doesnt exist

velvet narwhal
#

anyway i have no idea where/what is screwing the bed upgrade so i leave it to atra

lucid iron
#

"untitled tile sheet" my behated

calm nebula
#

It's just as sexy as New File (2).txt

brave fable
#

better or worse than o

velvet narwhal
#

1.png

brittle pasture
#

the farmhouse fridge is a lie - a drawing on the wall, nothing more. unlike mini-fridges, the true favored children of Yoba

uncut viper
#

turning my mini fridge into doves

brave fable
#

please no don't send my gluten discs to heaven

uncut viper
#

unrelated but if you were gonna use a framework to make a custom museum what would you expect your museum to be able to do (besides the obvious i.e. placing items on shelves, rearranging items, earning rewards)
tryin to make sure im not missin any obvious functionality after staring at the more boring parts for days

velvet narwhal
#

was there a framework that lets me shift-click so it auto places into the museum?

brittle pasture
#

an associated GSQ?

velvet narwhal
#

if no, please i beg

uncut viper
#

GSQ is on the planner. do you think it'd be better to have one GSQ for each museum or one GSQ for all museums with a museum ID as an argument

#

also ive got no clue about the shift click thing

#

ive never tried to do that

lucid iron
#

Can you make it easier to click OK instead of picking up a placed item

brittle pasture
#

the latter; dynamically registering GSQs seems weird somehow

lucid iron
#

Could do it like item id prefix?

uncut viper
#

spacecore does it

#

item ID prefix for what, the GSQ?

lucid iron
#

Yeah, say if I want to see if ppl donated 5 things from me mod

brittle pasture
#

do you mean item query

lucid iron
#

No it's a gsq bc it evals to bool

brittle pasture
#

wait, hmm, that's different

uncut viper
#

currently it allows you to set valid context tags, categories, or specific item IDs (or a combination of all three)

brittle pasture
#

yeah

lucid iron
#

I forgot if gsq supports generic greater than or less than tho

uncut viper
#

so i might make it just search based on those

#

since thats what you'd use to set whats donatable in the first place

#

and not prefix

#

i guess that wouldnt help if someone else edited your museum

lucid iron
#

The id prefix is more about a way to check only your donates

uncut viper
#

to be clear its not a framework for adding things to the existing museum

lucid iron
#

Tho there's probably better ways to label

uncut viper
#

its for a completely custom museum structure with its own list of donations

lucid iron
#

Oh I see, then u just have some way to pick the museum id

velvet narwhal
#

(side note, i have no idea how to bugtest this for BETAS, but i'm going to assume i'm stupid and i can't place two adddialogues in a single trigger action, on the safe side i'll just yeet one into it's own trigger action)

uncut viper
#

so i would say if you wanted to separate your items from someone else who added things to your museum

#

then they should instead add their own context tag to the valid list of donated items

#

and i can just add a context tag/ID/category argument to the GSQ

lucid iron
#

So besides the gunter kind of museum

#

R u also supporting the prof snail kind

uncut viper
velvet narwhal
lucid iron
#

I don't think it is very necessary, bc u can sorta do it with unlockable bundles

uncut viper
brittle pasture
#

(side note, now I want a GSQ that evaluates an item query and a PerItemCondition and returns true if there's at least one matching item)

#

snail's thing is like bundles right

uncut viper
#

its like bundles but they then appear on the map

lucid iron
#

A job for stardewui trust

#

Yeah I like that aspect of them but u can sorta do it with ub

#

It's got completion flags right

#

That u just stick map patch onto

brittle pasture
#

yeah, map edits with flags

uncut viper
lucid iron
#

Yeah I remembered that using < and > was a content patcher query feature

#

Not a gsq feature

uncut viper
#

relatedly i wonder if it'd be easy to support swapping a placed item with your held item to make extra space for rearranging unnecessary SDVpufferthinkblob

lucid iron
#

I wish it worked like build menu

uncut viper
#

i guess that might lead to being able to "undonate" an item though

lucid iron
#

Where ui gets hidden

uncut viper
#

it does move out of the way when you mouse away from it

#

but you kinda need the UI of your inventory there

brittle pasture
#

sorry, but that's going back into the private collection

velvet narwhal
#

(i went to look, there is no auto-clicking donation mod SDVpuffersob don't worry about it)

dim yew
#

I remember this being an issue pre 1.6 but I’m still catching up to new capabilities, can you teleport an NPC to a location now in a schedule key instead of having to wait for them to walk?

#

Or have them start at a different “home” point on a different day works too

lucid iron
#

Scope creep auctions mod

velvet narwhal
#

0 schedules for starting, mid-schedule i don't think so

dim yew
uncut viper
velvet narwhal
dim yew
velvet narwhal
#

0 schedules? You can set the time to 0 at the beginning of a schedule, which can basically allow you to set a new spawn point. This is useful if you want to start elsewhere: for example, if you want to spend the day on a map NPCs can't path into, such as Secret Woods, or if you want to have a character visit a distant spot (e.g., Ridgeside) and not spend 5-6 hours getting there. One word of caution with 0 schedules - if you have a randomization, make sure it's all or nothing for your 0 schedules. In other words, if your Tuesday has a 50% chance for schedule A and a 50% chance for schedule B, either both A and B should have a 0 schedule, or neither should.
-tia

dim yew
#

Very very cool

latent mauve
#

Because I am questioning if I was misremembering: IS there a mod alpha for 1.6.9 code changes? Or is it just the beta and nobody else can access it yet?

uncut viper
#

anyone can access the 1.6.9 beta

rancid temple
#

Anyone with the game on Steam can access the beta

uncut viper
#

GOG too

rancid temple
#

I thought there wasn't a GoG version of the beta lol

latent mauve
#

alright, I was looking for the beta code to find it and having no luck

uncut viper
#

it was added later

rancid temple
#

I also thought I had this conversation before too

#

Oh ok

latent mauve
#

I did a search in the discord and found nothing LOL

uncut viper
#

focustense asked pathos and evnetually pathos came back and said its on gog now

#

its in the pins here

latent mauve
#

ah-ha, I saw that post but did not register that the first link was a link.

#

Just came in from the heat taking care of my garden, the brain fog is real

lofty ruin
#

I wasn't sure where to ask this, but what software is best to make/go over sprites? Like portraits and such

lucid iron
#

!software

ocean sailBOT
near sierra
#

This chunk of code still isn't executing properly:
{
"LogName": "First Letter Created",
"Action": "EditData",
"Target": "Data/mail",
"Entries": {
"HalfAlive.SpiritFieldsMod_Abigail_Start_Quest": "Dear @,^Have you been noticing anything strange happening at the graveyard lately? For the past few nights, I’ve been hearing some weird noises coming from there. Last night, I got too curious and decided to take a look at what’s going on, and I found a weird, glowing vine growing on Mona’s gravestone, along with some lights orbiting it. I recklessly decided to try and touch it, and all of the sudden, my arm phased into some kind of rift in space! I didn’t try to go all the way in, but honestly, I’m just getting too curious about what’s on the other side of the rift now. Wanna go in some time?^ -Abigail%item quest HalfAlive.SpiritFieldsMod_131 true %%"
}
},
{
"LogName": "First Letter Received",
"Action": "EditData",
"Target": "Data/TriggerActions",
"Entries": {
"HalfAlive.SpiritFieldsMod_DayStarted": {
"Id": "HalfAlive.SpiritFieldsMod",
"Trigger": "DayStarted",
"Condition": "PLAYER_HAS_MET Current Abigail",
"Actions": [
"AddMail Current HalfAlive.SpiritFieldsMod_Abigail_Start_Quest now"
]
}
}
},
{
"LogName": "First Quest Created",
"Action": "EditData",
"Target": "Data/Quests",
"Entries": {
"HalfAlive.SpiritFieldsMod_131": "Basic/Investigate Mona's Grave/Abigail has alerted you to some strange happenings at this "Mona" person's gravestone. What exactly is going on?/Investigate Mona's gravestone at night./-1/-1/0/-1/false'"
}
}

rancid temple
#

!json

ocean sailBOT
#

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

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

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

rancid temple
#

I can't find the pin for the GoG version lol

uncut viper
#

(or another action to mark it unapplied)

lucid iron
uncut viper
#

a Trigger Action, when it runs (whether you noticed a successful result or not), marks down that the trigger action with its id (in this case HalfAlive.SpiritFieldsMod_DayStarted) has already run and can be removed from the list of trigger actions to consider in the future

#

so you can also just change the ID and it'll be essentially a new trigger action. or just make a new save. or debug action MarkActionApplied Current <ID> false

#

(you can also make a trigger action never mark itself as applied with a field on the trigger action itself, but often you dont want it to happen repeatedly)

near sierra
#

Ah.

rancid temple
uncut viper
rancid temple
#

Oh my bad lmao

uncut viper
#

nah it was unclear on my part SDVpufferthumbsup tryin to respond to two people at once and not making it clear what was for who

velvet narwhal
#

honestly i do the hard searching

latent mauve
#

so I've got some angry errors after testing my bathroom renovation mod on 1.6.9

#

[18:16:09 ERROR game] Failed parsing condition 'ITEM_ID (WP)12 (WP)21 (WP)MoreWalls:1 (WP)MoreWalls:2 (WP)MoreWalls:3 (WP)MoreWalls:4 (WP)MoreWalls:7 (WP)MoreWalls:9 (WP)MoreWalls:10 (WP)MoreWalls:12 (WP)MoreWalls:13 (WP)MoreWalls:14 (WP)MoreWalls:16 (WP)MoreWalls:17 (WP)MoreWalls:18 (WP)MoreWalls:22 (WP)MoreWalls:23': invalid item type '(WP)12' (should be 'Input' or 'Target').

#

The flooring is fine but I must have broken the wallpaper somehow?

rancid temple
#

The GSQ is wrong

latent mauve
#

does that mean I don't have to fix anything?

uncut viper
#

(well you have to fix the GSQ)

rancid temple
#

There should be either Input or Target between ITEM_ID and (WP)12

#

I'm actually not sure if this is an issue on your end though?

#

I've seen this error happen a few times too

latent mauve
#

Let me take a look at the code again, I'm purely CP though, so I'm not sure how it suddenly went wrong

rancid temple
#

It hasn't happened consistently enough for me to try to figure out what's happening though and it also doesn't seem to be stopping anything I'm expecting to happen

#

Is it causing issues with your renovation?

ashen goblet
#

Hello!

latent mauve
#

Let me load up again and make sure the wallpapers actually loaded in properly

#

I tested my new floor but not my new wallpapers, like a dummy

ashen goblet
#

General question!
I'm working on my dialogues script, whilst also lookin' at references to learn. This example is from another NPC;
"Whoa, @, didn't see that coming!$6#$b#I'll marry you, no doubt about it..$8"

What is '#$b#'? Additionally, how do you get NPCs to talk twice? (two different windows)

latent mauve
#

okay, so I've reproduced the issue. It fires when I access the catalog.

rancid temple
latent mauve
rancid temple
#

Talk twice, in two different dialogues is $e

ashen goblet
#

Thank you

rancid temple
latent mauve
#

It spams it quite a bit when opening the catalog xD

#

looks like once per new wallpaper

brave fable
#

might've just realised this morning i'd written a hundred lines with $b and $e flipped SDVdemetriums

latent mauve
#

do you need the latest iteration of my mod for a test pack, roku?

#

(it uses hime's tilesheets now, so that's a new dependency)

brittle pasture
#

:%s/$b/$e/g
ez

brave fable
#

how exactly do i create some codeinstruction for ldarg.s drawBGScroll SDVpufferthinkblob ldarg 11 doesn't cut it, nor does ldarg_s "drawBGScroll"

uncut viper
#

what about ldarg_s 11

#

(i still dont entirely understand when the difference between ldarg and ldarg_s matters i just know i think i usually use the _s form?)

brave fable
#

i think i tried that first lol

rancid temple
latent mauve
#

okay then

rancid temple
#

I don't use the catalogues much, so I wasn't sure when it was happening

latent mauve
#

Easiest way for me to test my new wallpapers is by spawning in the catalog, so that's my primary way of doing it. LOL

brave fable
#

in context:```cs
ilOut.InsertRange(j - 1, [
// public static void DialogueEffects.ApplyStringOffset(ref Vector2 v, int scroll);
new CodeInstruction(OpCodes.Ldloca_S, 2), // Vector2 position
new CodeInstruction(OpCodes.Ldarg_S, 11), // int drawBGScroll
new CodeInstruction(OpCodes.Call, stringOffsetMethod), // ApplyStringOffset
]);

which worked fine until i changed the signature to add `int scroll`
rancid temple
#

I uploaded the beta release of Extra Map Actions to my github, Nexus is being dumb right now so I'll try to add it later

ashen goblet
#

I also realized things like..

birthdayLikeA
birthdayLikeB

#

what does that do?

calm nebula
#

You're only allowed a byte for short form iirc

brave fable
#

ldloca_s 2 above it is fine though SDVdemetriums and ldloc_s 12 elsewhere

blissful saddle
#

Someone knows or have any idea about how to make this:

public void Edit<T>(IAssetData asset)
    {
        Dictionary<int, string> nightFish = new Dictionary<int, string>
        {
            // Bunch of [#intID] = "EditString",
        };

        IDictionary<int, string> data = asset.AsDictionary<int, string>().Data;
        foreach (KeyValuePair<int, string> pair in nightFish)
            data[pair.Key] = pair.Value;
    }

fit on this?:

private void onContent_AssetRequested(object? sender, AssetRequestedEventArgs e)
{
    
    if (e.Name.IsEquivalentTo(PATH))
    {
        e.Edit(>>Here<<, AssetLoadPriority.Medium);
    }
}
uncut viper
#

i basically never specifically cast to byte when using _s its always just worked

blissful saddle
#

I want to alter the original as few as possible, and yeah, I am updating another mod

ocean sailBOT
#

@blissful saddle You leveled up to Cowpoke. You can now speak in our voice channels and share images in all channels!

brave fable
#

i pay for my hubris. i was so confident i could count. it's arg 10 😌

uncut viper
#

yeah thatd do it

brave fable
#

i knew it from the start but i wanted to believe

lucid iron
#

isnt this just a normal asset requested event yggy

lucid iron
#

why cant u use the actual type

blissful saddle
uncut viper
# ashen goblet .

(if no one is immediately answering its likely that no one currently around has the answer or is confident they know, no need to try and bump a message after only a few others)

lucid iron
#

you need both the event handler and the edit delegate

blissful saddle
lucid iron
blissful saddle
lucid iron
#

here's some samples

#

no

#

its instruction

blissful saddle
lucid iron
#

read the page rokugin sent for more details

brave fable
#

alas it was all for nothing, npc names in dialoguebox are drawn on a scroll but do not use the scroll param

#

curse u ape

rancid temple
#

I wish I could help more but every time I work with delegates I'm really just grasping at how to make it do what I want lol

uncut viper
#

yeah im pretty sure the whole portrait side of the box is baked into cursors

brave fable
#

it sure is 😌

lucid iron
#

delegates r just methods that you can hold in your hand blobthumbsup

rancid temple
#

Yeah for some reason I just never seem to be able to remember exactly what I can and can't do with fat arrows

uncut viper
#

(the only delegate stuff i dont really understand at t his point is what specifically writing "delegate(" is for)

calm nebula
rancid temple
#

Lmao

calm nebula
#

And a delegate is just a function pointer with type checking

uncut viper
#

is it otherwise just equivalent to the anonymous function form

calm nebula
#

Yup

uncut viper
#

good to know then! btw apropos of nothing at all dont look at my custom museum code

latent mauve
lucid iron
#

oh button what are u gonna do about collections

uncut viper
#

what do you mean

lucid iron
#

do u want to give every new museum their own page

ashen goblet
uncut viper
#

yes

#

oh wait

#

you mean like

#

the menu tab

#

oh

lucid iron
#

the collections page

#

i think its fine as long as its like a new button

#

and not the dreaded tab

brave fable
#

which is less bad for flagging dialoguebox drawstring from spoken words or from npc display name SDVpufferthinkblob prefix/postfix on drawportrait to set a flag, or string comparison to displayname on draw call

uncut viper
#

hm

brave fable
#

applying text effects to spoken words but not to npc display names in dialoguebox, which share the same method and no unique params

uncut viper
#

i was gonna say i wasnt really imagining having a separate tab in the collections menu for custom museums bc the current one is just for like, archaeology stuff and not specifically denoted for the museum (i think?) it just happens to share the same item set
and a custom museums intent is for you to just choose which kinds of items get displayed in there which can be from any category (including existing minerals or fruits or things)
but i guess i dont know where else you might be able to denote to a player what can be donated besides the tooltip that appears in an item description (which i did plan on adding) but maybe thats enough?

lucid iron
#

oh drawportrait flag sounds better

#

well it could just like like, a simple menu that u can open from map action or some trigger

#

for the mod to decide how they want to show this info

latent mauve
ashen goblet
latent mauve
#

And 1.6.9 is adding its own dialogue key for birthdays

velvet narwhal
#

depending on the age of the mod, it could be using different frameworks, it could also be something like setting an i18n key if you're looking at the default.json

latent mauve
#

true

ashen goblet
#

So, would you guys recommend I avoid this type of key in my own dialogue box, and go with the default?

velvet narwhal
#

it's like what, custom... fixed dialogue? i don't honestly remember what it still does that vanilla doesn't

ashen goblet
#

Alright! I won't put too much concern into it then!

#

I'll look more into it however

latent mauve
#

Probably easier to use the default unless you know what you're doing. If you DID want custom dialogue for specific gifts, there are keys for that too.

#

There just isn't a way to check them on a birthday specifically for an individual object right now through CP without using conditions to change them on the set day, AFAIK.

#

Which is barely a limitation, really

velvet narwhal
#

pathos migrated 1.6

ashen goblet
#

Another thing!

#

What is the trend in the dialogue template here?

#
Stardew Modding Wiki

If you're working on an NPC but aren't sure where to start with their dialogue, the template below lists some of the most common places for dialogue and gives you space to start fleshing them out. Note that you're not limited to these options; you can, for example, set dialogue specific to season, different heart levels, specific days (such as ...

uncut viper
latent mauve
#

GSQ scares me so I avoid it, but I recognize that it makes more things possible.

ashen goblet
velvet narwhal
#

oh this is where the load dialogue.json is coming from fimsknife

ashen goblet
#

It jumps from 2 days, and so on

latent mauve
#

The modding wiki, yikes

velvet narwhal
#

again, it's in the wiki dialogue, that being the "generic dialogue" of <dayOfMonth><hearts>

#
Example: Sun4: "Hey, @.#$e#How's your day going?"```
rancid temple
#

Well, the modding wiki is where stuff like bigger tutorials or examples should live

latent mauve
#

Reference your keys from the Modding:Dialogue wiki page on the main SDV wiki for an explanation of what the key format means. 😄

ashen goblet
#

AHHH

rancid temple
#

The official wiki would be a cluttered, out of date mess if those things lived there too

ashen goblet
#

So for instance; "spring_Fri8 is 8 hearts?

#

and so on

velvet narwhal
#

<season>_<key>

latent mauve
#

if you want to see them all

#

Avi just screencapped that section, but the wiki has more detail

velvet narwhal
#

(side note, seems like that birthday dialogue from CFD got consumed AcceptBirthdayGift_<taste>_<context tag>)

ashen goblet
#

I'm so confused 😭

ashen goblet
vernal crest
#

Yes it is 8 hearts

#

You can only have even heart levels with dialogue btw. There's no "Mon7", for example

latent mauve
#

Dialogue will also default to the highest level of even hearts you match, so if you use the same key but with different heart levels, and jump straight to 10 hearts from 6, you will never see the 8 heart text ( think).

ashen goblet
#

Though, how about normal dialogue.. like everyday dialogue. I may be confusing this for myself if anything, but I'm learnin

vernal crest
#

That is normal, every day dialogue

#

And yes fireredlily is correct about skipping dialogue if your heart levels go up too fast

ashen goblet
#

Mmm

#

I got you

#

I understand how it works now

#

Thank you!

tiny zealot
#

keep in mind location dialogue also tied to heart levels is bugged and won't trigger correctly in 1.6.8 (fixed in 1.6.9, but expect incorrect behavior if you're not testing against the beta)

ashen goblet
#

Got you

#

If I were to implement the specific categories of dialogues here, for instance;

#

Where can I find the codenames for them?

latent mauve
#

Marriage Dialogue section of the wiki has the kid-based ones

#

breakup, divorced, etc. is in Special Dialogue on the wiki

#

All on the same page. 🙂

brave fable
latent mauve
#

nice, I love the shrine

ashen goblet
brave fable
#

funny_transpiler.cs and math.cos, my two beloved children

ashen goblet
latent mauve
ashen goblet
#

Thank you!

latent mauve
#

Scroll up and down, there are many sections of dialogue keys

rancid temple
#

When you make something then take a break from it for a few weeks and come back to it and can't remember how it works

latent mauve
#

I resemble that remark

lucid iron
#

if it wokr dont break it PecoSmile

rancid temple
#

I made a system that lets you set up a map property to have fireplaces already going using GSQ conditions, but didn't write anything down about it so now I have to figure out what the format was lmao

#

Also forgot I made it until I started trying to rewrite my documentation

latent mauve
#

my now-future desire to have fireplaces making everywhere toasty in the winter thanks you

#

I didn't even know I wanted that xD

rancid temple
#

There's a tile action that lets you make map fireplaces actually function and then the map property that lets you set up conditional fireplaces that turn on depending on whatever GSQ conditions you want

lucid iron
#

hm

#

isnt a fireplace basically a light source + animated sprite

rancid temple
#

Yep

lucid iron
#

did you describe it in these generic terms or was it more fireplace specific?

brave fable
#

three animated sprites 😌

rancid temple
#

I'm not sure what you mean by describe it lmao, I didn't write down anything about it

lucid iron
#

well

#

model it?

#

im not sure of the word

#

i like modeling things i dont like implementing em

calm nebula
lucid iron
#

nou

calm nebula
#

I expect the design docs on my desk by next Wednesday

#

let me go test beds real fast

#

also me

  1. clicks on the save that crashes the game
#
  1. accidentally forgets to skip intro
rancid temple
# lucid iron model it?

I would love to be able to tell you what the hell I did, but I'm still trying to figure that out lmao

#

I might have to take a break on figuring it out because today is feeling like a dead brain day

lucid iron
#

just redo it then

rancid temple
#

But it works, I don't wanna :P

#

I'm close to figuring it out, but I have a noise distraction in the room so I can't focus very well

late pewter
calm nebula
#

(bed not upgraded is reproduced)

dreamy pagoda
#

Is it ok if I show an issue with my portrait mod here? Or at least can someone help me? The issue is in #making-mods-art

lucid iron
#

is that a hd portrait?

#

vanilla portraits are 64x64 pixels

dreamy pagoda
#

Yes shies

#

I used shies portrait mod as reference

rancid temple
#

That is an HD mod, uses Portraiture

dreamy pagoda
#

So I’m confused why there’s a gap when I try to move the next portrait across

lucid iron
#

u need to use portraiture yourself then

dreamy pagoda
#

No that’s not the issue

rancid temple
#

Is this a gap in your art program?

brittle pasture
#

that seems like a problem with your art program

dreamy pagoda
#

No I copied and pasted the image onto the canvas

lucid iron
#

should just try it in game LilyDerp

#

if it work then u win if not then i guess your portrait isnt square

ornate trellis
#

I'd assume that the image you copy-pasted is not the right size then

dreamy pagoda
#

It shouldn’t be possible for a gap to be created by a program app since it is in the centre 🤔

rancid temple
#

That depends on so many things

dreamy pagoda
#

No even if it wasn’t the right size it shouldn’t be possible

velvet narwhal
#

Portraiture base is 512px per portrait, some Portraiture mods are different

rancid temple
#

What program are you using?

dreamy pagoda
#

If the portrait is perfectly square then no matter the size it will be perfectly square, so if this is wider than a square then it has nothing to do with the image size

#

Procreate lol

dreamy pagoda
rancid temple
#

Can't test that, I don't have any mac products

velvet narwhal
#

You can divide the width by 2 to see the original square size that they use, but because portraiture is varied, it's just how it goes

dreamy pagoda
velvet narwhal
#

As well as however many vertical portraits, divide that number by the divided width

#

If it isn't perfect, your base is off

rancid temple
#

Are you sure it's based on the whole selected area and isn't trimming the empty space out of it?

#

That would make it no longer square

dreamy pagoda
#

So what I will do is import the file into my game

#

Then I’ll check for any other issue

velvet narwhal
#

Portraiture is also, Finicky ™️ if all else fails just force your canvas to be whatever square size you want

ashen goblet
#

Difference with breakUp and dumped_Girls?

dreamy pagoda
#

One is gender based

velvet narwhal
#

Dumped is a very specific cutscene, breakUp requires the wilted bouquet

calm nebula
#

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

ashen goblet
#

What cutscene?

calm nebula
#

(that unpack is for me.)

blissful saddle
#

(good unpacking)

rancid temple
#

||Isn't that the one where you try to date all the girls at the same time?||

velvet narwhal
#

|| it is for getting caught dating all the women without a certain item ||

latent mauve
#

good call on the spoiler tag

velvet narwhal
#

Oh I has the certain item thing but it's been in game for awhile ...probably

ashen goblet
#

Just for clarification; dumped_Girls would then.. be the player ||dating all girls|| correct?

velvet narwhal
#

Guys is the reciprocal, correct

ashen goblet
#

👍

#

Thank you

brittle pasture
#

(technically it's not a 1.6 spoiler, need we mark it?)

velvet narwhal
#

Or was there no guys tag to it

uncut viper
velvet narwhal
#

I couldn't remember if 1.6 added it or not tbh I'm lounging in bed SMCKekLmaoDog

brittle pasture
#

is there a mod that adds parsnips

rancid temple
#

I just didn't want to be the one jerk not spoil tagging the same info in a row lol

uncut viper
blissful saddle
# rancid temple <https://stardewvalleywiki.com/Modding:Modder_Guide/APIs/Content#Edit_a_game_ass...

I am throwing this here again...

So I read that, and, after lots of tinkering and crashing, I threw up the old class and just copy-pasted the data to the event method.

Although everything runs smoothly, the edit seems to not be made (the changes I would expect didn't happened).

        private void onContent_AssetRequested(object? sender, AssetRequestedEventArgs e)
        {
            if (e.NameWithoutLocale.IsEquivalentTo("Data/Fish"))
            {
                e.Edit(asset =>
                {

                    Dictionary<int, string> nightFish = new Dictionary<int, string>
                    {
                    \\Bunch of [int] = "StringValue"
                    };

                    var data = asset.AsDictionary<string, string>();
                    foreach (KeyValuePair<int, string> pair in nightFish)
                        data.Data[pair.Key.ToString()] = pair.Value;
                },
                AssetEditPriority.Late);
            }
        }

Sorry for pinging you, I just wanted to refer to the link. It's ok if you can't help more SDVpufferheart

brittle pasture
#

nightFish is empty ignore me

blissful saddle
#

if it makes things clear, I am fixing the Night Owl mod, and this is the change to the fish so they show up between 2AM and 6AM

rancid temple
calm nebula
#

(that's a hilariously weird way to do it

uncut viper
calm nebula
#

let me try something different

lucid iron
#

cant u add hay though

rancid temple
#

(oh lmfao, right)

lucid iron
#

or is that also hardcoded

brittle pasture
blissful saddle
#

yeap

#
            if (this.Config.UseInternalNightFishAssetEditor)
                helper.Events.Content.AssetRequested += this.onContent_AssetRequested;
#

always a valid question though

uncut viper
#

also re: nightfish why not add them directly to the dictionary you're editing, why create a middle man dictionary

calm nebula
#

private void OnAssetRequest(object? sender, AssetRequestedEventArgs e)
{
  if (e.NameWithoutLocale.IsEquivalentTo("Data/Fish")
    e.Edit(static asset => {
        var data = asset.AsDictionary<string, string>().Data;
        foreach (var (key, value) in data)
            if (" 2600" in value)
                data[key] = value.Replace("2600", "3000")
    }, AssetEditPriority.Late);
}
#

(also why the fuck hard code vanillaish values anyways.)

#

taht's very weird

blissful saddle
blissful saddle
#

my main issue is know why that monster doesn't work

brittle pasture
#

yeah the original implementation is a bit sus, though I'm still wondering why the function doesn't run

blissful saddle
#

the original implementation was taken from the author original xnb edit, when it was put directly on game data back when the ancient magic was written

#

I want to say, a very lazy take

brittle pasture
#

and UseInternalNightFishAssetEditor is enabled in config.json?

blissful saddle
#

yeap

#

I can assure it is running, because it crashed my game sometimes before I found the "right" way to put it

#

now it is not crashing, but also not changing things

brittle pasture
#

and you confirmed with patch export Data/Fish?

lucid iron
#

im gonna ask stupid question, you hooked the assetrequest event right

blissful saddle
brittle pasture
#

yes

blissful saddle
#

I can try to do it

#

didn't thought about

brittle pasture
#

it should make a folder named patch export in your SDV folder, with a file inside containing the full dump

blissful saddle
#

but if it is running but not changing the data, or not loading, I also would expect the exported data would be the same as the base

brittle pasture
#

understood, please do it regardless

blissful saddle
#

as expected, no changes

#

to comparison, the purfferfish one

#
[128] = "Pufferfish/80/floater/1/36/1200 1600/summer/sunny/690 .4 685 .1/4/.3/.5/0",
#

wait

#

it is changing

brittle pasture
#

it's because the Pufferfish is 12 to 16 only

#

every other entry that ends at 2600 got changed to 3000

blissful saddle
#

yeap, just noticed the Anchovy

brittle pasture
#

so it is very much working

#

anyway, 1. make sure to use atra's fixed version, and 2. make sure to always confirm with code 😉

blissful saddle
#

pfft

#

I found the problem

calm nebula
#

(I will note that I got a bit lazy, if I was doing this proper I would check the actual time field and also do some more detailed replacements.)

#

but figured it was Safe TM

blissful saddle
#

ok, I am angry now

#

I am having to fix it from one version before the one in nexus, because the nexus one doesn't have source updated

brave fable
#

here was me wondering why you even checked if '2600' in value instead of just using replace(' 2600', '')

blissful saddle
#

the mod currently changed time 2550 to 150...

#

so the changes on fish will do nothing

brittle pasture
lucid iron
brittle pasture
#

fak

uncut viper
#

damn it actually is a fish too

brittle pasture
#

exactly lol

uncut viper
#

thats incredible

blissful saddle
#
                if (this.Config.StayUp && Game1.timeOfDay == 2550)
                {
                    Game1.isRaining = false; // remove rain, otherwise lighting gets screwy
                    Game1.updateWeatherIcon();
                    Game1.timeOfDay = 150; //change it from 1:50 am late, to 1:50 am early
                    foreach (FarmAnimal animal in Game1.getFarm().getAllFarmAnimals())
                    {
                        this.oldAnimalHappiness.Add(animal.happiness);
                    }
                }
brave fable
#

still won't be hit by the replace method including a space 😌 now that's future proof

uncut viper
#

looks like you need to specifically account for SCP mods now

oak dragon
lucid iron
#

does any exist

uncut viper
#

they might write "SCP 2600"

lucid iron
#

i feel like the venn diagram is 2 circles here

uncut viper
#

but the circles arent immutable

brittle pasture
#

brb making a mod to add Dr Clef as a romancable NPC

oak dragon
#

loool thats incredible

blissful saddle
#

would be awesome make an SVE SCP edition

lucid iron
#

C# syntax question i have a switch case like

switch(enumValue){
  case TheEnum.One:
    EventOne += Handler;
    break;
  //... and more cases for all values of TheEnum
}

and a corresponding one thats EventOne -= Handler

#

is there nicer way to write this LilyDerp

uncut viper
#

i was about to write a stupid idea that i didnt know if itd even work and then you had to go and edit your message to imply theres more than 2 values of enum SDVpufferpensive

lucid iron
#

i tried to like, make a method to return the Event

#

but hrm i guess thats not how C# events work

blissful saddle
#

could go for a Dict<enumValueType,type> and just EventOne += Dict.getValue(enumValue)

teal bridge
#

Not really, except to create an Action<HandlerDelegate> using that very same switch.

oak dragon
#

how about foreach (var event in eventList)

lucid iron
#

thats too much python in this house, but also Handler is the constant one

#

its the event that it gets attached to which changes

#

EventOne through EventN are all same signatures

teal bridge
#

It's because events aren't really fields or properties, they're multicast delegates, so add/remove is essentially like a method call, it doesn't matter that they have the same signatures.

#

Same as "switching" over N methods that all have the same signature.

#

Either way you need a switch because of the enum so what are you trying to eliminate anyway?

lucid iron
#

i have 2 switch rn, one for += when u equip trinket

#

one for -=

#

i would like to only have 1 switch cus i am a fool and will forget to do it 2x whenever i add new value to this enum

teal bridge
#

Can't. Again, think of adding/removing event handlers as method calls, essentially.

lucid iron
#

unfortunate

#

maybe if i get annoyed enough to make source code generation just for this

teal bridge
#

I guess you could have one big switch statement with a bool parameter that says whether to add or remove, but you're still going to have separate results for add vs. remove.

calm nebula
#

this is amazing

old edge
#

Trying to figure out how this map will fit into pelican town it's a farm map heavily inspired by loafys mini garden farm

lucid iron
#

if i could like

#

pass the method version of += and -= somehow...

old edge
#

Should I make it bigger?

calm nebula
#

hey y'all on the beds, spot the bug

teal bridge
#

It's the same reason you can't "forward" an event by declaring (for example) class Foo(innerFoo) { public event EventHandler Bar => innerFoo.Bar }, it's simply not how the type system works.

lucid iron
#

mood

brave fable
#

two heights??

calm nebula
#

yup

lucid iron
#

so did it break in 1.6.9

calm nebula
#

very recently too

lucid iron
#

i feel like my 1.6.8 bed was fine

latent mauve
#

1.6.8 beds were fine

latent mauve
#

I could see walking left from Community Center area to there if it's not gonna be the actual farmhouse location.

blissful saddle
#

I am just glad the fish times accept more than 2 values if they are giving in pairs

#

I will use atra's to work on a better version ocasionally, but for now...

brave fable
#

is it fine to have a 2 warps from a dead-end location to the same location in sdv 1.6 ?

calm nebula
#

Wdym

#

C < - A -> B is fine

#

You can have loops but the pruning is a bit incorrect and the game generates a lot of not the right path

brave fable
#

it's more like
A
↕ ↕
B

calm nebula
#

Oh that is fine

brave fable
#

two separate warps between two locations

calm nebula
#

Uh, is it A not contiguous?

#

Does an NPC try to walk there

#

I guess I should ask if B is not contiguous

tiny zealot
#

aren't those cases isomorphic

brave fable
#

you can walk to each warp in each map without leaving the map

#

i don't know what these words mean

calm nebula
#

Backwoods is not contiguous

#

There are some warps not accessible from other warps

calm nebula
brave fable
#

front door ↔ kitchen
verandah ↔ bedroom

calm nebula
#

That might be fine

lucid iron
#

isnt this like science house

brave fable
#

it's a lot like science house, but less science

calm nebula
#

(No, maru's bedroom door is hardcoded excluded from the scheduler)

#

So yes but no

#

Still, I suspect fine

brave fable
#

oh to hardcode people from coming through my bedroom door

calm nebula
#

Meanwhile I'm looking at this going wtf?

brave fable
#

why set x if y is offscreen SDVpufferthinkblob

#

nice to know i'm not the only one constantly flipping i, j, x, y, width, height, left, right, ..

#

if it's only maybe fine to have a circular warp setup i probably wont bother

lucid iron
#

but think of the R&D

calm nebula
#

Would it help if I upgraded that to "probably fine"?

brave fable
#

hmmm i do like being groundbreaking & 🆕

#

wobbly text already has such a bright future

#

think it's safe to format it as "(wave)My dialogue is so good#$b#(shake)so very good"

lucid iron
#

are u gonna frameworkify anything u r doing for this elaborate map mod

rancid temple
brave fable
#

i guess it depends if there's interest and the thing ever actually comes out

#

and if it isn't buggy

#

and doesn't run very very badly (i dont care about performance at all)

#

(i hate updates & requests & also any-term support)

lucid iron
ocean sailBOT
calm nebula
#

Maybe

obtuse ivy
#

HI! Im trying to to figure out how to make my NPC mod compatible with other mods like SVE or Polyamory, etc. But I dont know how to do it. Does anyone know/have a sample for it?

patent lanceBOT
#

@calm nebula: "take a look" (3d ago) [Requested by bblueberry]

tiny zealot
obtuse ivy
#

do you have a sample for that 🙏 (im a visual learner)

tiny zealot
#

my only example is my NPC mod, which is probably not ideal for learning the ropes

lucid iron
#

not all mods need special compatibility

#

i think polysweet should just work if your npc is romancable, but double check the mod page

tiny zealot
#

NPCs usually require some for SVE, because SVE edits every map, often heavily, so much of your schedule is often wrecked

obtuse ivy
#

i released my npc mod and someone said it wasnt compatible with polyamory (it crashes on the day of wedding iirc)

tiny zealot
#

hmm. do you have a custom wedding script?

obtuse ivy
#

im looking at this rn but i have no idea how to type it out

obtuse ivy
calm nebula
#

That's probably a bug with polyamory tbh

patent lanceBOT
#

@calm nebula: check yourself (6h ago)

lucid iron
#

i didnt know uber convert myself to yourself

calm nebula
#

Yup, beds checked

tiny zealot
#

that When condition specifically is for "SVE is installed"

#

so that patch applies only if SVE is there

obtuse ivy
#

ok lemme look around

tiny zealot
#

so once you identify what things about your mod need to change to account for SVE, you add patches for those things gated behind the HasMod condition

#

in my mod, i set up everything in the default state, assuming SVE is not present. then i use "Action": "Include" with the HasMod condition to pull in a file full of SVE-specific patches which overwrite the default values and/or add new data as necessary

rancid temple
obtuse ivy
#

okay i get it now, thank you!

#

so i have to check one by one for overlaps 🤔

tiny zealot
#

... are you checking your festival positions? god help you if so

obtuse ivy
#

🥹

#

but for the polyamory compat, i dont have custom script for wedding or anything so it shouldnt be on my end's error,.....rigth .?

tiny zealot
#

don't forget you have to check four years for SVE spirit's eve, and you have to patch update if you debug switch years because SVE is like that

obtuse ivy
#

wait just read the user's comment

#

its not the wedding or anything

tiny zealot
#

(source: i failed to do both of these things and just fixed them recently)

obtuse ivy
#

they crash everything they try to marry her and go back to farmhouse

vernal crest
obtuse ivy
#

ahh i see!

#

alright i will tell them, thanks a bunch!!

vernal crest
#

Hopefully that's the issue!

rancid temple
#

I see why, I had switched to my 1.6.8 install earlier and was still on it when I decompiled again SDVpufferpain

ashen goblet
#

I don't quite understand how we can do Schedule Animations, despite reading it on the wiki. Could somebody dumb it down for me to how it works? I, of course, understand the part of inserting the code into content.json though.. I'm not sure how the code could identify the sprite sheet, and further.

tiny zealot
#

the sprite sheet the NPC uses for these is just whatever one they are using right now

obtuse ivy
ashen goblet
#

I still don't quite understand this as well

#

How does the code identify which row is what, etc?

obtuse ivy
#

its (starting anim)/(main anim)/(ending anim)
for instance: 36/37 37 37/36

ashen goblet
#

Sooo.. if I were to make an animation on the 5th row

#

would it be 16/17 17 17 17/ 18

#

and so on?

obtuse ivy
#

yes

#

depends on which sprite youre using

#

if theyre on those numbers, then those numbers is what youll be using

ashen goblet
#

Got it, thank you!

strong star
#

excuse me, may i ask some questions here?

vernal crest
rancid temple
#

The urge to respond with the command lol

strong star
#

im currently developing a mod, and i wonder how to call a console command with my mod. i cant find infomation on wikiSDVpufferpleading

calm nebula
#

It's generally considered not a good idea, but why do you want to do that?

lucid iron
#

which console command do you want to call

tiny zealot
#

(if it's your own command, you can just call whatever function you hooked it up to)

strong star
#

i want to call player_add(sorry, in fact im a greenhand in both moddeveloping and c#developing)

tiny zealot
#

can you skip doing that and simply add the items to the player's inventory yourself?

strong star
#

I see, thank you

lucid iron
#

ItemRegistry.Create(qualifieditemId)

#

and then Game1.player.addItemToInventory

#

should decompile game if you havent already

strong star
#

have you heard about the mod chat commands? it seems that this mod is invalid in the latest sv version.
i want to use the function at first, so i searched on nexus, but turned out to be invalid. so i want to develop a similar mod.
im now trying to call the command which received in in-game chatbox

calm nebula
#

Fun fact: I sorta did that a few weeks agp

lucid iron
calm nebula
#

(What I do is reflect into SMAPI to add the commands into the raw command queue.)

uncut viper
#

and in 1.6.9 you can just add your own chat commands

tiny zealot
#

the code i lifted from shockah does the same thing and also emits IL for some reason

strong star
#

wow, thank you so muchSDVpuffersob

#

i led such a poor life beforeSDVpetcatsad

lucid iron
#

what do you mean by this LilyDerp

calm nebula
strong star
#

i had little information, and had no community

#

😂 so thank you so much

dreamy pagoda
#

How do I make a portrait mod? Do I just replace the images or is there something more to it?

tiny zealot
#

you make new images the way you like them. then typically you write a bit of json to tell content patcher how to apply the new images

rancid temple
#

If you're making those HD portraits, you'll need to make it to Portraiture's standard

dreamy pagoda
#

Don’t worry it’s the correct size

rancid temple
#

Correct size for vanilla or Portraiture?

dreamy pagoda
#

Portraiture, 512 px

rancid temple
#

I don't know if Portraiture has size limitations in the same way vanilla does

#

The issue with Portraiture is more along the lines of how you add the files to it, since it's not like making a content pack for CP

#

It still hasn't been updated, so content packs for Portraiture are still broken

#

Which means the only way to use it is the folders in the Portraits folder inside the Portraiture folder

dreamy pagoda
dreamy pagoda
tiny zealot
#

plus you are doing HD/portraiture so you won't need to write any json

rancid temple
#

I just noticed Portraiture got the Nexus ID 999 lol

lucid iron
#

the people who download your mod put stuff in the right folders

dreamy pagoda
tiny zealot
lucid iron
#

i remember it being kind of complicated

rancid temple
#

It's not that complicated, you need a folder in the Portraits folder of the Portraiture mod folder

lucid iron
rancid temple
#

You name it whatever you want your set of portraits to be called

dreamy pagoda
#

Yeah but there was an issue when I tried to draw over a portrait

rancid temple
#

Then you have to make sure your portraits are specifically named so they override the proper base images

#

And they all just go in the folder

dreamy pagoda
#

The Harvey portrait has an issue

#

The original portrait is fine on it’s own but I can’t try over it since the portrait sprites goes out of place and you can see the top of portrait 2 while portrait 1 is displayed

rancid temple
#

I'm not sure I understand. Got a screenshot?

dreamy pagoda
#

Yeah I’ll try to show you

#

Sorry it’ll take a bit

rancid temple
#

All good

dreamy pagoda
#

I’ll show u in dms

rancid temple
#

Uhhh ok

dreamy pagoda
#

But I hope you can help me, it is fine if you don’t

rancid temple
#

I just typically don't do support in DM's lol, server is here for getting help so it's my preferred place to do it

vernal crest
#

We can always make you a thread if you're worried about cluttering this channel, but also the channel isn't busy right now so it's probably fine to stay in here.

ashen goblet
#

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

ashen goblet
#

Hey, can somebody try and identify what the error is talking about?

rancid temple
#

Missing commas

uncut viper
#

it doesnt like the kind of quote you used on line 16

#

that too

rancid temple
#

Oh yeah, that's a wild quote lol

uncut viper
#

its not actually ending the quote until the quote on the next line, and then ofc errors from there bc thats wrong

ashen goblet
#

Ahh

#

I see what you mean

uncut viper
#

it will also need a comma after it like roku says tho

#

same at the end of line 18

ashen goblet
#

Are there any other errors that you can see?

#

I'm not sure if Red is an indicator of error but

uncut viper
#

not at a glance. would be easier to just fix that error and pop it back into a json validator and see if it catches any other commas

#

text inside quotes will appear reddish in the validator

#

so the fact that things that should be red arent and things that shouldnt be red are indicates some missing or misplaced quotes or commas, in this case both

#

(bc of the weird not-quote)

ashen goblet
#

After parsing a value an unexpected character was encountered: D. Path 'HitBySlingshot', line 18, position 3.

#

I added the comma at the end, same with line 18

uncut viper
#

that error is because of the weird quote at the end of that line

#

idk what exact symbol that is but it doesnt exactly match a "

ashen goblet
#

What can I do for it to be correct?

#

Ahh

uncut viper
#

write a normal quote, i guess. dunno how you ended up with one single weird one in the first place, so iunno

ashen goblet
#

Keyboard stuff

#

I'll fix it

#

Fixed! Now I have this

#

Property with the name 'Sat' already exists in the current JSON object. Path 'Sat', line 69, position 8.

#

I see the error

#

It does not have 2 after Sat

rancid temple
#

I love that my computer has suddenly decided that it doesn't know how to open png's anymore

ashen goblet
#

Jesus

#

Could you look at this for me?

#

It seems that format is completely off the table

uncut viper
#

its just because you have it set to validate against Content Patcher's format, but this is just normal json

#

change the json format to just None and its all fine

ashen goblet
#

Ah

#

Got you

#

I was worried

rancid temple
#

I guess before I restart my computer, I'll check the new beta and see if they had already caught the bed issue

fathom hound
brave fable
#

i was wondering the same thing SDVdemetriums

rancid temple
#

I feel like I've walked into a conversation with no context lol

#

Bed's are fixed, huzzah

ashen goblet
#

Though I do understand it--I don't see where the issue is

rancid temple
#

Your file is formatted as if you're just loading all that dialogue, but your Including it as if it's a patch

#

Anything you Include needs a "Changes": [] block with the patches you're doing inside of it

#

In this case EditData for your characters blank dialogue asset

ashen goblet
#

I'm sorry, I'm still a little confused--I'm clearly not the best at this. What should I do, in that case? In the simplest way of explanation

#

Should I add the typical 'Changes' to dialogue.json?

rancid temple
#

Hang on, lemme restart my computer, I closed everything and need to restart before I open it all back up again

ashen goblet
#

No worries!

rancid temple
#
{
    "Changes": [
        {
            "LogName": "Add dialogue for YourNPC",
            "Action": "EditData",
            "Target": "Characters/Dialogue/YourNPC",
            "Entries": {
                //dialogue entries go here
            }
        }
    ]
}
ashen goblet
#

And I should put this in my dialogue json file?

rancid temple
#

You would put this in and then all the things currently in your dialogue.json would go inside the Entries brackets

#

Everything from Introduction to Resort_Wander

ashen goblet
#

And all of this is within my dialogue.json, correct?

rancid temple
#

Yeah, this is also assuming you've done the blank loading

ashen goblet
#

Blank loading? You mean blank.json?

rancid temple
#

Yeah

ashen goblet
#

Yeah that's already there

rancid temple
#
{
      "LogName": "Blank json load",
      "Action": "Load",
      "Target": "Characters/Dialogue/YourNPC, Characters/schedules/YourNPC, Strings/schedules/YourNPC",
      "FromFile": "assets/data/blank.json"
}```
ashen goblet
#

Yeah that's already in my content.json

rancid temple
#

Cool cool

ashen goblet
#

I'll test it out!

#

Just for verification; I'll send the json log, and let me know if it's correct

#

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

ashen goblet
#

It works!

#

Thank you!

pale marten
#

somebody help me pls SDVpufferchickcry

ocean sailBOT
#

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

pale marten
#

Once again, no clue what is going on

#

nvm i think I might know the problem

#

or at least a problem

vernal crest
#

You edited your map without all the tilesheets present and now all your tile IDs are incorrect (or many, at least).

pale marten
#

Yeah I thought sooo

#

But thanks :)

pale marten
#

uhm

#

now it should have worked and I dont get any errors anymore, however

ocean sailBOT
#

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

pale marten
#

it says that the location is loaded but it still doesn't load?

vernal crest
#

You have accidentally named your location "Custom_ShurblordsMapPack_BusStopEast"

latent mauve
#

You have a typo, it says Shurblord

old edge
#

Hello

fleet crystal
#

Does anyone know how to add an event for a custom location I’ve tried and it keeps saying my event is not found

velvet narwhal
#

need to load a blank json into your data/event/YOURLOCATION

vernal crest
fleet crystal
#

how do I load a blank json?

#

What are tokens?

vernal crest
#

The stuff with {{ }} around them, like {{ModID}} or {{season}}

brave fable
velvet narwhal
#

and a blank.json is literally a .json with { } that you use the "Action": "Load"

vernal crest
#

This is how to load a blank json to create the Events asset for your custom location.

        {
            "LogName": "Load blank json to custom locations used in events",
            "Action": "Load",
            "Target": "Data/Events/{{ModID}}_NationalPark, Data/Events/{{ModID}}_Campervan",
            "FromFile": "data/blank.json"
        },
#

(I am loading into two assets in that example, because I have two custom locations I have written events for).

fleet crystal
#

I have a dumb question what is a mod id

vernal crest
#

The {{ModID}} token is a placeholder for your mod's UniqueID (the one from your manifest). People frequently use UniqueID as a prefix for their mod's assets to ensure they are unique. Some people use the {{ModID}} token to stop them from having to type/copy their UniqueID repeatedly.

fleet crystal
vernal crest
pale marten
velvet narwhal
#

you can make it worse, you can be like me and actually have it fit with the typo without realizing across both files
include: weeding logname weeding

vernal crest
#

"I don't want to marry him, I want to garden with him!"

pale marten
#

It worked, nice

fleet crystal
#

Heyy i was wonder how would i add that code to my content it keeps making my json invalid

vernal crest
#

What do your Town.json and Custom_Village.json files look like?

fleet crystal
vernal crest
#

Your second line in there appears to be a botched copy of the first line.

#

Also, you should name your location something more unique than "Custom_Village" and you don't need to use a number for your event ID. You can use strings in 1.6.

#

(Also I think this has been recommend to you before, but I really do strongly recommend you use a text editor with syntax highlighting like Notepad++, VSC, or Sublime.)

fleet crystal
#

heres the town

vernal crest
#

(And please use the smapi.io json validator to share json files in future as it's very hard to read screenshots of non-word-wrapped files)

fleet crystal
#

oki sorry

vernal crest
#

Look at the two lines of the event in the screenshot. They are almost identical except the second line has several random quote marks and back slashes around the place.

fleet crystal
#

im so confused lol im just not comprehending

vernal crest
#

Look at the bit underlined in red and then look at the bit underlined in blue. See how the bit in blue is a copy of the bit in red but with extra backslashes and quote marks?

#

If you still don't know what I mean, upload your Custom_Village.json file to the smapi.io validator and send the link and I will look at it and tell you exactly what to do

fleet crystal
vernal crest
#

With this in your content.json (before your includes for Town.json and Custom_Village.json)

        {
            "LogName": "Load blank json to custom locations used in events",
            "Action": "Load",
            "Target": "Data/Events/Custom_Village",
            "FromFile": "assets/Events/blank.json"
        },

Just make sure you have a file in your "assets/Events" folder called "blank.json" which has the following in it:

{ }
woeful lintel
#

I wonder, how does the game handle Furniture in map data? does it instantiate a Furniture object or is it just a sprite?

brave fable
#

sittable tiles aren't furniture if that's what you mean, they're their own system

velvet narwhal
#

and the fireplaces are their own method in gamelocation SDVpufferflat

rancid temple
#

With Extra Map Actions, you can make fireplaces in maps work (in the beta version, still working on that documentation)

woeful lintel
vernal crest
#

Yes, when someone is making a map with vanilla furniture they just load furniture.png into Maps. No fancy actions, just the images of the furniture.

velvet narwhal
#

furniture outside of the farmer placing it is all a lie SMCKekLmaoDog

rancid temple
#

Map furniture is a lie, crows eating crops is a facade, the walls aren't real man

velvet narwhal
#

the walls are a front HAH /leaves

#

okay note to self, Buildings2 will screw with cp tileactions

#

i just merged it down cause i'm dumb and i don't remember why i even had that

rancid temple
#

Yep, extra numbered layers are only good for their looks

velvet narwhal
#

i can no longer work, orange son is sitting on my mouse

rancid temple
#

Hopefully you didn't overwrite something lol

velvet narwhal
#

nah i think it was quite literally just a door overlay, which....... that must've been a 6am me thing

#

i've gone the fun route and literally all of my map properties and tiledata is through cp

rancid temple
#

Hm, sounds like a pain to troubleshoot lol

vernal crest
#

I have a couple of MapTiles in my Forest mappatch that are just there to delete tiles that I can't otherwise figure out how to remove lol

velvet narwhal
#

it's troubleshooting pain but i know what kind of stupid antics i've done, so it's just hunting down either the location edit or the tmx

#

i have to manually put these trees in ig

#

my dynamic token isn't working, even with async random SDVpuffersob

#

oh well SMCKekLmaoDog easy fix

woeful lintel
#

that's gorgeous

velvet narwhal
#

fun fact, that ugly looking brown one changes color and i now have the capability to make it glow in c# so y'know add another thing on the list of "stupid things i'm about to do"

woeful lintel
#

fun fact, you'll have to rework their glow when 1.6.9 drops since it changes the light registration system

#

unless... does it changes the global glow cache or is it just lights? I can't remember

velvet narwhal
#

oh i only work in 1.6.9

woeful lintel
#

that's a good idea

rancid temple
#

My orange boy just came in, laid down on my foot and started biting me, which usually means it's food time

#

Since he normally doesn't want anything to do with me otherwise

pale marten
#

typical orange

vernal crest
#

The only orange cat I know is prone to biting and I have grown up with non-bitey cats so my feelings always get hurt when he bites me xD

rancid temple
#

I saved this punk from my inept neighbor, bottlefed him every couple of hours for weeks, and he grows up to be a jerk

vernal crest
#

My cat was very uninterested in human interaction (I didn't socialise him well as a kitten) but he did really enjoy headbutts. He'd jump up on our bar stools and headbutt my forehead so hard you could hear the "crack" of our skulls meeting.

rancid temple
#

Lmao, cats can be so reckless with their skulls it's amazing

vernal crest
#

It was always astonishing. He could do it so hard it left me with a bruise and he was totally unfazed.

rancid temple
#

Mine has recently started showing off, where he'll walk to the center of the walkway, flop down and stretch out as much as possible. But he flops by lifting his top half up and slamming his head into the ground as he rolls onto his back, it looks and sounds painful but he just stretches out like it's totally natural to give yourself a concussion before showing off

vernal crest
#

Hehehe so silly

velvet narwhal
#

god this wildtreedata hates me

blissful panther
#

(It's how he knocks his one braincell into the ether to be shared by the other orange cats.)

rancid temple
#

Ah yes, the passing of the brain cell

#

Unfortunately, he's a little bit too smart for his orange coloration

velvet narwhal
#

i thought roku's always had the braincell cause it's the smartest one

#

mine would like to take a loan on the braincell for a day, i went out for a midnight run to the store for cat food and he immediately headbutted the bag while i was cutting open a hole

blissful panther
#

Wild tree data hating you, though? SDVpufferlurk

rancid temple
#

We've had to start locking our screen door because he figured out that if he jostles the handle while leaning into the door it'll open up

velvet narwhal
rancid temple
#

Not everything has a GetData

dusty scarab
#

...blue tongue skinks also share one braincell, but I've yet to discover how they share it amongst themselves yet

velvet narwhal
#

SDVpufferwaaah what is this and how do i call it

brave fable
#

look at your code real close there

#

reeeeal close

brave fable
#

hint: you already have wildtreedata

rancid temple
#

Oh yeah, you're passing it WildTreeData

#

And trying to use that to GetData which would give you WildTreeData

velvet narwhal
#

i fixed it

#

now i can commit lightsource crimes

brave fable
#

one orange role braincell SDVpetcatsad

velvet narwhal
#

roku always has the braincell, i never do

vernal crest
#

Maybe you two need to headbutt

rancid temple
#

Not today, today I have the brain death

#

It is asleep but I am awake, alas

velvet narwhal
#

i say it every day but i shouldn't nap at 6pm

rancid temple
#

But the best time to nap is when you shouldn't be

#

That's science

vernal crest
#

There are so many good emojis in here but by the time I finish perusing them to find one that's appropriate (and different to the ones I always use) the situation has moved on

rancid temple
#

Lol, the problem with choice

#

This is the server I was pulling emoji's from when I had nitro

#

But imagine being on other servers with great emoji choices, I'd never get anything done lmao

vernal crest
#

SMC has some excellent emojis as well

brave fable
#

there's no problem that can't be solved with a good SDVdemetriums

velvet narwhal
#

(me literally only using keklmaodog)

vernal crest
#

Which I used a lot here and in DM when I briefly had nitro

brave fable
#

if there is, it gets the SDVpufferfush

velvet narwhal
#

my favorite emoji i've ever drawn

vernal crest
velvet narwhal
vernal crest
#

The only reason I even half-get that emoji is because I have seen you use the...fishy? thing in other contexts

velvet narwhal
#

oh it's the..

#

god i have to google it every time one second

#

i'm fighting demons on making it a stardew fish

rancid temple
#

It looks like someone slapped googly eyes on it lmao

vernal crest
#

Huh

brave fable
#

you could never have eyes that tiny on a 16x16 sprite. make it full hd

vernal crest
#

Despite being online almost every moment of every day, I am not very Terminally Online TM

rancid temple
#

Gotta harness Scale Up

velvet narwhal
#

all of my personal discord's emotes are that

#

and this one emote cause i have a problem

brave fable
#

ah, an upside-down cowboy hat. of course

rancid temple
#

Give it eyes

velvet narwhal
vernal crest
#

Have you put the beard on the sacabambaspis?

#

I think you'd need to put the mouth on top of the beard

velvet narwhal
#

thankfully i have them still separated SMCKekLmaoDog but that is a "i don't wanna work on anything else" time, i'll put it in the backburner

rancid temple
#

Can't wait to forget about this convo and just be online one day and see this emoji lmao

velvet narwhal
#

well on actual topic, now i need to figure out... adding specific hues and intensity to this light

#

i'd have to make a totally different thing if i wanted target capability, huh

rancid temple
#

Target capability?

velvet narwhal
#

cp capability* effectively putting my own squints dictionary? into wildtrees for adding data to keys (but still being compatible to tree size framework)

rancid temple
#

Uh, depends on what you're trying to do

#

Like if you want many fields like how a normal data model is set up, then you would add your own asset

#

Trying to see if the wiki has a good example of this, but it's kind of two ideas merged to one

velvet narwhal
#

SDVpufferthinkblob i might just be lazy and make it take lantern light

#

since i'm just using the customfields

rancid temple
#

Models/FireplaceConditionsModel.cs is the data model and assets/DefaultFireplaceConditions.json is what is loaded as the default/gives an idea of what it would look like

#

I have a more sophisticated one... just gotta remember in which of these mods lol

#

Eugh, right, this is from when I first learned to do this and is still rough lmao

#

I'm definitely gonna end up redoing a lot of code in this mod before I release it lmao

velvet narwhal
#

oh wait

brave fable
#

asset -> model -> implementation is a really simple pattern in sdv with cp, it's super convenient

velvet narwhal
#

SDVpufferyikes lemme try and english this in terms of me just using the customfields
i set it to a bool that the customfield has my tag, it goes through the parsing yada yada because i just copy paste it
thinking then i have to find the location of it? or is it already parsed? for doing the draw effect of the lantern SDVpufferthink

brave fable
#

well if you're checking a light then you either have its id or its instance, so getting the position won't be hard

#

you could have some model for (bool, position, draw params) and key it to id if you care to, or just do it on the fly

#

my lighting setup uses custom type instances, so i just pass it the data to hold onto when i instantiate one

#

it can do whatever it likes from there

blissful panther
brave fable
#

it's a pretty minor transition haha

#

i hear a lot about it but it really just seems like int -> string

velvet narwhal
#

(i deleted my 1.6.8 folder *as an excuse to not debug my SVE-dependent mod SMCKekLmaoDog )

blissful panther
#

That's literally all it is more or less. SDVkrobusgiggle

brave fable
#

LightSource.onlyLocation is the only other interesting part but i would've figured "that the light is only shown when viewing that location" is how the game would work anyway?

#

why would i draw a light in a different location. what

rancid temple
#

Only reason I can think is so that when you transition to that area the light is already going and you don't risk any delay between arriving and it being on

brave fable
#

we aren't using fluro tube lights, they don't take that long to warm up SDVpufferfush

rancid temple
#

It would have to be a really important light for that to matter at all lmao

velvet narwhal
#

SDVpufferthinkblob honestly i like the idea of like, that subtle flicker of motion detecting lights woulda been a good project if i planned spooky season better maybe next year

brave fable
#

it'll be cool to see more custom lights. i think the only reason they were even changed going into 1.6 is cause i wanted them to flicker lol

#

so naturally i now have like a thousand lines of data and impl for flickering lights everywhere

rancid temple
#

A good portion of the mods I've made now have been because someone has been like "I want this thing" and I thought "I actually want this now too, time to make it"

velvet narwhal
#

is it hard to 'detect' where the player is in realtime? because i can now just imagine lights going out behind the player(s) as they ascend towards a spooky building

blissful panther
#

...now there's something that might be fun for MEEP. Proximity lights. SDVpuffereyes

rancid temple
#

Just get their tile position in UpdateTicked

brave fable
#

you can use vector2.distance(light.position, player.position) to find your radius

velvet narwhal
#

SMCKekLmaoDog wait

#

.q 6240

patent lanceBOT
#
#6240

@velvet narwhal #making-mods-art message Honestly I think you do actually have a special talent for ~~derailing ~~giving inspiration and motivation cause last time I ended up releasing a whole mod for 1000+ wallpapers after you asked one innocent question! :bongo_cat_heart: :VMVLmaoDog:

velvet narwhal
#

grand ideas, no brainpower to do it yet?

brave fable
#

ohh those are the quote ids. i've been seeing all these 6xxx quotes and wondering man that 6480 guy sure gets quoted a lot

rancid temple
#

Lol

velvet narwhal
#

wait aren't you a bot mod SDVdemetriums

brave fable
#

not green, not mine ☀️ (overselling it, i only did leah and jukebox)

rancid temple
#

I think Uber is a non-server-specific bot

velvet narwhal
#

ah okay

#

my tree lights are now on the backburner because i added the dictionary<string, lightsource> and i don't know what i'm going to break since i just copy pasted return Game1.currentLightSources to every path SMCKekLmaoDog

#

i now brainrot by watching youtube

brave fable
#

well it's certainly a start lol. call it bootstrapping and call it a day

iron ridge
rancid temple
#

Ah neat

floral canyon
#

Hi guys, is it possible to make a custom touch action without C#?

finite ginkgo
#

no

floral canyon
#

i wonder is .NET 8.0 used for smapi mods? I never made one

rancid temple
#

NET 6

floral canyon
blissful saddle
#

the very first tutorial guides how to make a onButton event, so it may help a lot

blissful saddle
#

for compatibility, when is the best moment to check if another mod is loaded?

lucid iron
#

usually GameLaunched

thorny tiger
#

so im using a lot of mods as references for syntax etc but im noticing that pretty much every single one breaks standard json rules of no comments and no trailing commas, i assume this isnt an issue for contentpatcher, does anyone know how i can disable these warnings on vsc?

lucid iron
#

though it depends on use case

blissful saddle
#

so it may help

lucid iron
#

yes you just store a field or prop once you check

#

mod list dont change mid playthrough

tiny zealot
#

yeah definitely don't check the mod registry every tick

blissful saddle
#

also I am not sure if the DynamicNightTime can handle times of 150 to 600, so I gonna make a local test

tiny zealot
#

(you should avoid doing anything every tick, if it is possible to avoid)

blissful saddle
#

the code is neat but very heavy

calm nebula
#

(I assume clock tick is time changed here )

#

Also I avoid doing things always just to be lazy pufferthumbsup

blissful saddle
tiny zealot
blissful saddle
#

I am used to make codes to handle millions of data, so otimizing it as much as possible is a must to me. and rechecking files/registries that may be giant is a big no in it

calm nebula
#

(for example, I still have not done the mapdisplaydevice mod thing)

blissful saddle
blissful saddle
calm nebula
#

"supposed to"

blissful saddle
#

oh, editing tools

calm nebula
#

tbh modregistry lookups are a single string hashmap lookup anyways

blissful saddle
#

this is too advanced to me right now

#

but it needs to check the registry of all mods, no?

#

even if the search is usually fast

tiny zealot
#

checking a hashmap is constant time

blissful saddle
#

ok, now I need to learn more about checking a hashmap

tiny zealot
#

the result won't change, since mods are only loaded once, so you should still cache the result like you were planning to do

blissful saddle
#

I am usually stuck checking millions of lines in data registries, what makes my applications take so much time

near sierra
#

Quick question - I'm trying to make a quest that requires the player to go to "Mona"'s grave at a certain time. However, I'm not sure how to set the condition; when I researched how to create quests, I saw that, in the raw data, all of the ones that told you to visit specific locations at specific times were marked under the "Basic" category, and seemed to be missing the condition section. How do you set this condition properly? The code is below:

{
  "LogName": "First Quest Created",
  "Action": "EditData",
  "Target": "Data/Quests",
  "Entries": {
    "{{ModId}}_131": "Basic/Investigate Mona's Grave/Abigail has alerted you to some strange happenings at this \"Mona\" person's gravestone. What exactly is going on?/Investigate Mona's gravestone at night./-1/-1/0/-1/false"
  }
}

After this, I'd also like to try making a specific new area we're adding inaccessible until you complete this quest. How would I achieve that?

blissful saddle
#

I am yet making an onGameLaunch to my fix just because I feel it is right

tiny zealot
# near sierra Quick question - I'm trying to make a quest that requires the player to go to "M...

i can't think of a way offhand to do this (complete a quest by interacting with a specific map tile at a specific time) with only content patcher. you could use When conditions and "Update": "OnTimeChange" to set the tile property at the desired time but you wouldn't be able to connect it to a custom action without a SMAPI mod to handle it.
maybe MEEP or EMP or BETAS or a similar framework could help you out

velvet narwhal
#

i don't think button has done anything in BETAS regarding tiles queries SDVpufferthinkblob

tiny zealot
#

just a guess. it has every other feature /lh

lucid iron
#

it's not that hard to make something i suppose