#making-mods-general

1 messages · Page 253 of 1

lucid iron
#

I will put multiple classes in 1 file and u will never catch me 3sCatrun

rancid musk
lucid iron
#

Once you compile the assembly doesn't have concept of files

blissful panther
#

Okay, my next mod will be formatted like:

ModEntry.cs:

public partial class ModEntry {
  // SMAPI entry.
}

ModEntryEvents.cs:

public partial class ModEntry {
  private void InsertSMAPIEventHere(object? sender, InsertSMAPIEventArgsHere args) {
    // Stuff.
  }
}

(To be clear, do not do this. SDVkrobusgiggle)

lucid iron
#

So there's not really any perf consideration with splitting stuff up to cs

#

Isn't that how erinth mods are like lol

#

The big ol partial

flat sluice
#

My code is pretty small (just adding an on/off config for SMAPI part of the mod + message warning if the CP part is installed incorrectly), plus my knowledge of C# is small enough that it barely exists... So I don't think I need to know that right now.

tribal ore
#

Is it possible to create a mod-provided token that looks like {{your-mod-id/CharacterName/Data}}? Just looking at the CP documentation right now and all of the examples are a single level deep (e.g. {{your-mod-id/Data}} )

lucid iron
#

You can give whatever string though question is more why

tribal ore
#

Because I need the anniversary date per {{Spouse}}, and spouse is dynamic

lucid iron
#

What do u get out of that / when it's not a file path

#

Just do AnniversaryDate{{Spouse}} bolbsunglasses

tribal ore
#

oooooh, better plan

#

Ok good

#

Thanks

rigid musk
#

dynamic tokens are very cool (<-i have been corrupted, this is how it ends)

lucid iron
#

Local tokens DokkanStare

tribal ore
lucid iron
#

Also the your mod id/ is prefix automatically and cant be changed

rigid musk
#

oh i wasnt talking about the tokens being used here I just meant in general... using dynamic tokens is insane and cool

#

They still confuse my brain a bit though

rigid musk
#

praise be to tokens

tribal ore
#

If I Include two .json's in my content.json, I'm assuming they are Included in the order they appear in content.json, right?

rigid musk
#

I believe they're loaded in order yes

#

if waht other people have said was interpreted properly by me anyways

tribal ore
#

I've learned a lot since starting OlderSeb, so I'm going to try to organize stuff better with OlderSam. Part of that is just having a Erase.json to null out all vanilla dialogue before including Dialogue.json

lucid iron
#

As long as you don't set a different priority

tribal ore
#

Good

marble verge
#

Is it possible to query context tags in CP? Something like "if this item has "item_bone", do X"?

brittle pasture
#

what's the context?

#

GSQs support item conditions, but the context must have a target item (or input in the case of machines) to check

marble verge
#

Could I run something like that within this block?{ "Action": "EditData", "Target": "spacechase0.SpaceCore/ObjectExtensionData", "Entries": { "{{Mod}}{{Object}}": { "CategoryTextOverride": "{{Name}}", "CategoryColorOverride": { "A": "{{Alpha}}", "B": "{{Blue}}", "G": "{{Green}}", "R": "{{Red}}" } } } }

#

Ideally, I'd have several such blocks depending on what context tag an item has.

brittle pasture
#

nope I think

#

doesnt seem to be a feature

marble verge
#

Drat. Oh, well.

brittle pasture
#

they'd have to be different items

cyan marsh
#

i am struggling on something I normally do alot

shadow pagoda
#

Question: These are the condition stated from the wiki on how to unlock the CC

the player must enter Pelican Town from the Bus Stop on a day when it is not raining, from Spring 5th onward, between 8:00 am and 1:00 pm.

This may be me being pedantic, but does the weather need to explicitly be clear, or could it snow in winter and the cutscene would still play?

brittle pasture
#

winter can have sunny days

shadow pagoda
#

yes, but that doesn't answer my question

brittle pasture
#

I know I'm getting to that lol
I think it's an event so you can open the files and see its preconditions?

#

let me check in a moment

reef kiln
shadow pagoda
#

Sleeping until winter

brittle pasture
#

looks like it has to be sunny

shadow pagoda
#

Could you tell me where you found that check?

reef kiln
#

Snow is not sunny. Not that I have ever seen that happen.

hard fern
#

in the event preconditions i would assume

brittle pasture
#

Data/Events/Town

#

wait no ignore me

#

it indeed is "not raining"

#

according to the code "sunny" checks for !location.IsRainingHere();

#

so I think snow would work because it only sets "is snowing", not "is raining"

#

also if I'm reading this right it would mean green rain also works because it's not marked as "is raining" for some reason nope it's set later

reef kiln
shadow pagoda
shadow pagoda
brittle pasture
#

Preconditions.Weather() specifically

reef kiln
brittle pasture
reef kiln
#

Never noticed, always have full sprinkler coverage by winter.

undone hawk
#

TIL that I need to update my Fishipedia since apparently you can catch Sunfish in the Pelican Town Fountain while it's raining

#

What

rigid oriole
#

is this on the wiki

undone hawk
#

No

#

It literally isn't

rigid oriole
#

i feel you might wanna verify it first lol

undone hawk
#

But I just did it with a vanilla stardew save

#

No I did it myself

rigid oriole
#

well tehn

undone hawk
#

That's why I freaked out

#

I was memeing and saying "Oh I should have wood and stone in the Fishing Hud since you can catch them in the fountain"

#

Then I caught a fish

#

In vanilla Stardew

lucid iron
#

Isn't this a bug

teal bridge
#

I suspect that this probably wasn't an intentional addition because Sunfish - that is, (O)145 - is the default fish you get from GetFishFromLocationData if it returns nothing else.

undone hawk
#

You can apparently catch other fish?

lucid iron
#

Sunfish is the default fish iirc, whenever people add fish data we always tell them to double check

#

You can definitely catch trash in there tho

teal bridge
#

So if anything was "added", it must be the fact that the fountain is actually fishable and wasn't before (if it wasn't before).

#

But really, just seems like a bug crept in.

undone hawk
#

No the fountain has been fishable for ages

#

ArgonMatrix used it in his challenge pre 1.6

#

In the video that inspired my entire mod

#

Should I... report this somewhere?

teal bridge
#

It's probably supposed to be trash, but I don't see CA dropping everything to fix that one, haha

brittle pasture
#

qq, do you still get stone or wood from the fountain

brittle pasture
#

hmm so the wiki references Town.getFish, which no longer exists, and the wood/stone thing is handled by Data/Locations now

#

I suspect it's a bug caused by the move to 1.6 location data

#

but weird, its chance is 100% though

undone hawk
#

I defo tested and got wood and stone after

#

But I did catch the fish FIRST

teal bridge
#

I'm not planning to dig into the exact reason why but it sure seems like a bug when the data looks like:

{
  "Chance": 1.0,
  "FishAreaId": "Fountain",
  "Precedence": -10,
  "Id": "(O)388|(O)390",
  "RandomItemId": [
    "(O)388",
    "(O)390"
  ],
}

I removed all the irrelevant stuff, I see nothing that could limit it like conditions. Sunfish is most definitely not on the list explicitly, and as far why it's falling through this entry, who knows.

brittle pasture
#

By "first" did you mean the very first catch of that test save

teal bridge
#

Oh, yeah, tutorial catches (first catch) are also special.

#

If it is just the first/tutorial catch, then that's known, that rule lets you catch a Sunfish in a lot of places where you aren't supposed to be able to. And if so then the fountain could work because it has explicit rules, it's not the default trash-only.

brittle pasture
#

now I'm skeptical because

  1. Gamerant is... well, not to be too mean, but they don't exactly score high in terms of journalistic integrity. I also don't see the source they linked anywhere
  2. As mentioned, tutorial catch forces you to get a fish, and it'd be a sunfish in places that otherwise don't have fish
  3. The article only mentions testing on the Switch version (also with no source/videos). For all we know the switch code for fish data is different
teal bridge
#

Honestly, for the purposes of this mod, I wouldn't worry about it. Whatever the underlying glitch happens to be, Sunfish is not in the location data for the town/fountain and isn't explicitly a catchable fish there, so it's fine if the HUD doesn't show it.

brittle pasture
#

(to add to 1, I can make a mod that makes villagers fart, send it to gamerant's email address and I guarantee you I'd get an article the next day)

lucid iron
#

Fart Framework

brittle pasture
#

The perfect companion to aedenthorn's Poop Framework

teal bridge
brittle pasture
#

that's assuming their traffic isnt also mostly bots crawling other bots

undone hawk
#

I could try to catch more than one and see if that's the case

teal bridge
tidal stone
#

[posted in wrong channel, sorry]

rancid musk
#

On the topic of fishing, I have to say that I am not a fan of being able to catch a Sunfish anywhere as long as you haven't caught a fish before. It can lead people to think "Hey, you can catch a Sunfish at this location." when you literally can't if you've already done it once.

If there's nothing in the fishing pool, just catch trash or show the user a message about not sensing any fish or something.

tribal ore
#

Would this work? Trying to target the currentPlayer

       "When": {
           "HasFlag: currentPlayer {{ModId}}_FlagName": true,
       },
teal bridge
#

I can't get too worked up about it. It's meant for new players who have no idea how fishing even works, so they probably are unlikely to draw that conclusion.

undone hawk
#

Okay testing my mod, it works perfectly with SVE and Ridgeside and East Scarp out of the box!

teal bridge
#

That is, someone who's never played and never fished before isn't even likely to be thinking about the concept of "which fish can be caught in which location", they don't even know that it's location-specific yet.

undone hawk
#

Is there a way, out of curiosity, to get what mod an item is from?

rancid musk
#

No. But most people should be including their mod id as a prefix in the item id.

undone hawk
teal bridge
undone hawk
#

Oh dang it

teal bridge
#

(You could hope for a useful prefix, but don't depend on it)

undone hawk
#

I wanted to have in my Fishipedia: "Fish added by SVE" or "Fish added by Vanilla"

tribal ore
rancid musk
#

Better Crafting and Lookup Anything at least look for prefixes to the order of {{ModId}}_ when listing that an item is from a certain mod.

lucid iron
#

Tbh the prefix of {{ModId}}_ is convention used by lookup anything

#

I think it's fine to follow

rancid musk
#

Everyone making custom items and things should use that format.

teal bridge
#

"should", hah

rancid musk
#

Yes. Should. Not are. Should.

#

lol

teal bridge
#

Isn't SVE one of the main offenders for not doing that?

undone hawk
#

I could use the convention with "Added by Unknown Mod" for anything that doesn't get caught by that?

lucid iron
#

Oh sve started doing it i think

#

At least for the new buildings

rancid musk
#

I mean, if it doesn't use the convention how are you going to differentiate it from a vanilla item?

#

I guess you could register a super super early editor and make a hash set of all keys?

undone hawk
teal bridge
lucid iron
#

What if mr ape adds MossierSoup

#

Made from 20 MossSoup

tribal ore
rancid musk
#

Compact Moss Soup

lucid iron
#

I think just trusting convention and going shrug on non conventional id is fine

teal bridge
#

(Cooking nitpick: adding soup to more soup does not make more concentrated soup, lol)

rancid musk
#

Just simmer it after gooseCook

teal bridge
#

You can reduce it, yes - but you don't need more soup for that.

uncut viper
tribal ore
#

Thank you, Button!

tender bloom
tender bloom
teal bridge
#

Very very large moss soup. "Moss Soup Cauldron"

hard fern
#

Moss soup 2: mosslectric soupaloo

dry flicker
#

Little question, i'm writing the i18n file and I was wondering if I could do something similar? if yes, how?
the example is stupid, but it's just to know if i can do it.

"Example1.Name": "Gojo",
"Example1": "{{Example1.Name}} is a man.",
lucid iron
#

No you can't do that, but you can use arguments

#

{{Example1 | Name={{Example1.Name}} }}

#

And then Example1 needs
{{Name}} is a man.

brisk wedge
#

for a c# mod, is there a way to tell if the user has another mod installed? How early in the mod loading process can I check? Specifically I'd like to show an compatibility option only when the user has another mod installed

uncut viper
#

Helper.ModRegistry.IsLoaded

#

you have it as soon as your Entry runs, so right away*

*unless you use your constructor, but why are you

tiny zealot
#

i believe you can check as early as Entry, since mods load before any of them run their entry functions

urban patrol
brisk wedge
#

woot thanks

teal bridge
#

Can't access Helper safely from there of course, just answering the "why are you" part.

uncut viper
#

an answer is good! i only asked why and didnt say dont, after all SDVpuffersquee ive considered it before too

reef kiln
#

If I want to learn c#, (and don't want to pay for it) is the Microsoft YouTube tutorials a good place to start?

uncut viper
#

you dont have to pay a single cent to learn anything programming related

tender bloom
#

Probably! Atra would rec a book maybe (library?)

uncut viper
#

many many things online for it

tender bloom
#

Do you already know other languages?

uncut viper
#

the yellow book is often recommended

reef kiln
#

Not really. In highschool I learned Basic but that was 20 years ago

uncut viper
#

i think whether or not videos or a book are better will really vary from person to person

lucid iron
#

Imo the best thing is to have a goal

uncut viper
#

so its kinda hard to answer

old edge
#

Oh no been overshadowed

tender bloom
#

I’m more likely to recommend some tutorials if you don’t really have a lot of programming background

lucid iron
#

Since we r in modding land pick a mod you wanna fo and learn along the way

tender bloom
#

Things ljke “what’s a for loop” and “what’s a variable” are good to get down before you start making a mod imo

old edge
#

Nooooo

lucid iron
#

Are u doing alright

old edge
#

Sb is out

lucid iron
#

yes DokkanStare

#

it just means i can procrastinate on me mod to play game

tidal stone
#

i love seeing new mods so sparkly and shiny

teal bridge
#

I restate my perennial advice that video is an inefficient and unreliable medium for learning to code. Plain old text-based sites are better than YouTube. If you don't have the patience to read the tutorial material vs. watching a video, you are not going to have the patience to read actual code.

#

And video just introduces a whole bunch of irritating issues like attention-splitting, inability to copy/paste or compare lines easily, poor searchability, and so on.

old edge
#

Might stop if no more players

reef kiln
#

I only really want to learn it to update some old c# mods. But was not sure where to start. For example, looking at c# mods on GitHub. I understand maybe 20% of what I see there. I do understand doing CP and .json but they are very different.

tender bloom
#

Yeah, the hard part about jumping in without some background is that there’s very little comments in a lot of mods

#

If you’ll forgive a little self-promo, I recall putting a lot of comments into More Conversation Topics

swift swan
#

Anyone knows what's the cause of this?

tender bloom
#

You’ll also want a copy of the decompile tho

#

You really can’t easily make C# mods without the game decompile at hand

swift swan
#

This was working well recently

tender bloom
#

If there’s something that isn’t making sense, you can ask where to read up more here?

#

Like the SMAPI stuff has more info on the wiki

#

And C# stuff has Microsoft docs

#

20% isn’t a bad start tbh

gentle rose
#

imo, as annoying a piece of advice as this is, one of the best things you can do for yourself as a modder is learn programming and c# for non-modders

lucid iron
#

this assets/Sprites/emotes.png is not your load target is it

uncut viper
#

GameContent.Load has never worked for mod paths

uncut viper
#

you want ModContent.Load

tender bloom
#

I guess, is the 80% that doesn’t make sense more like “idk what this variable does” or like “what am I even looking at”

uncut viper
#

thats not a load target

#

chu means an asset name

lucid iron
#

you need to actually go through content pipeline yea

reef kiln
lucid iron
#

although bc u are doing a stardewui mod

#

i would use the sprites system from there

tender bloom
#

A Microsoft tutorial sadly won’t help demystify Stardew variabkes

swift swan
tender bloom
#

They are honestly kind of a mess sometimes, partly bc we use a decompile to reference and partly bc CA built the game bit by bit and mostly by himself, so it only ever had to make sense to him

lucid iron
#

ah right i guess not bolbthinking

#

take a look at this page

swift swan
#

Alright, thanks

lucid iron
#

u can use helper.ModContent.Load but i recommend doing AssetRequested for compat reasons

swift swan
lucid iron
#

doing the first one just means it's real hard for anyone else to edit your assets

reef kiln
tender bloom
#

!decompile

ocean sailBOT
tender bloom
#

Here’s how to decompile!

#

That one’s an easy fix xD

lucid iron
#

i assume VS and Rider does this too

#

but vsc will decompile on the fly if you tell it to find definition

#

gets u here Dokkan

tender bloom
#

VS was always mad janky about that

#

I don’t use VS anymore but it seemed to hate when I tried that

lucid iron
#

really

#

vsc W kyuuchan_run

#

even so i do keep a decompiled version to ctrl f

tender bloom
#

I keep a decompiled version for find in files

#

The big sibling to ctrl F

lucid iron
#

both really

#

so yea frog dont be intimidated AquaThumbsup

uncut viper
#

i rarely ever actually open my decompile bc its rare i need to find somethin that isnt a type/member/etc or a string

#

handy to have tho

tender bloom
#

I used to read the decomp a lot when I was first modding bc I had a lot of “how in the heck does this work” questions

teal bridge
gentle rose
gentle rose
rancid musk
#

Alright. I think I've got the second row of tabs, an option to disable it, and pagination/scrolling in general working well. Running out of things I wanted to do before a proper release of this. Basically just need mod compatibility, and that's waiting for other people at this point.

lucid iron
#

can i as user reorder the tabs

rancid musk
shadow pagoda
#

I am trying to make a check of if the player saw a specific cutscene. The one where Lewis unlocks the CC. I made a postfix of the Precondition.Weather function in order to figure out what the parameter values were when that cutscene is played. I then used those same values in the Preconditions.SawEvent function like so in order to check if the cutscene was seen. But it says it's false, and I'm unsure why

GameLocation town = Game1.locations.First(l => l is Town);
bool a = Preconditions.SawEvent(town, community_center_unlock_id, new[] { "w", "sunny" });
Log($"Saw lewis cutscene: {a}");
rancid musk
#

That would require more than the bare basic GMCM integration to make a UI for, so I was avoiding that, lol

calm nebula
lucid iron
#

i hand out scope creep for free

calm nebula
rancid musk
#

I am immune to your scope creep because I already drowned in my own scope creep long ago.

calm nebula
#

And four separate groups for cookie reasons

lucid iron
#

theres a utility method too

uncut viper
rancid musk
#

You get one or two rows. With horizontal scrolling if necessary. And you'll like it.

lucid iron
#

HasAnyPlayerSeenEvent

uncut viper
#

Khloe, if I can't hold left click on a tab and physically move it around while my gamemenu is open, why should i even download it

#

(/j)

reef kiln
lucid iron
#

the next step is ofc tree style tabs you are already half way there with the right click menu \j

uncut viper
#

i also would like the tab icon to swing around in my cursor like it has movement physics so i can whip it around the screen and watch it flail until i place it down again somewhere

calm nebula
#

Khloe, can I pin tabs

calm nebula
uncut viper
#

uh

rancid musk
#

All these tab management things that aren't in a minimum viable product...

uncut viper
#

p.. physics?

calm nebula
#

Will you support plugins

lucid iron
#

she does right

#

unless plugins means something other than custom tabs

rancid musk
#

That's the whole idea, besides making the game menu less stupidly inefficient.

#

But I think atra is just memeing.

lucid iron
#

i take everything atra says 100% seriously, just vibes

calm nebula
#

I'm making jokes about Firefox tabs yes

calm nebula
reef kiln
#

Moving tabs though would be really useful as I am 100% sure mods will add them in an order I don't like. At least a config file to move them if not an in game function.

#

For example, I would want commonly used tabs before option and config menus. But if it is too much I get it. I don't understand the code so I may be asking for the moon.

dusk mulch
#

Sorry if I am being needy, just checking in.

teal bridge
#

I mean, how am I supposed to keep track of all those tabs?

#

I guess user-reordering is a bit meme-y, but, well, I did it in a similar situation.

#

If you have an open system that lets anyone pile on, you will eventually want to give users the ability to throttle it back down, although that is not necessarily an "MVP" issue.

rancid musk
#

Oh, I'm going to add re-ordering eventually. Just not immediately.

#

And there is an option to disable tabs you don't want to see.

reef kiln
brisk wedge
#

It it possible to use config values from an older version of a mod to set new ones? Like I'm making a change which replaces old config values with new ones, so the old ones won't be used anymore, so if someone updates their mod, the config is go from {old: value the user might have set} to {new: default new value} when the user loads the game, but I'd like to automatically be able to do {new: value the player might have set}

uncut viper
#

not with CP

teal bridge
#

You can do it, though it's a PITA. You'd have to maintain two models for the two different config versions, try to load the old one first using some marker to check the version, and then upgrade and resave it as new.

lucid iron
#

are you changing the key for a good reason

brisk wedge
#

I'm splitting up the old value into multiple ones for different things, kind of like a "enabled" -> "specific thing 1 enabled" and "specific thing 2 enabled", I'm in csharpt, but sounds like it's not worth the effort

lucid iron
#

ah i guess you can just keep the old field around

#

but personally just telling ppl to delete config.json is valid imo

calm nebula
#

Yeah, make the old field a {private get; set;} . This will let you migrate old configs

teal bridge
reef kiln
tribal ore
#

Anyone know if it's valid to have multiple $action commands in a single dialogue?

"Blah blah blah $action AddMoney 200 $action AddQuest {{ModId}}_Quest_Linus1"

teal bridge
#

Surprisingly I did not actually get any complaints about deleting/recreating the config when I went through with that.

#

Lots of other user-error reports like not installing dependencies and so on, but that part was OK.

calm nebula
#

"Blah blah#$action first#$action second"

tribal ore
#

Thank you!

calm nebula
#

Tbh more early game quests would be interesting

reef kiln
#

Is it possible to add colors to any crop? Like if I wanted corn to be random colors when planted just like flowers is that possible with CP. Or is that only a flower feature?

calm nebula
#

It's technically possible yes but you may need to rearrange frames

tribal ore
calm nebula
#

And I think it only works for single harvest crops

tribal ore
#

Does a quest given in dialogue repeat if the same dialogue line comes up again?

#

By default

uncut viper
#

itll just add it again yeah

tribal ore
#

Nice. I think I'll make it a yearly then

reef kiln
lucid iron
#

you can make them different color tho

#

doesnt cornucopia do it for bell pepper

brittle pasture
#

those are actually spacecore extra harvests

#

though hmm I dont see the part that blocks colored multiharvest crops

#

in the game code

lucid iron
#

it might work™️

brittle pasture
#

may not be looking hard enough

calm nebula
#

It's not that there is a part that blocks it exactly

#

It's that the mask and the regrow are both the same frame

#

You could do something with spacecore I think (have an on harvest action that sets to a previous frame, or was that DGA)

#

Tbh making them different frames via c# would also be pretty easy

#

I go back and forth on what SMD's scope is (It's defined by the term "slightly", as in "it takes minimal extra code to data-ify this")

#

I think, currently, out

#

But would be nice for a crop framework SDVkrobusgiggle

brisk wedge
#

is it ok to add compatibility in my mod for a different mod without asking that mod author for permission? Basically they add some items, and my mod affects items of that type, so I want to make my mod work on those items too. As a result, I don't refer to any of the art, but I mention the mod and the items by name in my mod

lucid iron
#

Yep it's fine

#

Although depending on what you are doing, you can do passive compatibility sometimes

#

With context tags

sudden dome
#

What programming language are mods made in?

uncut viper
#

most mods are json

#

the other mods are C#

sudden dome
#

What's the supported language officially?

native saddle
#

@golden basin love the changelog message SDVwizardXD

brave fable
native saddle
#

Fingers crossed the trees behave now

golden basin
#

the trees......

lucid iron
ocean sailBOT
#

Making mods can be broadly divided into two categories:

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

shut mountain
#

How easy would it be to change the color values of items used for dying? (ex. Change the dye color of an ancient drum from 115,41,181 to 112,40,184)

calm nebula
#

You can't do it arbitrarily

#

There are predefined colors

brittle pasture
#

look at ItemContextTagManager.GetColorFromTags

#

and yep, you can see that they are predefined

calm nebula
#

Anyways this is in scope for emc right

shut mountain
#

Sadness, but okay. Thanks

brittle pasture
#

of course if you know C# anything is possible

shut mountain
#

Well. Guess I'm learning C# SDVpufferwaaah

reef kiln
teal bridge
#

Possible, yes; practical, on the other hand...

reef kiln
shut mountain
#

I'll figure it out

#

I got nothing but time and rage on my hands, after all...

uncut viper
#

on the bright side, a patch for this is like, ridiculously easy

shut mountain
#

I figured it would be SDVpuffersquee

#

Just wanted confirmation that it was even possible, first

teal bridge
#

Just don't change the color to some totally different color that messes up the Qi quest.

shut mountain
#

I wasn't planning on it :)

#

Just changing everything (except 255) to the nearest multiple of 8

teal bridge
#

Actually I think the Qi quest uses context tags, never mind.

brittle pasture
#

qi quest checks for context tags so it's fine, patching that function just changes- yeah

shut mountain
#

Ah, well I'm not messing with context tags

brittle pasture
#

-the dye color

teal bridge
#

If in fact all you are trying to do is quantize the result and not even use arbitrary colors, then it really is ridiculously easy, you don't even need a transpiler, just a postfix.

shut mountain
#

A few will be getting substantial (and by that I mean noticable) changes tho, but it'll still be clear what color it's supposed to be

shut mountain
#

Possible ocd

#

Or just strong preferences. Not sure which

teal bridge
#

Either explanation sounds odd to me since actual perception of color is not even remotely linear.

shut mountain
#

I like seeing the numbers :')

lucid iron
#

What if dye framework

#

< zero idea what that even means

shut mountain
#

Dye framework? Tell me more?

teal bridge
#

Every mod must be a framework now.

lucid iron
#

Of course

#

I suppose a helper mod that fixes up lack of context tag misteks might be nice

#

Still i also don't really get what you are trying to achieve here chaos

shut mountain
#

Me either tbh

lucid iron
#

Where do u even see numbers

shut mountain
#

In the game? I don't, but I checked what all I can use for dying and what color those objects are on the wiki

lucid iron
#

Well you cant mod the wiki Thqnkqng

shut mountain
#

I'm not trying to

teal bridge
#

As an "Intro to C# / Harmony patching" it's not a bad choice I guess. Though hard to imagine people actually, y'know, using it.

reef kiln
shut mountain
#

Idk what I'm really trying to accomplish, but it's something to do while I wait for my laptop repairs

calm nebula
#

I can get wanting specific dye colors but multiple of 8?

shut mountain
#

It makes my brain tingle :)

calm nebula
#

Among other things, dye isn't exactly like that

shut mountain
#

Also dark blue being 0,0,139 (no red or green) while blue is 46,85,183 (yes red and green) bothers tf outta me

calm nebula
#

Dye strength is also a mechanic

shut mountain
#

Those colors are both at full saturation

reef kiln
#

Another idea for a mod, one that allows crops to be over-watered and die. But I am sure that's another c# mod. Not even sure of the specific mechanics yet, but I am sure I can't make it. 😭

shut mountain
#

That's certainly an idea

#

Unfortunately, I don't know as much about modding as 10th grade Chaos wanted to believe

reef kiln
#

Maybe make all sprinklers manually activated and if you water 2 or 3 days in a row they die. Making farming harder and more hands on would be a welcome change.

gentle rose
reef kiln
#

Getting bad luck with the rain schedule could be a disaster. Like real farming.

shut mountain
#

Saturation and brightness aren't the same thing 😭

gentle rose
#

true? doesn't change what I said though

shut mountain
#

I thought you were trying to say that having lower saturation made the color darker ;-;

#

My brain cell is not functioning right now SDVpufferwaaah

gentle rose
#

it does certainly help make the colour less obnoxious though (from 1 to 3, the colour you said is used as "blue", the same colour with 100% saturation, and the same colour with 100% saturation and no green)

#

the latter two are just not very pleasant to look at in a game

shut mountain
#

Yeah, super high saturation is almost always an eyesore

gentle rose
#

exactly. High saturation and brightness are not a good combo, so it makes sense that the brighter blue is desaturated and somewhat shifted

rigid musk
#

are the quests given during the desert festival for Skull Caverns hard coded bceOhYouStare

shut mountain
#

Not sure SDVpufferthink

gentle rose
shut mountain
rigid musk
reef kiln
#

I kind of like #3 the best. But that is just looking at a mat of the color. Not sure how it would look in game.

shut mountain
#

Bright and horrible

#

Imo

#

A few pixels here and there would be fine, but much more than that... Eh, no thanks

brave fable
#

desert festival is super hardcoded. really really hardcoded

gentle rose
shut mountain
#

I like the third one :)

gentle rose
#

(desaturating does, in fact, often increase how light colours appear btw)

shut mountain
#

Oh right 😅 My bad

reef kiln
#

#1 apparently I like bright blue. 😀

shut mountain
#

To each their own :)

reef kiln
#

#3 is more gray then a blue.

shut mountain
#

I like greyish colors

rigid musk
#

mmm yet another thing I need to clearn C# for then ... I will add it to the list

reef kiln
#

But yup. But that is probably a blue thing l. I really like blue.

#

Dreading my name changing from blue when I level up. But the next level is still blue so I have a while

fierce vault
#

Is there a cheat to run a song or track with debug?

shut mountain
#

I don't really mind the color change, and I think I've got a while as well

rigid musk
brittle pasture
#

(also before you ask, I will not be making that mod SDVpuffersquee I'm much more of a fan of carrots than sticks in term of difficulty)

rigid musk
reef kiln
#

I wouldn't ask. If someone wants they can. I was just venting that my ideas all need c#. And I have not learned it yet.

calm nebula
#

Quest type DesertFestivalMarlon

#

See data/specialorders

#

(My special orders mod should have a few in them)

gentle rose
#

who needs documentation when we have atra

rigid musk
#

lilguydance yippie thank you

ornate locust
#

Whoever wanted yellow couches, they are now out. So's the bear rug and some other stuff

dusk mulch
#

I am getting an error saying that a mod couldn't apply a patch, but I deleted the mod and it is still showing up.

rigid musk
ornate locust
#

Bear rugs for all!

brisk wedge
#

For people who make mods that have both a CP/framework component and a csharp component, is there an easy way to release or do they have to compile the csharp part then manually unzip the automatically created zip, move the files to a place with the framework component part, then zip together? Sorry if this doesnt make sense, I know literally nothing about CP and other framework mods

teal bridge
#

That Nexus Premium membership sure is paying off handsomely right now.

brittle pasture
reef kiln
teal bridge
#

That's what it feels like, yes. But downloads from anywhere but Nexus are still happily chugging along at 300+ Mbps.

ornate locust
#

Nah Nexus has been acting shit all day

#

I'm relieved it eased up long enough to get my tilesets uploaded

teal bridge
#

I think you mean "all week". Or possibly "all month".

cobalt cape
tiny zealot
#

fairly recent, i think. 4.2 or 4.3 maybe?

dusk mulch
#

@blissful panther I have figured out a way to make a conditional entry for PEEM. I don't need you to check it now

reef kiln
#

What is PEEM, it started showing up in my smapi log and no clue what it is. Not a big deal just curious.

reef kiln
#

Yup

dusk mulch
#

It is a custom version of MEEP that DecidedlyHuman made for me. (ty by the way)

tiny zealot
#

does it add map stuff that regular MEEP doesn't cover?

reef kiln
#

Something with secret notes would be a guess as it is bundled with it.

dusk mulch
#

Nevermind, I just saw the SetTilesheet entry

tidal stone
#

i did some counting ive done about 280 cards so far

#

athat means the end total will be over 1000 cards (as each cardf will have 4 variations 1 of common, uncommon, rare, and ultra rare
i want to make it where there is s percentile chance so im also thinking of doing 4 commons of one card 3 uncommons 2 rare and 1 ultra rare of eah card

dusk mulch
#

What is the Spring_town tilesheet ID?

tidal stone
#

i have a question about threads made for mod development, will you get in any sort of trouble or anything if theres a large dip between posts and updates or is it more so a place to just keep everything in one place?

dusk mulch
tidal stone
#

ig i mean more will ppl get upset with me if im not constantly posting, sorry not good with words

lucid iron
#

many people have their own threads for whatever purpose

#

but the general channel is fine for just posting about updates do whatever you like

dusk mulch
#

@ivory plume The second last example in your CP documentation for EditMap is wrong I think, since you are adding a tile you would need a SetTilesheet.

lucid iron
#

i dont have my own thread bc i just stalk other ppl's threads

tidal stone
lucid iron
#

you can make ur own thread if u get cheeto'd

tidal stone
#

just wondering if i should start one since someone asked if i planned to so they could follow my card mod

lucid iron
#

yea why not Dokkan

tidal stone
#

X3

#

~~I feel bad taking up so much of the art channel ~~

dusk mulch
lucid iron
#

one thing i dont like about threads is that you can't search in just 1 thread

reef kiln
#

Orange is such a boring color. Which is why I have not asked yet. Also, like not being considered a Cheeto 😀

dusk mulch
tidal stone
#

ive set a goal of breaking 100 unique downloads on one mod before i apply, although its also because im nervous my since my mods are just silly little replacers atm BlushTeeHee

reef kiln
#

People love replacers. A lot of people download them.

dusk mulch
#

Is there a when token for if you have read a secret note?

tiny zealot
#

i don't believe so, but there is a GSQ

dusk mulch
#

How do I find an ID for a tilesheet?

#

It is saying spring_town isn't a valid ID.

dusk mulch
tiny zealot
#

not normally, but there's at least one mod that lets you

dusk mulch
#

I already have a framework, I refuse to use more than 1 framework per mod.

brittle ledge
#

more than one framework or more than one dependency

tiny zealot
#

anyway, depending on what you need, there may be a way to use the GSQ to accomplish it, or maybe if there are side effects you could check those

brittle pasture
#

or learn C#

dusk mulch
brittle pasture
#

can you put a mail flag in the secret note

dusk mulch
tiny zealot
#

if it's a secret note that you are adding with my framework, you can run actions when it is read

brittle ledge
dusk mulch
tiny zealot
#

i don't know if that's an action, but you can easily set a mail flag and have the map edit check for that with When or whatever else

dusk mulch
#

It is an action so I will go test it out now

tribal ore
#

Is there a CP key like DayOfWeek that will just print out the abbreviated DayOfWeek? I would really like "Fri" instead of "Friday"

#

I am guessing not, but hope springs eternal

brittle pasture
#

if not you can make it yourself with dynamic tokens

tiny zealot
#

call it DyfWk /lh

tribal ore
#

Hmmmm. I didn't think of that. Good solution!

tiny zealot
#

does CP have a substring token

tidal stone
#

ok what trading cards should i do next?
Forage
Tools
Ores
Monsters
Animal Products
Artisan goods
villagers

#

ores/forged ores

dusk mulch
tiny zealot
#

no, i mean you can make up a mail flag for this purpose, if you are in control of the note

dusk mulch
#

How do I make a mail flag? I havn't done it before

tiny zealot
#

the note says "big secret reveal" and in the ActionsOnFirstRead you set a mail flag called like "{{ModId}}_GotSecretNoteDoMapNow". then your map edit uses that mail flag in its When condition, or similar

#

but if MapEdit is already an action it's probably better to just run that directly

dusk mulch
#

I want to use a mail flag, but I cant find documentation on the wiki about it.

tiny zealot
#

making a mail flag is just... picking a unique string and telling the game to add that mail

ivory plume
dusk mulch
#

oh.

ivory plume
#

(Thanks for reporting it though!)

dusk mulch
#

If so, the players will still see it in the mail page of their collectons, right?

ivory plume
#

Are you trying to add a letter? If so, yes you'd just add it to Data/Mail with your unique mail ID. But if you're just using it as a flag, it doesn't need to exist in Data/Mail.

tiny zealot
tribal ore
#

I have a set of {{ModId}}_Rain and {{ModId}}_Sun flags that bounce back and forth in my mod

tiny zealot
#

it's quirky to use mail to track assorted player/world state, but what mails a player has received is just a set of strings. any time you want a persistent bit of state, you can send a mail (mark it as "received") and it will remain there for any other parts of your mod(s) to check when needed

#

as long as it doesn't match a Data/Mail entry it will be invisible to the player

tribal ore
#

I only do it because it was easier for me to wrap my head around 😛 And because I wanted it to be "rainy" when it was also "storm"

dusk mulch
#

So... Just a trigger action refrencing a non-existant mail id?

#

My brain hurts I am so confused

tribal ore
#

Might help you get your head around it

tiny zealot
ivory plume
#

(It's not just mods, the base game does that quite a bit too.)

tribal ore
#

They are very fun to use once you understand them, so it's worth putting the time in

#

I use them as event preconditions a lot

dusk mulch
#

So like

AddMail Host {{ModId}}_24Read received
tribal ore
#

Yep

#

Received means it is registered directly. If you used "Now" and it corresponded to an actual letter id, it would make the mail icon go on the mailbox

dusk mulch
#

Finally I think I understand it

tribal ore
#

They were a huge mind bend for me, too. But I absolutely love them now

dusk mulch
#

Wait, do I need to edit the trigger actions file too?

#

(I am looking at the Older Sebastian mod)

tribal ore
#

Only if you want to set the flag with a trigger action

dusk mulch
#

Ah, okay.

uncut viper
#

(if you used Now it would show the letter icon even if it didn't match an existing id, which would be annoying for the player)

tribal ore
#

You can set mail flags in a lot of different ways

tribal ore
#

Thanks for clarifying

dusk mulch
#

Time to test it

exotic bridge
#

does a mod exist that increases the timeout period when players try to join in multiplayer?

#

I've found whenever I try to play multiplayer with fairly large modpacks, if the other players take too long to join the game they get disconnected with the following error: [game] Failed to send message (k_EResultLimitExceeded). Closing connection. All the searching I've done hasn't gotten me anywhere.

ivory plume
#

I don't think that's a timeout; that's an error from the Steam client when too much data is sent over the network at once. Increasing the timeout likely wouldn't help unfortunately, since it'd still same the same amount of data within the same number of network messages.

#

If it's consistently related to the number of mods installed, it may be due to SMAPI trying to sync the mod data to other players. SMAPI currently just syncs data as JSON strings which isn't very efficient; maybe it could switch to protobuf or something.

exotic bridge
#

could I potentially work around this issue by trying to launch the game not through steam?

ivory plume
#

You could try connecting through the GOG multiplayer servers instead. To do that, get the normal invite code but replace the S at the start with G.

exotic bridge
#

I'll try that out. thanks.

dusk mulch
#

How do I get a tilesheet ID? Whenever I put in a tilesheet to add a tile to a map in a JSON it says it doesn't exist.

#
                {
                    "Position": {
                        "X": 29,
                        "Y": 27
                    },
                    "Layer": "Buildings",
                    "SetTilesheet": "spring_outdoors.png",
                    "SetIndex": "87"
                },
            ],
#

(Partial)

ivory plume
#

You need to use the tilesheet name set in the map file (not the asset or file name). One option is to use Lookup Anything with tile lookups enabled in its config:

dusk mulch
#

That's a bit dumb but okay, ty!

ivory plume
#

(It's how the base game works, and it's necessary because the asset/file name isn't necessarily unique. You can have multiple tilesheets with the same asset/file name, but they each have a unique ID.)

wicked plover
#

What can I use to add a new structure to the game?

sour sleet
#

Is there a way of having a random music track out of say, 3 from the game in a custom location?

#

Like, I want it to play a random spring song in spring, random summer song in summer etc

lucid iron
#

what do you mean by structure?

lucid iron
sour sleet
#

I know it's under Track, but I don't know how to choose a random one out of a few

ivory plume
lucid iron
#

this is a list, just add more musics

#

control the edits per season with cp when

exotic bridge
tidal stone
#

should itry and make a concernedape themed stardew valley trading card? or are there rules against that

sour sleet
tidal stone
#

fo the mod

brittle pasture
sour sleet
#

Thank you bothSDVpuffersquee

wicked plover
#

{ "Format": "1.0", "Music": [ { "Name": "CustomLocationMusic", "Tracks": [ "assets/music1.ogg", "assets/music2.ogg", "assets/music3.ogg" ], "Randomize": true, "Locations": [ "Custom_Location" ], "IsIndoor": false } ] }

Like this? @sour sleet

brittle pasture
#

uh, no? where did you get that from

wicked plover
#

I can't think clearly.

lucid iron
#

ah yea condition field

#

i suppose you can also check SEASON in there Dokkan

fierce vault
#

Hi, when adding a small map patch, does it go in the home category in the content json?

"Home": [
                        {
                            "Id": "",
                            "Location": "",
                            "Tile": {"X": , "Y": },
                            "Direction": "",
                            "Condition": ""
                        },

I'm having trouble finding out exactly how to load in patches to a vanilla, but maybe I missed something when reading through the maps wiki section? I not 100% sure how to specify where the map should patch either.

latent mauve
#

Home specifically is for the NPC starting locations

lucid iron
#

your tiles are missing numbers

fierce vault
#

Ok, so I'm not sure where to add in a patch that doesn't have to do with the npc then

fierce vault
lucid iron
#

map patch is something else entirely, EditMap

fierce vault
#

I haven't written it yet

latent mauve
#

If you're just adding an area to a map, you use EditMap

fierce vault
#

Like:

{
            "Action": "EditMap",
            "Target": "Maps/Custom",
            "FromFile": "assets/Maps/custom.tmx"
        },
latent mauve
#

The Target should be an existing Map.

#

So if you've not used "Action":"Load" to create a map at Maps/Custom, that won't work

#
    "Action": "EditMap",
    "Target": "Maps/Trailer",
    "FromFile": "assets/Maps/TrailerBedroom.tmx",
    "FromArea": {"X": 0, "Y":0, "Width": 7, "Height": 11},
    "ToArea": {"X": 0, "Y": 0, "Width": 7, "Height": 11}    
}```
#

Here's an example changing Penny's room in the Trailer

fierce vault
#

Oh thank you! I couldn't find specific enough information on the wiki

#

Or clear cut examples from the mods I was looking inside

latent mauve
#

No problem, I just dug into my WIP Zelda NPC mod, I've got examples of most CP code blocks in there somewhere

fierce vault
#

I wonder if I missed something in the wiki, or if I should have read other documentation to figure it out. It's stuff like this that stumps me, because I can't find formatting examples for some reason.

orchid glade
#

If there are multiple mods that add a character with the same name, would they all conflict, or does each have an id linked to their mod id?

fierce vault
#

Oh, that is what a mod ID is for I believe.

#

I'll send a wiki link that explains a little further

fierce vault
orchid glade
#

Ahh so I take from that, it depends if the people who wrote the mods chose to add the mod id or not 😉

#

Thanks! (I'll have to check the individual mods involved)

fierce vault
#

As long as your npc has a unique internal name (Mod ID), I'm pretty sure that you should be able to avoid basic conflict with other npcs named the same thing. Good luck!

dusk mulch
#

What are all of the types of items?

sour sleet
#

Umm so my custom location isn't even loading for some reason. SMAPI is erroring with "is Data/Locations valid?" I'm going a bit mad

#

I usually Load custom locations in but I'm doing it differently this time by editing location data

dusk mulch
#

Can you send the JSON?

#

You need to load your map first

sour sleet
#

In locations.json or content.json?

dusk mulch
#

Your choice, load your map into Maps.

sour sleet
#

Thanks. I should have seen that lmao. I need to sleep

dusk mulch
#

No worries, make sure to take care of yourself

fierce vault
#

I did something very wrong

[Content Patcher] Unhandled exception applying patch: My Mod > EditMap Maps/BusStop.
StardewModdingAPI.Framework.Exceptions.SContentLoadException: My Mod loaded map 'assets/maps/WSF_BusStopEdit.tmx' with invalid tilesheet path '../../Content (unpacked)/Maps/spring_outdoorsTileSheet'. Tilesheet paths must be a relative path without directory climbing (../).

This is only part of the Smapi log. I think I messed up specifying the location, because I wasn't entirely sure what to put in. Here is what I did:

{
            "Action": "EditMap",
            "Target": "Maps/BusStop",
            "FromFile": "assets/maps/WSF_BusStopEdit.tmx",
            "FromArea": {"X": 19, "Y": 1, "Width": 6, "Height": 2},
            "ToArea": {"X": 1, "Y": 1, "Width": 6, "Height": 2}    
        },
dusk mulch
#

!tilesheetclimbing

ocean sailBOT
#

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

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

fierce vault
#

What do I do for that? I removed the tilesheet from the maps folder so it could look for the vanilla one instead

dusk mulch
#

Okay first off you want to remove the ToArea.

fierce vault
#

Oh

dusk mulch
#

Then go into the map TMX file and send a screenshot of that

dusk mulch
#

Sorry I misunderstood, keep the ToArea

fierce vault
#

Ok

uncut viper
#

if you read the tilesheet climbing governor command it tells you how you can fix it

fierce vault
#

I think I may also have an issie with the x and y coordinates...

dusk mulch
#

What mod can I look at for an example of custom furniture?

fierce vault
#

I only sent part of the log.

dusk mulch
fierce vault
#

ok, sure

uncut viper
#

nothing about your map will have been loaded because of the tilesheet climbing, so any other errors about yuor map edit are irrelevant right now

#

that said, if you dont intend to place your 6x2 map edit in the top left ish corner of the bus stop, then you do have coordinate issues, but theyre unrelated to the errors

fierce vault
#

I fix the first thing, then I'll add more about the second issue, thanks

brave fable
fierce vault
#

Well, I have zero errors now, but can't find my patch edit, so It's definately not loaded in properly

uncut viper
#

your FromArea is telling Content Patcher to go to tile x19, y1 inside your BusStopEdit.tmx
then its drawing a rectangle 6 wide and 2 tall, with x19 and y1 as the top left of that rectangle
it is copying that 6x2 rectangle from your tmx into the BusStop, with the bus stop's x1, y1 coordinate as the top left

fierce vault
#

Oh, first part sounds about right, so I must have messed up where it draws from the bus stop

uncut viper
#

right now you're putting it in almost the very very top left

#

bc thats where x1 y1 is

fierce vault
#

So, what I need to do is add the exact same coordinates up top to the: "ToArea": {"X": 1, "Y": 1, "Width": 6, "Height": 2}

#

Right?

latent mauve
#

Your ToArea should be the place on the vanilla map where you are placing the top-left corner of your patch.

fierce vault
#

Right, I'll try and run it again

latent mauve
#

It is worth noting that 1,1 on the BusStop map is likely not where you think it is, as it uses ViewportClamp and may prevent some of the map from being visible in game.

dusk mulch
#

For furniture, if I set the rotations to 1, will the player just not be abled to rotate it at all or will it just rotate once?

latent mauve
#

(you can either use debug ppp when standing in a spot to find out its exact tile coordinates on the map, or use something like Debug Mode or Lookup Anything to check a specific tile)

brave fable
#

4 is the number of facing directions, so 1 will mean no rotations

brave fable
#

i use 4 here since if you look at the data/furniture asset you'll notice all chairs use 4

#

i cant words today

fierce vault
brave fable
#

do you happen to be playing with stardew valley expanded

fierce vault
#

It is not currently in my game. I remove my stardrop mods manager folder which contains all my big mods before testing my own, so I don't know what's going on

latent mauve
fierce vault
#

So, instead of reading the coordinates in tiled, I should get them directly from the game with debug right?

latent mauve
#

for that map, it will be easier, yes.

#

That way you can make sure that the spot you're picking is visible in game

fierce vault
#

Ok, I'll try it out

#

Ok, so the in game coordinates actually have the same coordinates as the tiled map does. The top left of the visible ingame map is x:10 y:0 so it doesn't count them differently. I'm at a loss. The coordinates I put in look right...

dusk mulch
#

Do I need to use EditImage for furniture?

#

Like EditImage it into Tilesheets/Furniture?

brave fable
#

nope, that's not really recommended. you just need to add some new Action: Load, Target: {{ModId}}_MyFunnyFurniture in one changes entry, and then include {{ModId}}_MyFunnyFurniture as the texture name in your furniture data in index 9:
https://stardewvalleywiki.com/Modding:Furniture

#

again, open up data/furniture, press ctrl+end, and see that all the new furniture includes a texture name for their new spritesheets

fierce vault
#

Could it be that when I edited out the tilesheet climbing error that a wrong space in the tiled document could be rendering this whole thing obsolete?

latent mauve
#

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

fierce vault
#

I actually got some stuff in the smapi log. I send a slightly edited version of the relevent portion for privacy

dusk mulch
brave fable
#

i mean they need to be wrapped in quotes too but i cant have all the fun for you

dusk mulch
#

I think we have a VERY different meaning of "Fun"

uncut viper
#

actually, they dont

latent mauve
#

(Please note that any and all furniture tilesheets, including custom ones, assume a SpriteIndex grid of 16px. Your SpriteIndex must align accordingly for any relevant Data/Furniture entries.)

uncut viper
#

json keys will work without quotes in newtonsoft as long as they dont have spaces

gentle rose
#

is newtonsoft aware of what json usually is? /lh

#

actually, does json even have an official spec SDVpufferthinkblob

fierce vault
#
   [Content Patcher] Unhandled exception applying patch: MyNpc > EditMap Maps/BusStop.
   StardewModdingAPI.Framework.Exceptions.SContentLoadException: Failed loading asset 'assets/maps/WSF_BusStopEdit.tmx' from SMAPI/parcysnippet.NPC: an unexpected error occurred.
    ---> System.Exception: Unable to load map with file path '/Users/ME/Library/Application Support/Steam/steamapps/common/Stardew Valley/Contents/MyComputer/Mods/[CP] Custom NPC 4/[CP] Custom/assets/maps/WSF_BusStopEdit.tmx'
    ---> System.NullReferenceException: Object reference not set to an instance of an object.
      at TMXTile.TMXFormat.LoadTileSets(TMXMap tmxMap, Map& map)
      at TMXTile.TMXFormat.Load(TMXMap tmxMap)
      at TMXTile.TMXFormat.Load(Stream stream)
      at xTile.Format.FormatManager.LoadMap(String filePath) in D:\GitlabRunner\builds\Gq5qA5P4\1\ConcernedApe\stardewvalley\NPC\xTileSource\xTile\Format\FormatManager.cs:line 122
      --- End of inner exception stack trace ---
      at xTile.Format.FormatManager.LoadMap(String filePath) in D:\GitlabRunner\builds\Gq5qA5P4\1\ConcernedApe\stardewvalley\NPC\xTileSource\xTile\Format\FormatManager.cs:line 134
      at StardewModdingAPI.Framework.ContentManagers.ModContentManager.LoadMapFile[T](IAssetName assetName, FileInfo file) in /home/pathoschild/git/SMAPI/src/SMAPI/Framework/ContentManagers/ModContentManager.cs:line 258
      at StardewModdingAPI.Framework.ContentManagers.ModContentManager.LoadExact[T]

I can send the other relevant part if needed because the message was too long for discord

gentle rose
#

!log

ocean sailBOT
#

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

Please share your SMAPI log file. To do so:

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

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

fierce vault
#

Also I'll show the content json portion again

latent mauve
#

iro, they intentionally only sent the snippet because of privacy concerns

gentle rose
#

ah, I see

dusk mulch
#

Yay I got my item in game! My first decoration!

gentle rose
#

the smapi log website anonymises most paths now

uncut viper
#

i was gonna say i remember reading somrthing about path anonymization

fierce vault
#

I'm sorry if it is hard to parse through this

gentle rose
#

so you should theoertically be fine to use it

fierce vault
#

I only got that notif of the website before I posted the log snippet

#

I have the other error portion I can send if that helps

latent mauve
#

There's probably a little bit more information in the Trace for that error

#

(hit Trace and then look for something about the TMX file on the SMAPI log page)

fierce vault
#

I followed your exact template in the content json

uncut viper
#

its the tmx thats the problem, it seems to me

latent mauve
#

Yeah, the code shouldn't be at fault here, it's the actual Tiled TMX file

uncut viper
#

something with your tilesheets

latent mauve
#

Most likely you've got an invalid character somewhere in your tileset source

fierce vault
#

If I send the portion I edited of the tmx to stop the climbing error would that reveal anything?

latent mauve
#

Considering that your edit should have removed the path entirely?

#

It wouldn't have any privacy issues

uncut viper
#

i assume you'd see if it did

fierce vault
#

Uh oh

latent mauve
#

Did you just open the TMX without putting the tileset PNGs in your mod folder? xD

#

and get all the red Xs?

fierce vault
#

I think think the portion I thought I deleted is still there...

<?xml version="1.0" encoding="UTF-8"?>
<map version="1.10" tiledversion="1.11.1.1" orientation="orthogonal" renderorder="right-down" compressionlevel="0" width="6" height="2" tilewidth="16" tileheight="16" infinite="0" nextlayerid="17" nextobjectid="135">
 <properties>
  <property name="Fall_Objects" value="T"/>
  <property name="NPCWarp" value="22 8 Desert 18 27"/>
  <property name="Outdoors" value="T"/>
  <property name="Spring_Objects" value="T"/>
  <property name="Summer_Objects" value="T"/>
  <property name="ViewportClamp" value="10 0 35 30"/>
  <property name="Warp" value="44 22 Town 0 54 44 23 Town 0 54 44 24 Town 0 54 44 25 Town 0 54 65 22 Town 0 54 65 23 Town 0 54 65 24 Town 0 54 65 25 Town 0 54 9 22 Farm 79 17 9 23 Farm 79 17 9 24 Farm 79 17 9 25 Farm 79 17 -1 22 Farm 79 17 -1 23 Farm 79 17 -1 24 Farm 79 17 -1 25 Farm 79 17 -1 26 Farm 79 17 11 6 Backwoods 49 30 11 7 Backwoods 49 30 11 8 Backwoods 49 30 11 9 Backwoods 49 30"/>
  <property name="Winter_Objects" value="T"/>
 </properties>
 <tileset firstgid="1" name="outdoors" tilewidth="16" tileheight="16" tilecount="1975" columns="25">
  <tile id="150">
latent mauve
#

ah

fierce vault
#

I removed the pathing to the pngs or so I thought

uncut viper
#

did you remove the image source entirely?

latent mauve
#

They did

uncut viper
#

like, the whole line?

latent mauve
#
    <image source="spring_outdoorsTileSheet" width="400" height="1264" />
    <tile id="150">```
#

This is from the vanilla BusStop tmx, you HAVE to have an image source in there

#

You can repair it by adding that <image source> part back in

fierce vault
# uncut viper like, the whole line?

I thought I did but this was still there...

 <tileset firstgid="1" name="outdoors" tilewidth="16" tileheight="16" tilecount="1975" columns="25">
uncut viper
#

that is not the image source

#

and you need that

#

<image source =...> like in lily's code there

fierce vault
fierce vault
latent mauve
#

In the future, when we say to remove the path from the image source, we mean specifically if you've got <image source="../../../spring_outdoorsTileSheet" then it needs to become <image source="spring_outdoorsTileSheet">

uncut viper
#

you need to add back what you deleted earlier but without the extra path stuff as lily says

#

otherwise there is no image at all for your tilesheet

fierce vault
#

Oh, so I deleted too much

#

I don't remember which line to place it unfortunately

latent mauve
#

Yep, if you don't have the extra stuff in front of the tilesheet/tsx name, then it will automatically act as a relevant path and look inside Stardew Valley's Maps folder for the vanilla file.

#

My code blocks shows where it goes exactly

dusk mulch
#

jeez i spent an entire day developing 1 patch of code 😭

latent mauve
fierce vault
#

Ok

#

I'll test it now, and update you on the results

mint sinew
#

so i haven't played Stardew for a while, i kinda dabbled in attempting to do stuff, and now i come back and find that things like XNBCLI aren't as much of a thing anymore? All I want to do is make one singular hairstyle edit, but i have no idea how to use content patcher lmao

latent mauve
#

Content Patcher has a lot of documentation, and there's also converters that exist!

#

!converters

fierce vault
#
[Content Patcher] Unhandled exception applying patch: NPC > EditMap Maps/BusStop.
StardewModdingAPI.Framework.Exceptions.SContentLoadException: NPC loaded map 'assets/maps/WSF_BusStopEdit.tmx' with invalid tilesheet path '../../Content (unpacked)/Maps/spring_outdoorsTileSheet'. Tilesheet paths must be a relative path without directory climbing (../).

Still this error, and it added that there were several a boolean errors as well, which likely aren't in the content json

latent mauve
fierce vault
latent mauve
#

Also if you are for some reason opening and resaving your map file to a new folder (particularly if you're using Save As), then don't do that

#

It'll just break it again

fierce vault
#

I have not used save as on this file

latent mauve
#

okay

#

Just making sure, because some people don't realize that it's better to copy/paste your TMX to your mod folder after editing if you are editing within the unpacked Maps folder.

#

Because saving it directly to the mod folder from Tiled will break all your relative paths.

fierce vault
#

this is what it was supposed to look like?

<image source="spring_outdoorsTileSheet" width="400" height="1264" />
latent mauve
#

Yes

fierce vault
#

That is the edit I made

latent mauve
#

Then you may have missed one somewhere or you didn't edit the one in your mod folder.

fierce vault
#

I did edit the mod folder one. I'm not sure what's wrong with the tmx

latent mauve
#

If you want more direct help, you could send me your TMX -- I can edit it straight in a text editor without needing any of the extra tilesets you may have added, if that's a concern. My DMs should be open.

#

This is kind of tricky to help solve without the full logs/JSON and possibly screenshots of it in Tiled otherwise, LOL

fierce vault
#

I'm sorry that helping me with this problem has been so time consuming. I can send over the entire tmx code if you want.

#

Or the tmx itself i guess

latent mauve
#

might as well just send the TMX if you're gonna send over the entire code anyway

fierce vault
#

sure, I'll try and figure that out.

latent mauve
#

I don't mind taking a closer look, I'm currently bashing my head against a shop code because my brain refuses to remember how to format it. LOL

#

Coding with brain fog is not the wisest thing I've done, but I'm stubborn. SDVpuffersquee

fierce vault
#

I'm not sure how to send the doc over through dm?

latent mauve
#

should be able to just drag the file into the message window

fierce vault
#

Oh, let me try that

#

It will let me upload to mods general, but I don't see to message it to you directly

#

I should be able to dm non friends?

latent mauve
#

can't send a file on the first message, gotta open/initiate the DM first. I DMed you to start it off. 😛

#

I believe we figured out the issue, there was a dupe tileset and that one didn't have the updated image source.

shut mountain
#

Does anyone know where I can find this in the game's files?
StardewValley.Menus.TailoringMenu::GetDyecolor

uncut viper
#

thats a C# qualified name that tells you exactly where to find it

shut mountain
#

I don't speak C# SDVpufferwaaah

uncut viper
#

in the Menus namespace in the TailoringMenu class, method GetDyeColor

#

do you have ILSpy?

#

or your game decompiled?

shut mountain
#

No, but I have an xnb unpacker

#

Will that be helpful?

uncut viper
#

wont have anything to do with the C#

#

!decompile

ocean sailBOT
shut mountain
#

Install stuff for Windows, Linux, or macOS. Feck.

#

Guess that'll have to wait ;-;

uncut viper
#

are you on a secret fourth option

shut mountain
#

Is there a secret fourth option? Like maybe Android?

#

Cuz the piece of absolute garbage that is my laptop is getting repaired

uncut viper
#

i wouldnt recommend doing modding work on an android but i guess i cant stop someone

#

but if theres any options for decompiling and reading a dll on mobile, i dont know it

shut mountain
#

That's enough to stop me

#

Same, and I lack the patience to try

#

Sigh. I hate not having a properly functioning laptop

latent mauve
#

RIP, I have to release an update for Pelican Valley Loft Apartments because Baldur's Village decided to use the same exact spot as me for their Mountain patch, despite releasing after my mod (BV has been out for less than 2 weeks).

uncut viper
#

what does them releasing after have to do with it

also entirely unrelated question: are event commands case sensitive?

latent mauve
shut mountain
#

Not a clue and not a clue

#

Never mind, that makes sense

brittle ledge
#

generally the etiquette in the community is that the later mod adjusts their patch

latent mauve
#

Also that, yes

brittle ledge
#

but the devs aren't in the EN community, I don't believe

brittle ledge
uncut viper
#

the wording just gave me the impression that the thought is they like, shouldnt have chosen that spot or something, is all, but if that wasnt the intent then no worries

brittle ledge
#

I'm not 100% sure but NPC names are, Button.

uncut viper
latent mauve
#

They're also incompatible with the other mod that I already coded an exception for, Button, so it's not just my mod that they've created an incompatibility with.

brittle ledge
uncut viper
#

i get that, but i dont think a mod author really has a 'responsibility' to care?

latent mauve
#

And people like to go bother me to change my map instead xD

shut mountain
#

Um... Why?

brittle ledge
uncut viper
#

idk to me its just the wording of like "theyve created an incompatibility" that seems harsher than it needs to be, like its an intentional act of mod destruction and not just... someone making a mod

brittle ledge
#

it also saves you some headache by not having to deal with "hey X mod overlaps with your mod, fix nao plz"

shut mountain
#

"An incompatibility has been unintentionally created"

latent mauve
#

Not intending to be harsh about it, I'm not even mad, it's just a "oh, that's kinda annoying" 😛

uncut viper
#

like i said, if that wasnt the intent then its fine, its just how it came across when i read it at first

brittle ledge
latent mauve
#

I'm also a little concerned that even if I code the exception, because it's also incompatible with the other mod, if BV goes in and changes it themselves to my alternate location to fix compat with the other mod, we're back where we started with problems. LOL

brittle ledge
#

I doubt they will tbh

dusk mulch
#

I am trying to think how I can make SITW better...

shut mountain
#

What's SITW? 😅

dusk mulch
#

Shop In The Woods

shut mountain
#

Ah. Yeah I got nothing :')

dusk mulch
#

I got an idea!

shut mountain
#

What is it?

#

(Genuinely curious)

dusk mulch
#

Add warp totems and some types of food to the shop as you get further down in the skull cavern

shut mountain
#

Does the shop appear in the skull cavern?

dusk mulch
#

No.

#

I have another mod for that

latent mauve
#

okay, the brain fog is real, how do I tweak my When condition for HasMod |contains= to mean either of a specific mod rather than an and?

uncut viper
#

comma separated after the contains=

latent mauve
#
    "HasMod |contains=holaitsed.foragefruittrees, BaldursVillage.BVCP":true
  }``` is this right?
shut mountain
#

I forgor SDVpufferwaaah

uncut viper
#

correct

latent mauve
#

thanks, that'll save me some time.

dusk mulch
#

Does a when entry need a boolean at the end?

shut mountain
#

I think so...?

#

Don't take my word for it tho

uncut viper
#

it depends

dusk mulch
#

For a true/false.

uncut viper
#

i believe content patcher will convert a string into a boolean as necessary

#

so true and "true" both work

latent mauve
#

okay, so, next question, because I forgot how semver works. For an update that is only fixing a compat issue, is that a 2nd or 3rd decimal increase on version number? xD

#

I know 3rd decimal is 'bug fixes'

#

Does enabling compat count? xD

uncut viper
#

bugfixes are typically the last one

dusk mulch
#

I think you need some sleep lol /lh

uncut viper
#

i type slow

#

i would increment it for compat

latent mauve
#

I'll sleep when this code is done, LOL

shut mountain
#

What time is it where you are? >_>

latent mauve
#

2 am

shut mountain
#

Same

uncut viper
#

"fixing a compat issue" sounds like it goes in the "fixed things" decimal to me SDVpuffersalute but ofc its always just up to you

#

semver is after all just a suggestion

vernal crest
#

Oh this is adjusting for BV release? Yeah I would put that in bugfix.

uncut viper
#

speaking of fixes, as im going thru my own code im realizing that damn, a lot of the event commands on the wiki list parameters as required when they are very much not

#

makes my work slightly more annoying to do

vernal crest
#

I fixed some of those when I did my update but I am unsurprised to hear there are more

uncut viper
vernal crest
#

I also want to check what commands actually do accept string facing directions now because I discovered that the initial setup and advancedMove both complain if you don't use numeric direction. And I expect there are probably more.

uncut viper
#

isnt advancedMove just a special case bc it has to handle both movement and directions in the same argument space

#

Move, FaceDirection, WarpFarmers, AddTemporaryActor, and LoadActors accept strings for sure

vernal crest
#

Probably, but I wouldn't have expected the initial setup to have a problem with them

uncut viper
#

legacy code SDVpufferthumbsup

#

if it aint broke dont fix etc

#

all the ones i just listed use ArgUtility.TryGetDirection though

#

but those are the only ones that do

#

but those are also the only ones i can see that use a direction parameter at all on the event page

#

also ignore LoadActors

calm nebula
#

Late but advance move and move use two different movement engines

vernal crest
#

Ok cool thanks Button. I just didn't want to go in and add another exception for advancedMove and then find out afterwards there were more exceptions that I could've bundled into one edit.

uncut viper
#

advanceMove is currently a pain in my ass trying to figure out how to properly parse it

rancid musk
#

If it ain't broke don't fix it
This is proramming. It's more like
If it ain't broke you're unaware of where it's broke.

calm nebula
#

Advanced move is the better of the two

uncut viper
#

i dislike it solely bc its annoying me right now

#

i need no rational reason for command hatred

vernal crest
#

I keep having to use advancedMove because move won't play nice for me.

uncut viper
#

i am probably just gonna patch its command handler instead

vernal crest
#

I was just trying to have Hiria and my farmer move simultaneously (but with different start times) and Hiria threw herself off a cliff SDVpufferpensive

uncut viper
#

was she okay

shut mountain
#

Oh dear

vernal crest
#

Yes she's very resilient 😌

uncut viper
#

am i correct in assuming that advancedMove can have an endless number of groups of 2 ints

vital kite
#

hi

#

how downlaod mod in stardew valley mobile?

vernal crest
#

Can't speak to whether it's endless, but there's no hard limit that I am aware of.

mint sinew
#

i return having learned a little bit of coding with one of those annoying errors i hear everyone who attempts programming always encounters.
So i've managed to create the necessary files, but whenever I try to run the game with the homemade mod, it keeps telling me there is no "hairstyles.xnb" file and therefore can't overwrite it. The path I've made for the target is "Character/Farmer/hairstyles" which I... assume is the right one?

fossil osprey
ocean sailBOT
#
Android SMAPI

There is an unofficial port of SMAPI for Stardew 1.6 to Android. Please see the wiki instructions for more information.

IMPORTANT: This is a highly experimental build and may be prone to glitches, bugs, or incompatibilities. We are not able to provide support if you run into trouble or compatibility issues; please use the discord linked on the Android SMAPI github.

Do not harass mod authors to make Android specific compatibility patches.

vital kite
old edge
#

NOOOOOOOOOO

uncut viper
#

this server does not support or condone piracy

latent mauve
#

We will not support pirated copies of the game.

shut mountain
old edge
#

hello

mint sinew
#

ohhhh

vernal crest
vital kite
vernal crest
shut mountain
#

It's the only one I saw

old edge
#

you need the official version to mod the game

shut mountain
#

I think there's another tho

vernal crest
latent mauve
#

This is how I did my hairstyle test mod (for adding hair instead of replacing):

  "Format":"2.4.0",
  "Changes": [
    {
      "Action": "Load",
      "Target": "Characters/Farmer/FRL_Hairstyles",
      "FromFile": "assets/FRL_hairstyles.png",
    },
    {
        "Action": "EditData",
        "Target": "Data/HairData",
        "Entries": {
            "86001": "FRL_Hairstyles/0/0/true/86001/false",
            "86002": "FRL_Hairstyles/1/0/true/86002/false",
            "86003": "FRL_Hairstyles/2/0/true/86003/false",
        }
      },
  ]
}```
mint sinew
vital kite
vernal crest
mint sinew
#

it's... literally only 10 bucks on steam rn

vernal crest
#

It's 40% off right now, go buy it.

mint sinew
#

wait, is the FromFile meant to be the png?

vernal crest
#

Yes

mint sinew
#

facepalms
that explains a lot

#

thanks man!

latent mauve
#

My example is if you decide to add new hair and not replace the old ones, in case you ever decide to try that route. 🙂

vernal crest
#

FromFile always refers to a file in your mod folder that you're wanting to add to the game's content

fading walrus
old edge
#

It's $5 on google play I think

shut mountain
#

6 or 7

mint sinew
shut mountain
#

I got free play pass for 3 months tho

fading walrus
#

Regional pricing varies of course, but the game is generally very cheap, especially with the sales, yeah

shut mountain
#

It's worth the money imo

vital kite
vernal crest
#

I love my phone and I love Stardew but I cannot imagine wanting to play Stardew on my phone lol

shut mountain
#

I can't wait to get it on Steam

fading walrus
#

I bought it on sale myself, in the country I bought it in, it worked out to like... 2 dollars? Which is still very affordable for that country

#

We love steam regional pricing in this house

vital kite
latent mauve
#

Okay, I think we should switch topics.

fading walrus
#

Won't be saying it again

vital kite
latent mauve
#

How much insanity am I bringing upon myself if I decide to support the major expansions (SVE, RSV, ES, Sunberry, etc.) for a planned mod where Leah can be commissioned for the 'spouse' portraits even if you aren't married to that NPC? xD

ocean sailBOT
#

@latent mauve You leveled up to Rancher. That's level 250. Woot!

vernal crest
#

So much lol

#

I hope after all that work on your Zelda overhaul you feel like doing one million more years drawing

latent mauve
#

I have SVE's coded in already, just knocked those out along with the vanilla NPCs

uncut viper
vital kite
old edge
#

defintely no way to mod the game like that so have to buy it. I bought it on google play and Steam so far. I don't have it on my ipad yet though.

latent mauve
vernal crest
#

Oh if you're not drawing them, not that much?

vital kite
uncut viper
#

only gotta do that once, though

latent mauve
#

You could not pay me to do that much pixel art after I finished the Zelda mod sprites. xD

#

So it's definitely gonna be pre-existing portraits only

vernal crest
uncut viper
#

just spawn the portraits in with cjb cheats and look at their id with LA

old edge
#

mostly I bought it so I could make android compatibile mods.

shut mountain
#

You couldn't pay me to do pixel art at all 🤣

latent mauve
#

I also don't want to run into issues with turning NPC assets from other mods into portrait items if there are closed permissions. Better to just avoid it and use ones that the mods already add in themselves.

old edge
#

is it much difference if I have a mod for pc and will it work yet in android?

shut mountain
#

Depends on the mod. Most of them probably will

old edge
#

stil haven't attempted since last time it was tmxl toolkit was needed but now that android smapi has been updated has anyone tried making a mod?

shut mountain
#

I've made a few rudimentary attempts 😅

#

Nothing much tho

latent mauve
#

At recent count, I have completed 52 portraits and 46 spritesheets for the Zelda NPC mod. I'm gonna be so burned out on character art.

#

I have 3 character spritesheets to go and 0 portraits to go. (yes, I know the math says I have 3 more characters, but those are gonna get added later at this point)

mint sinew
#

now i have clipping issues with the pixel art itself because it's too floofy sigh
is it possible to get around that somehow?

old edge
#

I wonder if FarmTypeManager and Spacecore work for android smapi.

shut mountain
#

They do!

#

Source: I use them

vernal crest
mint sinew
#

how does fashion sense work?

vernal crest
#

🤷

shut mountain
#

Not on Android 💀

#

So I couldn't tell you

vernal crest
#

Follow instructions, end up with FS mod?

mint sinew
#

ah...

vernal crest
#

I feel relatively confident that I could make an FS mod but farmer clothing and other bits do not interest me at all so I have never had reason to try.

shut mountain
#

That's 100% valid

vernal crest
shut mountain
#

Oh, if only I knew how to do pixel art that looks decent 🥲

mint sinew
#

hoo boy this looks complicated

#

guess i'll take a stab at it anyway

shut mountain
vernal crest
#

It's important to note that to make a Fashion Sense mod you're not using Content Patcher at all so I suggest making an entirely new mod rather than trying to edit what you've got so far to fit Fashion Sense.

#

Even the manifest has to be different.

shut mountain
#

I stand corrected

vital kite
#

Can NPC images be changed by deleting their original images?