#making-mods-general

1 messages · Page 379 of 1

uncut viper
#

minified and on one line

#

which is how parsers for languages where whitespace doesn't matter read it

#

so comments would still be allowed in there

#

the block style anyway

wanton pebble
#

... I hope I never have to read a minified Json then

#

That sounds awful to read/parse

lucid iron
#

I mean u just format it with whatever editor first

wanton pebble
#

how would you do that, chu?

lucid iron
#

This is for shipping off to endpoint

wanton pebble
#

Genuine question because it might be helpful formatting wise

lucid iron
#

Uh depends on the editor

uncut viper
#

yeah minifying is for saving bytes in your final file sizes

#

bc the whitespace adds up

lucid iron
#

I have format on save enabled in vsc so i just save and that's it

uncut viper
#

N++ has a Prettify Json plugin

#

In json tools or something

lucid iron
#

From software pov they r equiv and the places to add space and newline for reading is well defined

wanton pebble
#

Yeah I know about the whitespace adding up thing for pretty much any file, unfortunately SweatSmileIan (Long story, shared work file was 100 MB, got it down to under 1 MB by killing whitespace/blank cells that had somehow been added and I confirmed with work it was blank)

wanton pebble
lucid iron
#

Imo vsc has much better json support than np++

uncut viper
#

that is a fuckton of blank cells lol

lucid iron
#

And it's not locked to vsc official u can use vscodium

uncut viper
#

I think npp is lower support in everything

#

but anyway I'm on mobile and can't really troubleshoot well on here so someone should probably help them figure out their location issue

lucid iron
#

It's windows exclusive anyway i don't think about it existing much

brittle pasture
wanton pebble
#

I had to actually confirm they were blank and not going to lose any data before I did it

#

And I was just like "what.... the.... fuck...."

#

Anyway, update, Json Viewer -> Format Json does it, but it removes comments

timid helm
#

So does anyone know why it’s saying it’s invalid?

lucid iron
uncut viper
#

Your MapPath is wrong

#

replace Locations with Maps

#

And change the load target to match

#

the fact that they don't match is why it's erroring actually but they should probably be in maps anyway

#

the one in your log is different

timid helm
#

And again, the first location is working fine

lucid iron
#

This isn't a real path on disc

#

It's a name you gave to the loaded map

uncut viper
#

The Target is made up

#

it's just that a lot of things rely on it being "Maps/" specifically

#

regardless, your MapPath and your Target for the beach cave don't match anyway

timid helm
uncut viper
#

line 71 and line 79 do not match values

timid helm
uncut viper
#

the problem is they don't match

#

so, make them match

timid helm
#

I’m an idiot

#

It’s working now, thanks for your help. Sorry it took so long to understand, it’s my first time making a mod

uncut viper
#

everyone was at one point making their first mod, nothing to apologize for

timid helm
#

Is it normal for a warp to not be working but not show up in the SMAPI console?

uncut viper
#

for that you probably do want to start with a patch export of the map to make sure your warp is there

uncut viper
#

patch export YourMapAssetHere in your console

timid helm
uncut viper
#

MMAP or BETAS maybe, or a minecart system if the NPC wasn't gonna move

lucid iron
#

how does night market person work

#

hardcoding?

uncut viper
#

Yep

left nova
uncut viper
#

makes you use a farm totem

gentle rose
#

-# can you start an event, change map and immediately end the event?

lucid iron
#

that's hitme's suggestion right

gentle rose
#

ah

#

sorry hitme SDVpuffersquee did not backread

lucid iron
#

but yea if u were doing this with mmap it is a map action question dialogue and then warp

timid helm
lucid iron
#

the warp is perfectly ordinary

uncut viper
#

interesting verbiage. when is MMAP going to add an unusual warp?

lucid iron
#

it has some

#

for going into buildings (instanced) which r funny

golden basin
left nova
#

And changeLocation is in Modding:Event

brittle pasture
golden basin
#

dang so no work around at all

brittle pasture
#

woops
3. your When is inside Entries

#

there's no workaround to a game limitation itself

#

maybe you can nerd snipe one of the resident framework modders

golden basin
#

id hate to bug ppl so much

brittle pasture
#

@ chu @ button

#

hmm I wonder if just reseting the cached override season is sufficient
not sure how the tilesheets are handled

#

I would help but I don't have a map mod and I'm also cooking linner (lunch/dinner aka my one daily meal) rn

lucid iron
#

ill look as soon as i defeat mac inlining again

#

ig it should ideally be a traction?

#

GameLocation.seasonOverride = null should force reload

uncut viper
#

if its something thats more of a "bug" of sorts in the base game and is to be looked at in 1.6.16, im less inclined, even though i know thats potentially a ways away

lucid iron
#

what do you want it for

golden basin
#

I wanted my custom location to have different seasons from pelican town

#

To give the illusion of being across the world

lucid iron
#

but they still need to change?

golden basin
#

Yeah

lucid iron
#

there's a few ways to imply it i think

uncut viper
#

that said knowing not really anything about the issue bc i dont really understand what it is, if its a problem with sometihng not being properly invalidated when the overlying asset is, that seems like something that SMAPI could fix too, isnt it? hasnt SMAPI handled similar stuff before?

lucid iron
#

like special seeds that only grow where u are

obtuse wigeon
#

If you don't have crops growing there you could bodge job it by renameing the spring tilesheets to fall, summer to winter, etc?

lucid iron
#

tilesheets

golden basin
#

It's ok I can wait for a fix pathos told me he would look into it

rocky copper
#

Looking through the decompiled FarmAnimals.cs at where the HappinessDrain is used, and I see where it gets subtracted, but if I'm understanding this correctly, it also looks like it gets added under certain circumstances:
this.happiness.Value = (byte)Math.Min(255, this.happiness.Value + Math.Max(5, 30 + happinessDrain));
I'm experimenting with an alternative for the Auto-Petter, with the idea that my mod would conditionally lower the HappinessDrain on certain animals to 0. Would that not work? I know some custom animals, including ones I've made in the past, just never added a number to the happiness drain and they gained friendship just fine.

whole raptor
#

I did, while I'm not a fan of AI dialogue mods, I don't really have anything against them for the most part

uncut viper
#

yeah seems to also control how much happiness is gained when an animal is tucked in at night or when its full of food

whole raptor
#

(I was slightly confused when I first saw it for sure tho)

rocky copper
uncut viper
#

i only looked at one function actually it does seem used for petting too, and if there IS a heater in the winter it gets added as well

#

petting has a default amount in addition to the happinessDrain value though so they still get some

#

so yeah thats my interpretation of the c ode too

rocky copper
#

Interesting...

bleak spade
#

Does anyone know how to figure out what specifically is clashing between two mods to make a game crash?

whole raptor
#

!mh

ocean sailBOT
#

For help with modding issues, please ask in #1272025932932055121! When asking for assistance there, sharing an error log will help others identify your issue (see https://smapi.io/log for instructions).

ivory plume
#

(New in the upcoming Central Station 1.5.0: a variety of travel related decor you can buy from the gift shop.)

rich tapir
#

hello, im making a content patcher mod and it's not working in a lot of different ways, can someone please help me

timid helm
#

Custom warp randoamly stoped working, and there is nothing about it in the SMAPI log?

rich tapir
#

nothing in the SMAPI log and he's in town square, his sprite's warpy and he isn't moving, following his schedule, he's not even in the friendship tab, i can't talk to him or gift him either

urban patrol
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.

rich tapir
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.

urban patrol
rich tapir
#

patching it into a vanilla map for now

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.

rich tapir
urban patrol
#

that reply was to another user, don't worry about it. also please visit the link in governor's message to upload your jsons there

rich tapir
#

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

urban patrol
rich tapir
#

oh i did that, it says it's valid

urban patrol
#

this is so that i can easily read your json, not to validate it

urban patrol
#

!npc it looks like you're using an outdated tutorial to add your NPC. dispositions isn't used anymore. check out any of these resources governor will link you to after my message

ocean sailBOT
#
Creating a Custom NPC

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

rich tapir
#

thanks ill check the new links

urban patrol
#

good luck, feel free to come back here if you have any more questions

rich tapir
#

ok

gleaming cave
#

I’m trying to add some cooking recipes that allow the use of any of a specific “kind” of ingredient—example: if the recipe calls for “butter,” you could use regular butter, goat butter, margarine, etc. But since there’s no “butter” category—unlike for something like eggs—and since I’m not sure if it’s possible to create my own categories, I opted to use SpaceCore for its ability to override cooking recipes to allow the use of context tags in place of ingredients.

This works, but the issue I’m having is that the description displayed on the cooking/collection pages is wrong. Anytime I use SpaceCore to override a recipe, the description changes from the item’s actual description (which is what I want) to just the name of the item. See the screenshot for what I mean.

Does anyone know if there’s a different way to tackle this problem, or if there’s something I’m missing with SpaceCore that’s causing this issue? Thanks!

uncut viper
#

iirc thats just an issue with spacecore

gleaming cave
#

I thought that might be the case. Is there another way to achieve the same result?

uncut viper
#

not as far as i know, unless you want to create separate recipes that are identical except for the specific butter used

timid helm
urban patrol
#

did you change your location names at all? what does the warp map property you added say?

gleaming cave
timid helm
urban patrol
#

can you share that please

urban patrol
#

and the warp from entrance to beach cave was working before?

timid helm
#

Yes

urban patrol
#

do you remember what you changed since you last saw it working

timid helm
#

There was a bunch of directory climbing issues and the game asking if it’s data for that map was invalid and I fixed those, I think that was it

urban patrol
#

i can't see anything wrong with your code besides that maps are usually loaded to Maps/{{ModId}}_Name instead of Locations/{{ModId}}_Name, but i don't think that's your actual issues if your locations are fine. are you able to debug warp to the beach cave?

urban patrol
#

in the SMAPI console type debug warp YourModIdWrittenOut_PrairieIslandBeachCave

timid helm
#

Yes, that works

urban patrol
#

ok good

#

since i don't know why the way you add a warp via CP isn't working, and since it's a custom map, i recommend opening up your entrance map in tiled and adding the warp via map properties instead. if anyone else has advice on what went wrong though you should listen to them

timid helm
urban patrol
#

did it display the same behavior you're seeing now?

urban patrol
timid helm
#

Would I just make a maps folder in the mod’s folder,

rich tapir
#

hi, uh nic, i need help, the npc is working more but two issues, it says it can't find the portrait and the dialouge files

tender bloom
#

I wouldn’t be surprised if something depends on maps living in Maps/ though I don’t know of anything offhand

uncut viper
#

your folder structure literally does not matter at all once its loaded into the game

urban patrol
uncut viper
#

as long as your FromFile points to an actual file it can be literally anywhere inside your mod folder

urban patrol
rich tapir
#

it does

#

also one of the things in the new tutorial made me make a blank.json and that is also messing things up

uncut viper
#

a blank.json is not going to mess things up unless it was done incorrectly

timid helm
urban patrol
# rich tapir it does

ok, please send your json using the site again and also a screenshot of your files inside your mod folder. as for the blank json, make sure it's a file with only {}inside of it

uncut viper
urban patrol
#

targets, despite looking like file paths, are imaginary locations. in some cases you can literally load something to FluffyUnicorn and it won't matter. in this one specific instance of Maps though i believe the game depends on the data you load living inside of Maps/YourNameHere

rich tapir
#

also i added the {} to my blank.json

urban patrol
#

button can probably explain targets better than me

uncut viper
#

no, thats pretty much it

#

the games vanilla set of Targets match the Content folder bc thats just how it works but you can load to wherever

rich tapir
#

that's my directories and i also sent my content.json

#

but i did fix the blank.json to have {}

urban patrol
#

quick heads up, you can type {{ModId}} instead of having to type out Rabegi.RobertMod each time, since CP automatically converts it

uncut viper
#

Rishant, you should also send a log and your Robert.json

#

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

gentle rose
#

(unrelated to either conversation, but can maps use tilesheets from the Mods/ folder without ATA? I assume not but just wanted to make sure)

uncut viper
#

sorry, your Robert.json inside data

#

assets/data/Robert.json

gentle rose
#

not mods/ folder, mods/ asset path, sorry

timid helm
uncut viper
#

in vanilla, a tilesheet path must have no directory whatsoever UNLESS its using something nested deeper than Maps, like Maps/Mines

rich tapir
#

the robert.json in data is the npc Disposition

gentle rose
#

nice, ty for confirming

uncut viper
#

thats the entire purpose of the content pipeline and content patcher

#

you are making that target exist

#

otherwise, Locations/YourLocationWhatever wouldnt exist either. where would that even come from?

lucid lily
#

what modding software do you guys prefer? im currently using Asprite, Tiled, & Visual studio Code... just want to know if theres anything better out there

rich tapir
#

i use visual studio and libresprite

urban patrol
rich tapir
#

okay, i looked at the errors in smapi, something is wrong with the dialougue

uncut viper
#

you still have not shown us the errors

#

or the data/Robert.json

rich tapir
#

okay wait

#

that's my content .json

#

that's the data/robert

urban patrol
#

i suspect that trying to make the NPC spawn inside the farmhouse will be problematic

rich tapir
#

no that's not the problem

#

the problem is with the dialogue

#

that's what smapi said

#

it works in the farmhouse he spawned in there fine

urban patrol
#

okay, please send the dialogue and the SMAPI log

uncut viper
#

you still have not shown us the errors

urban patrol
#

!log use the instructions here

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.

rich tapir
#

that's the dialogue file

#

wait let me open smapi so i can share the smapi log

uncut viper
#

this dialogue file will not work at all. its not a patch

rich tapir
#

huh

urban patrol
#

every file you include needs an action

rich tapir
#

well, this is the thing
[Content Patcher] Ignored Robert Mod > Include assets/Dialogue/Robert.json > invalid: must set the Action field.

urban patrol
#

such as "Action": "EditData", which is what you need to do to edit the dialogue

rich tapir
#

there is an action

uncut viper
#

Rishant, in the future, please use the log uploader as directed by the governor command

rich tapir
#

okay

uncut viper
#

there is no Action inside the dialogue.json you sent

#

also No-Document you need to not include the Format line in an Included file

urban patrol
#

no, files that are included should not have format, but they should have changes

rich tapir
#

OHHH

uncut viper
#

ignore the validator sayingf that

#

it does not know its an Included file

#

do not add the Format line to an included file

rich tapir
#

what's the target

uncut viper
#

Rishant, you need to add an actual EditData patch like data/Robert.json

#

the target will be the dialogue Target you loaded the blank to

urban patrol
uncut viper
#

in this case, Characters/Dialogue/Rabegi.RobertMod_Robert

urban patrol
#

i keep jinxing you button sorry haha

uncut viper
#

its fine!

rich tapir
#

do i have to have entries or no

uncut viper
#

it must be a valid EditData patch

rich tapir
#

i think i do

uncut viper
#

an EditData patch cannot exist without either Entries or Fields

#

otherwise, where would you put your entries

#

like, your dialogue lines

rich tapir
#

okay let me try opening smap

#

smapi*

#

i added the entries and edit data stuff

timid helm
urban patrol
#

and are you seeing an error in your log

rich tapir
ocean sailBOT
#

Oops, couldn't parse that file. Make sure you share a valid SMAPI log.

uncut viper
#

Rishant, you need to include the whole log as the governor command and log uploader says

rich tapir
#

like even the loaded mods section

urban patrol
#

do not copy paste, just upload the file

uncut viper
#

the instructions tell you to upload the entire file

rich tapir
#

how do i upload it

urban patrol
#

however in this case that error is telling you exactly what the problem is. it found "Edit Data" but expected "EditData". take out the space

timid helm
uncut viper
#

1. Drag the file onto this textbox (or choose a file):

rich tapir
#

oh

#

let me try again

#

button where is the file

uncut viper
#

please read the instructions at the top of the log uploader page as it is dependent on your platform

rich tapir
#

ok

urban patrol
rich tapir
ocean sailBOT
#

Log Info: SMAPI 4.3.2 with SDV 1.6.15 build 24356 on Microsoft Windows NT 10.0.19045.0, with 5 C# mods and 1 content packs.
Suggested fixes: One or more mods are out of date, consider updating them

rich tapir
#

the npc works but there was an error

rocky copper
#

I'm sorry if this is a dumb question, but when starting a new C# project, am I finding a .dll in the Pathoschild.Stardew.ModBuildConfig NuGet package or do I need to turn that package into a .dll?

uncut viper
#

no, you just reference it with Nuget and it gets put in your .csproj and will just work

rich tapir
ocean sailBOT
#

Log Info: SMAPI 4.3.2 with SDV 1.6.15 build 24356 on Microsoft Windows NT 10.0.19045.0, with 5 C# mods and 1 content packs.
Suggested fixes: One or more mods are out of date, consider updating them

uncut viper
#

(that was for Harrison)

rich tapir
#

okay

rocky copper
#

Reference it as a .nupkg?

rich tapir
#

oh wait, he doesn't gain frienship and his schedule isn't working

uncut viper
#

Rishant, did you previously have a version of Robert that didnt include your Mod ID?

rich tapir
#

yes

storm tulip
#

Hello guys i can't make my mod DLL because the executable stardew valley.exe doesn't allow me to do, even on administrator mode, don't know why, is there a way to fix it?

uncut viper
#

does this warning occur on a new save?

rich tapir
#

thats why i got help from nic

#

let me check

iron ridge
urban patrol
#

oh wait

urban patrol
#

did you ctrl F for locations and change it to maps?

rocky copper
rich tapir
#

okay everything works in a new save

iron ridge
#

you just choose the package

uncut viper
timid helm
urban patrol
#

the patches at lines 38 and 66 need to be editing Data/Locations

iron ridge
#

[[Modding:IDE_reference#add-nuget]]

rich tapir
#

it's working now

urban patrol
#

maps and locations are distinct from each other

rich tapir
#

thank you nic and button

#

bye

urban patrol
#

however i unfortunately have to go so if someone else would kindly walk you through maps vs. locations that would be grand

royal stump
storm tulip
royal stump
#

ah, yeah, I've had issues with that store's files being overly locked down SDVpufferthinkblob
I'm not familiar VSC, but I imagine you could copy the whole game folder somewhere else & target it with your project, if nothing else works

storm tulip
#

i can copy the entire game folder except the exe lol

timid helm
royal stump
#

SDVpufferdizzy if you can't even copy it, I guess you'll have to mess with Windows file permissions on it

uncut viper
#

(parantheses instead of braces)

timid helm
#

Any ideas as to why the game isnt adding the water effect on tiles that have the Water property set to true?

uncut viper
#

is your location an outdoor location?

#

or at least TreatedAsOutdoors

timid helm
opal tendon
#

did I do something wrong here?

lucid mulch
#

At a glance that doesn't look wrong though the indentation on the second and third patches { hurts

humble timber
#

yeah lol

eternal glade
#

does anyone know whats causing this? [game] Event script error: Common Language Runtime detected an invalid program.
[game] In event #festival_winter8 for location Temp
[game] On line #10: specificTemporarySprite iceFishingCatch
[game] Error running event script #festival_winter8 on line #10 (specificTemporarySprite iceFishingCatch).
InvalidProgramException: Common Language Runtime detected an invalid program.
at StardewValley.Event.addSpecificTemporarySprite(String key, GameLocation location, String[] args)
at StardewValley.Event.DefaultCommands.SpecificTemporarySprite(Event event, String[] args, EventContext context) in D:\GitlabRunner\builds\Gq5qA5P4\0\ConcernedApe\stardewvalley\Farmer\Farmer\Event.Commands.cs:line 1810
at StardewValley.Event.tryEventCommand(GameLocation location, GameTime time, String[] args) in D:\GitlabRunner\builds\Gq5qA5P4\0\ConcernedApe\stardewvalley\Farmer\Farmer\Event.Commands.cs:line 307

#

im going into the ice festival and after the competition i just immediatly get teleported home, no judgement from lewis

royal stump
#

generally that error type means a broken Harmony transpiler

#

(or other lower-level stuff that generates un-runnable code)

calm nebula
#

That or mobile

royal stump
#

makes sense, though I haven't had to run into that yet SDVpufferlurk

opal tendon
#

its not showing up in game since I added the the third line SDVpufferwaaah

urban patrol
royal stump
#

(the {} spacing doesn't affect functionality, it's just a formatting nitpick SDVkrobusgiggle)
uploading to https://smapi.io/json might help, but I see nothing wrong with the setup there

humble timber
#

(yeah generally most ppl like to keep the brackets on the same indentation level, like so)

#

maybe not the best example now that im looking at it, just randomly grabbed smth from my recolor :P

opal tendon
#

thank you I figured it out and fixed it ❤️

storm tulip
#

guys i wanted to make a mod that lets profession increase speed by 0.1x>1x(configurable) each level, with the dependency fast animations but i can't make the DLL

#

because the exe archive denies it and no matter what i do

brave fable
#

unfortunately i haven't got a clue what you're doing hahah

#

oh i see, skill levels increase animation speed from 100% to 200%

brittle pasture
#

did you make a C# mod following the instructions on the wiki and/or are you editing an existing mod

brave fable
#

still, have you written the mod already, or just having issues compiling? what's the 'exe archive'?

storm tulip
#

yes i did it already

#

i just cant do the DLL because trustedinstaller doesn't let me make vscode access the exe archive of stardew from microsoft store

#

i have a github and i can share if yall want

tiny zealot
#

what is trustedinstaller and why do you need to use it? typically we use the .net sdk (dotnet) to compile our mods

storm tulip
#

net sdk 6.0 i mean

tiny zealot
#

are you using pathos's ModBuildConfig nuget package?

wanton pebble
#

you might want to specify more - I think a lot of people here use Windows for C#, but don't know what "TrustedInstaller" is

storm tulip
brave fable
#

mm, trustedinstaller is a windows feature

#

figures it'd show up in a microsoft store managed folder

storm tulip
#

yes

#

i can't even copy the folder with the exe

#

it lets me copy the entire folder except the stardew valley.exe

tiny zealot
#

well, the .dll is the file you really need for e.g. decompiling, so maybe that's fine?

brave fable
#

this is possibly a silly question given how long i've been making mods, but why do you specifically need the exe? shouldn't the modbuild package be referencing the stardew valley DLL anyway? what's the build output in the console?

sleek pelican
#

I have a question, didn't find any thread related to it, but, does anyone know of any mod that just gives you a massive expanse of land for the farm? Think something along the lines of 4 corners but each space is of the size of the standard farm

storm tulip
brave fable
#

we just make the mods hahah

sleek pelican
#

Do you guys do commissions?

storm tulip
#

the readme of my mod explains what my mod do, can i post it here?

brave fable
#

!modcommissions

tiny zealot
#

!commissions but i'm fairly sure i've seen an enormous four-corners-like farm

ocean sailBOT
storm tulip
brave fable
#

so how are you compiling the mod? dotnet build? what's the console output?

storm tulip
#

yes

#

it is dotnet build

#

i cant make the dll

#

but i was giving instructions to copilot and he made the coding

brave fable
#

so what's the console output when you run the build

storm tulip
#

lemme see

brave fable
#

i'm not familiar with building directly via dotnet for vscode, nor have i ever used the microsoft store to run into this issue in the first place

#

but someone might be ☀️

storm tulip
#

Falha inesperada da tarefa "ResolveAssemblyReference".
System.UnauthorizedAccessException: Access to the path 'C:\XboxGames\Stardew Valley\Content\Stardew Valley.exe' is denied.
at Microsoft.Win32.SafeHandles.SafeFileHandle.CreateFile(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options)
at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocati
onSize, Nullable`1 unixCreateMode

#

i can't make the dll because of microsoft basically

brittle pasture
#

I'll be honest this sounds like whatever vibe code you got acting up

#

have you followed the wiki guide to get a basic button press mod up and running

storm tulip
#

no i didn't lol

#

but im trying to make it with copilot (no joke)

brittle pasture
#

pls do it and come back

#

!chatgpt also

iron ridge
#

Following the instructions instead of ai probably hallucinating the instructions is far better of an idea

brittle pasture
#

!chatgptcode

ocean sailBOT
#

Please stop trying to get ChatGPT to write your C# mods for you, especially if you don't know how to write C#. It won't work without heavy editing, and it wastes everyone's time.

Large language models fundamentally are reguritating something from their input—which is roughly speaking, the written output of humanity up until 2021 or so, for ChatGPT. For specific, niche topics like "is this framework going to do what I want" or "which things does Game1.cs have access to", it probably has no idea! But it's good at detecting that people in the past have....said things about frameworks and written things in C#, so it does its best to assemble words and symbols into a nice order for you. Sometimes it tells you true things, and sometimes it tells you false things, and if you can't detect when, you're in trouble. When you're writing code, this usually produces garbage, because you can't be "sort of similar", you have to be exactly correct or it won't work.

storm tulip
#

i forced copilot to learn it tho

brave fable
#

i can't even imagine what kind of code it's cooking up to try and integrate with someone's niche stardew valley mod

brittle pasture
#

...by telling it to patch Stardew Valley.exe?

iron ridge
storm tulip
#

but i actually readed somethings

#

i just can't make the dll because of that

#

microsoft problem

brittle pasture
#

pls just follow the wiki guide and get a button press mod actually load in game

storm tulip
#

i didn't load any mod bro

#

im trying to assemble the files into the dll

brittle pasture
#

if you don't and it fails with the same errors, well that's helpful too

storm tulip
#

System.UnauthorizedAccessException: Access to the path 'C:\XboxGames\Stardew Valley\Content\Stardew Valley.exe' is denied. explains it all

spring gull
#

https://docs.google.com/document/d/1jlaweFaWlkVkJqtRZ4KzUITITJ8_deqDi0Ci1TrYQbA/edit?tab=t.0 -- my idea/plot doc, wip, only for one out of the like 10 npcs i would add, but im very proud of it so far as a writer :)

#

oops sorry yall are talking haha

brave fable
rich tapir
#

im making a content patcher custom npc mod and i have a problem, my npc will just go through walls to get to where it needs to, do you have to add pathfinding?

tiny zealot
rich tapir
#

i don't have custom maps yet, i made it spawn on my farm and then it just wen through the building wall and now i don't know where he is

tiny zealot
#

oh, NPCs can't be on the farm. big no

rich tapir
#

like i made him spawn in the farmhouse

#

oh

humble timber
#

i
isnt that the problem, p sure npc pathfinding on the farm is.
ok yeah

#

LOL

rich tapir
#

i was just testing it

#

he does work though

#

after 10 hours of trouble shoots

tiny zealot
#

just pick almost any other map, lol (not Backwoods, that one is also verboten)

rich tapir
#

shooting*

#

okay

#

bustop is fine right

tiny zealot
#

yep

rich tapir
#

k

humble timber
#

i'm finally diving into tiled hell. send moral support SDVpufferrise

hard fern
#

good luck

brave fable
#

tiled is fun & relaxing. just keep all your files in one folder, use normal layer names, snap to grid, don't copy tiles between files, never use save-as, ..

velvet narwhal
#

don't color outside the lines--don't copy from other maps' tilesheets if you already embedded that tilesheet--

humble timber
#

actually what's considered easier to make, an indoor or outdoor map SDVpufferthink

brave fable
#

oh definitely an indoor map, since you don't need to write IsOutdoors

#

huge time savings there

humble timber
#

noted
will keep working on this interior then

velvet narwhal
#

Water
Outdoors
Fish
Do you want artifacts? Hell

humble timber
#

sweats nervously ahhaahahahaha i totally don't want a museum with artifacts or anything

#

thats down the line tho.

opal tendon
#

where is bug meat I need to make it bread

brave fable
#

in bugs, mostly

#

check Maps/springObjects and Data/Objects

#

you'll probably also want to update the Bug Steak to be some kind of wonderful pull-apart roll

velvet narwhal
#

a bug fruit roll-up

rich tapir
#

i want to make my npc spawn on a tile but i don't know the exact tiles of every map, is there like a website with pelican town with coordiantes or something

velvet narwhal
#

Tiled shows you x/y coords

brave fable
# humble timber thats down the line tho.

definitely for now just pick a map that's reasonably similar to what you're after, load it into the game as-is for your new map to be sure it works how you like, and then worry about repainting the tiles and map properties

rich tapir
#

of stardew vanilla?

iron ridge
#

When you open the vanilla maps yes

rich tapir
#

okay

velvet narwhal
#

anything, really, so long as you have the correct tilesheets and tmxes in the same folder so they can grab whatever's necessary

opal tendon
rich tapir
#

um i've never used tiled or any tile editor

velvet narwhal
#

if you cbf, if you have farm type manager, opening the game and it's what, whereami shows the x/y coord that you're on, in smapi

brave fable
#

you really don't need FTM, you can just type debug ppp to find your current tile

velvet narwhal
#

idr the vanilla command KEK

brave fable
#

(short for print player position)

rich tapir
#

okay

brave fable
opal tendon
#

hmmm I found the bug steak but not the meat

royal stump
#

lately I just use Lookup Anything with extra info and press F1 on the tile SDVkrobusgiggle

#

though it's awkward with objects etc

brave fable
#

bugmeat looks like this 🧠

#

hope this helps

opal tendon
#

ty lol

halcyon nest
#

another progress shot of the farm I’m working on!

#

I would’ve done more but I got distracted

#

HOLY COW IM FANCY

opal tendon
#

I finally found it

#

now the question is

#

would a clump of dough or chunk of bread be better for the meat itself SDVpufferthinkblob

hard fern
#

probably?

#

oh

#

uhh

brave fable
#

yeah maybe

hard fern
#

perchance

opal tendon
#

indeed

tiny zealot
#

i guess dough, since you have to get the recipe to "cook" it into something edible

#

however, counterpoint: it's funny if the bugs drop fresh hot bakery rolls

brittle pasture
#

on the other hand you don't cook bug meat into bug steak, you craft it

hard fern
#

its like slamming raw meat together to make a burger patty

#

but like, idk you can't just kill bread to get dough

#

bc it's already cooked

brave fable
#

see i would've said dough simply because the sprite would probably end up more legible, not sure how you'd make a readable chunk of bread

tiny zealot
#

once again i have made myself think about odin sphere, where enemies literally drop hot cross buns and they emit steam sitting on the ground waiting for you to pick up and consume them

brave fable
#

just a lumpy beige glob is fine

hard fern
#

SDVpuffersweats huh?

opal tendon
#

I am thinking maybe bread crumbs for bait, ball/clump of dough for bug meat, fish shaped bread for wild bait, and monkey bread* for bugsteak maybe?

tiny zealot
#

(odin sphere is a perfectly normal game where you plant seeds that grow into sheep. also the main characters struggle against an inevitable ragnarok, but focus on the main thing please)

inland rain
#

Cat wearing farmer's green shirt

halcyon nest
#

THAT’S SO CUTE-

hard fern
#

are you gonna turn the entire valley into bread

opal tendon
#

but theoretically most things will be food or books by the time I am done

hard fern
#

😔 i have to defeat my enemy: elliott

#

why is he so hard to write

#

i hate writers

#

and poetry

rigid musk
#

because writing

cobalt gust
#

i went to finally go look at updating my mod to 1.6 and see a page on the wiki for a 1.6.16 version

#

when is that supposed to be coming? should i wait

hard fern
#

uhhh it's "coming" but not really something to worry about atm (as in, the release date is unknown)

cobalt gust
#

my mod significantly uses harmony so

#

it's kind of a pain to update

brave fable
#

it's fine to update your mods now i think, keep in mind that 1.6 had a year-long alpha period

cobalt gust
#

i was active during that time, just too lazy to update

torpid sparrow
#

Hello, does anyone know how the parrot express works? And how I could go about adding an additional stop?

lucid iron
cobalt gust
#

has anyone yet made a good way to modify Data in c# mods

#

without content patcher

hard fern
cobalt gust
lucid iron
cobalt gust
#

i was hoping someone made a wrapper around asset requested that handled the boilerplate

torpid sparrow
#

rats

lucid iron
#

You can make your own asset too AquaThumbsup

#

For special data

torpid sparrow
#

oh well less work for me

lucid iron
#

But imo everyone's desire with asset edit is different once looking at it from C#

tiny zealot
#

wren has been doing a codegen thing to make asset handling easier but i don't have any more details than that

cobalt gust
#

my 1.5 solution was to have a key/value replacement where value was my modified data string e.g Galaxy Soul/200/-300/Crafing -2/..., but my understanding is that in 1.6 this is all json right?

tiny zealot
#

assetrequested is already quite lean, if i'm honest. i'm all for shortening stuff i do all the time but it might be best to just have your own version of that

cobalt gust
#

is working with json easy here?

tiny zealot
#

many more things are data models now, but not all

lucid iron
#

Oh yeah u can load complex models from a json if u want

tiny zealot
#

for editing vanilla data model assets you can look at StardewValley.GameData to see what the types are and have classes for editing them

lucid iron
#

This one's my asset so i can just load the default data from a json

#

But ofc for vanilla I'd want to not load over whole thing

cobalt gust
#

this is more along of what i'm looking for

#

do you know if anyone's built something that only updates the vanilla asset using the keys present in your json?

#

basically only updating a single data attribute of a whole object without replacement

tiny zealot
#

sounds like content patcher, tbh

cobalt gust
#

minus content patcher :p

tiny zealot
#

or a fairly simple foreach keys

cobalt gust
#

it would be a simple foreach but if someone already made something small with nice ergonomics i don't want to reinvent

lucid iron
#

I don't think so tbh maybe suggestion for wren source gen eventually

#

And if it was stuck in someone's core mod i would still not reference it just for something like this

cobalt gust
#

it would be more like a <50 line class that could be copy pasted

#

i'll put one together myself

tiny zealot
#

i would just write it, yeah. we've already spent longer than it would have taken you

cobalt gust
#

fair enough

humble timber
#

just got my first tiny map edit to work. i'm cooking. except it's like. a slow roast. SDVkrobusgiggle

#

SDVpufferrise now back to the interior i was working on...... getting something to work is good motivation SDVpuffersquee

gaunt orbit
# tiny zealot wren has been doing a codegen thing to make asset handling easier but i don't ha...

@cobalt gust I have been!

Right now how it works is you make properties and add an annotation to them, and it generates the code needed to handle invalidations and pazy-loading, as well as loading from a local file optionally.

In future it will also let you use annotations to mark methods as loaders/editors for specific assets, as well as "including" entries in dictionary and list assets from local json files, plus exporting all translations to a text asset so they're usable with token strings

#

It's a bit messy right now and I haven't had time to sit down and learn how to make nuget packages, so it's not available yet, but it should be reasonably soon

lucid mulch
#

tbh nuget packaged libraries are a double edged sword for stardew while the private assembly feature isn't available

#

if it is pure codegen and not a library reference then it could work

gaunt orbit
#

Pure codegen

#

Right now there's a library for attributes but I'm pretty sure I can set it up so that it's only used during compile and the attributes are stripped after codegen runs

#

If I can't get that to work I'll do it the old fashioned way and embed them

untold oriole
humble timber
untold oriole
#

Oh yes, I understand.

lucid mulch
gaunt orbit
#

Conditional will strip out the attribute it's applied to when a given flag isn't set, but since the initial phase of sourcegen runs on syntax, I suspect it will still be there when that happens

gaunt orbit
candid veldt
#

I'm wondering if someone can shed light on why my randomized dialogue isn't working...I'm trying to use dynamic tokens paired with i18n to generate a pool of dialogue to randomly choose from that gets bigger when certain conditions are met, like heart level. When my NPC reaches 6 hearts, I want her pool to contain the previous 0-5 heart dialogue and the new 6 heart dialogue for example. This is my set up:

#

Everything else is loading fine, files are valid, and my specific day dialogue and gift dialogue and everything else is working

twin wadi
#

can you send a log and a json of the files?

#

especially the one with the local tokens

twin wadi
candid veldt
hard fern
#

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

lucid mulch
# candid veldt

from a probability perspective, the odds of getting your original 0-5 to happen in the 6-10 version of the world is rare due to the nested random

candid veldt
#

Oh, I should send the link version!

lucid mulch
#

also a dynamic token I don't think can self reference itself

candid veldt
#

I'll be honest, I was using this wiki guide written by Airyn, but I checked the history and it hasn't been updated since before 1.6 so it might not work now? https://stardewmodding.wiki.gg/wiki/Tips:_Using_i18n_for_Easy_Dialogue_Randomisation

Stardew Modding Wiki

With the game's default dialogue setup, you would be limited to 168 lines of dialogue: one per season, alternate heart level, and day of the week. However, you can use i18n to easily create a pool of randomised dialogue, either to extend the amount of dialogue beyond the 168 line limit or to remove the season/heart level/day conditions without r...

uncut viper
#

iirc they can self reference as long as they reference an earlier defined value?

lucid mulch
#

first link is just a block comment, no content

twin wadi
#

you may have accidentally only copied the top part

uncut viper
#

no the validator just breaks with comments at the top

lucid mulch
#

but the Range token is your friend

candid veldt
#

sorry about that, I forgot I needed to send it in link form! I posted a link to the json log that should hopefully work

uncut viper
#

the entire file is there if you edit it, it just doesn't go past the comments for some reason if the file starts with them

twin wadi
#

ah okay thanks button! didnt know about that

candid veldt
#

Oh I see, sorry folks SDVpuffersob

lucid mulch
uncut viper
#

that one's not really your fault since it's a bug with the validator

#

just maybe wanna skip the comments in your selection when uploading to the validator in the future

#

the top ones anyway

devout otter
lucid mulch
#

not sure then

candid veldt
#

Not showing up at all when I click my NPC in game, but when I gift an item or it's a day where I have specific dialogue it works just fine.

#

I didn't consider how the nesting would skew the probability though...so I might just re-work that whole section

devout otter
#

If the numbers are sequential anyway, you may want to try something like {{Random:{{Range: 1, 44}}}} instead.

candid veldt
#

Yes, I think in my head that's how I wanted it to work anyway, I was just majorly overthinking it😅

lucid mulch
#
{
  "DynamicTokens": [
    {
      "Name": "aurelDialoguePool",
      "Value": "{{Random: {{Range: 1, 30}} }}"
    },
    {
      "Name": "aurelDialoguePool",
      "Value": "{{Random: {{Range: 1, 44}} }}",
      "When": {
        "Hearts: {{ModId}}_aurel": "{{Range: 6, 10}}"
      }
    }
  ]
}

yeah something like this would fix the probability issue, and remove the intra dependency

#

performance wise Range is free when giving it literals as it will "bake" the resulting value into the parent string

candid veldt
#

Oh I think I see how that works 🙂 thanks for the assist folks, I'll go back to the drawing board and see if I can get her to speak to me

devout otter
#

Wait!

#

I spot the main problem. Just <season> doesn't work as a dialogue key.

devout otter
candid veldt
#

🤦‍♀️ You're right!

#

Looking on the wiki now I see it doesn't have just season as an available key

devout otter
#

If you want to make a dialogue that's randomly chosen every day, you can do a Query that calls every day of the week as a Dynamic Token.

candid veldt
#

Omg I'm glad you spotted that or I would've run into problems again! Okay, that makes sense.

#

I've got some tinkering to do!

devout otter
#

(If you need to see an example of the query. My mod Jinu in the Casino does that wink wink)

candid veldt
#

Haha thank you! Examples are really helpful to me 🙂

round dock
#

On my end I just use Randomization, say I have 10 good lines, I have the game randomize and pick from the said 10 using tokens

modest heart
#

Ah, I found a mod that lowers the ore amount in a furnace to just 1 needed

#

Now how do I copy that code and apply it to normal furnaces and dehydrators...

halcyon cave
#

Im trying to learn how to learn how make mods so that im able to update mods for myself that dont seem to be getting a 1.6 version and would like to use them, following the Modder_Guide/Get_Started on the stardew wiki i was able to get to the point where I can build it but for reason its telling me that manfest file doesnt exist but i made one

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.

hard fern
#

show your manifest

halcyon cave
#

{
"Author": "SkyrimKnight22",
"Description": "Just trying to make a test scrip!",
"EntryDll": "TestScrip.dll",
"MinimumApiVersion": "4.0.0",
"Name": "TestScrip",
"UniqueID": "SkyrimKnight22.TestScrip",
"UpdateKeys": [],
"Version": "1.0.0"

unreal spoke
#

!manifest exists, too, I think?

ocean sailBOT
unreal spoke
hard fern
#

oh i didnt know that manifest command existe

halcyon cave
#

odd cause I copied pasted that and the closing } is there

brave fable
#

(i'd imagine that a manifest-not-found error would be a file/folder layout issue or a manifest saved as a .txt file?)

halcyon cave
#

this the error i get ( [mod build package] The mod's manifest.json is invalid: The mod's manifest.json file doesn't exist. )

brave fable
#

when viewed in the file explorer, does your manifest file have a JSON File type?

unreal spoke
#

(Make sure to turn file type endings on if you haven’t.)

halcyon cave
#

its there

brave fable
#

!log - share your log file then so we can see the full load sequence

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.

halcyon cave
#

I see what i did wrong now, i typed manfest not manifest

hard fern
#

😅

#

manfest...

brave fable
#

the heart knows what the heart wants

halcyon cave
#

its mainly cause i sometimes type faster then what i need to spell so i end up with missing letters

candid veldt
#

the amount of errors I have to correct because I do this very thing as well is....a very large amount lol.

hard fern
#

i love pretending i know how to write events...

halcyon cave
#

what im guessing i need to update in this is
"CustomLocations": [
{
"Name": "Shop",
"FromMapFile": "assets/Shop.tmx"
}
],
which is set before "Changes": [ stuff ]

unreal spoke
dapper crown
#

WIP non-cheaty autofisher that actually plays the game -- I've tried a couple of "strategies" for the fishing minigame, but only the one originally implemented by the now-broken "Fishing Automaton" has been achieving decent results.
Does anyone have experience or ideas regarding control systems like this? Target selection and positioning is the easy part, of course, but the velocity control is a real head scratcher

hard fern
#

it works... (i forgot to change the recolor palette for the piano

#

the farmer stands in the sink but honestly i do not care the animation is 2 seconds long and you're never gonna see this again

pine elbow
#

Hey modders quick qn, is the information on the Stardew Wiki about modding maps accurate? Max width 200 max height unlimited?

#

ChatGPT is giving me different information and i just want to sanity check it

iron ridge
#

both are technically unlimited iirc but things start to go wrong at ~200 in width/height (max being 255 sounds familiar?)

lucid iron
#

i think 150 is when trees don't like being trees

#

but yea please dont trust chatgpt over the wiki

pine elbow
#

trees don't like being trees, interesting side effect

hard fern
#

Hes facing the wrong wa SDVpufferwaaah but it works? I think. I had to patch reload this thing like 5 times to get this far...

outer cloud
#

Thinking of taking the tea shop mod and adding ability to let NPCs visit and buy/drink tea/sit down. Is it possible to edit existing NPC mechanics for this or would I need to create new NPCs? https://www.nexusmods.com/stardewvalley/mods/28730?tab=posts

Nexus Mods :: Stardew Valley

Adds a tea shop shed upgrade! Includes an upgrade to make it more spacious. Enjoy the small business of your dreams!

lucid iron
#

Well you have to change how they path basically

#

It's a thing that need C#

hard fern
#

thats a farm building right?

hard fern
hard fern
#

🤔 the advancedmove command is acting a little funny. it's like, speeding up, and thus elliott ends up slightly out of place

#

bleh i'll fix it later. im tired SDVpufferwaaah

dapper crown
#

For the sake of testing, does anyone know how I could increment a value in my mod when succeeding / failing the fishing minigame?

brave fable
#

the simplest way would likely be adding a handler on Helper.Events.Display.MenuChanged that checks for e.OldMenu is BobberBar, though it wouldn't tell you the outcome

#

from there you could check if (e.OldMenu is BobberBar booba) booba.distanceFromCatching > 0.9f for success, since it's what the game appears to use

dapper crown
#

I found a way to do it from my update function.
Global:

internal bool played = false;
internal int caught = 0;
internal int missed = 0;

In the update:

if (Game1.activeClickableMenu is BobberBar) played = true;
if (rod.fishCaught)
{
    played = false;
    caught++;
}
if (played && Context.CanPlayerMove)
{
    played = false;
    missed++;
}
#

I dont like inferring state like that, seems janky, but it works

dapper crown
#

Oh yeah, bear in mind that is assuming that fishCaught only stays true for one frame, which is the case for my automation only basically

lucid iron
#

i assume u dont want to just patch playerCaughtFishEndFunction?

gentle rose
dapper crown
fading walrus
#

(It's already been said that you shouldn't use ChatGPT for modding in general, but if you want an example of how badly things can go pear-shaped, scroll up to a few hours ago)

#

DISCORD ATE MY REPLY PING

brave fable
#

(well to be fair we don't actually know whether that problem was caused by autogenerated code, it could just have easily been any number of things)

gentle rose
#

(but to be petty, since we know it was apparently fully auto generated we can blame the ai anyway)

dapper crown
#

IIRC mods that contain AI generated code or content also arent allowed on nexus

proud wyvern
#

pretty sure they are allowed

dapper crown
#

Ah sry, I was thinking of this servers rules, which prohibit linking to ai generated mods

fathom rapids
#

it's not like you could effectively ban ai generated code from something the scale of nexus anyway

proud wyvern
#

makes sense

fathom rapids
#

no way to prove if it is or isnt if they dont want to tell you (which they wouldnt cause its banned)

#

getting it tagged is a better strategy

dapper crown
#

You could totally use an automated system (also a neural model) to rate how likely some source code is to be produced by an LLM and use that rating to flag things as "likely stolen", but risk of false positives/negatives is still high.
But also, nexus doesnt even require you to publish source code so that aint viable anyway

proud wyvern
#

from what i've seen these systems work VERY badly

lucid mulch
#

also nexus is still a company that likes money, and investors don't like "anti ai"

dapper crown
#

Also true

lucid iron
#

That's a net collection right NotteThink

#

On th other hand idk if you get events for not fish

dapper crown
#

It's actually a list of the unique types of fish the farmer has caught

brave fable
#

nobody wants the menuchanged method SDVpufferpensive

dapper crown
#

Technically im just recreating that myself by tracking the last menu, but as you said id still have to figure out the outcome, and i believe the capture progress gets reset as soon as the minigame ends so i cant check that. Im okay with how im doing it now, however whiny i may be about how it's hacky

#

Appreciate the help, though.

lucid iron
#

I didn't know bobberbar fired a menu change every time you reel tho that's probably easiest 3sSmolMiku

#

You can combine with inventory changed too

brave fable
lucid iron
proud wyvern
#

i just Harmony-patch everything and call it a day, imo that's the best way to achieve cross-mod compat anyway

lucid iron
#

Eh it depends on the usecase i feel

dapper crown
#

It definitely does. There's a reason why the wiki calls Harmony out as a last resort

golden basin
#
   "Action": "EditData",
   "Target": "Characters/Dialogue/FC.John",
   "TextOperations": [
      {
         "Operation": "RemoveDelimited",
         "Target": ["Entries", "reject_809"],
         "Search": "reject_809",
         "Delimiter": " "
      }
   ]
},```

is this written correctly im still learning this method
#

im trying to remove a dialogue string

#

or does nullifying it work?

#
            "Action": "EditData",
            "Target": "Characters/Dialogue/FC.John",
            "Entries": {
                "reject_809": null,
                "MovieInvite_Invited": "{{i18n:MovieInvite_Invited.John}}",

            },
            "When": {
"Relationship:FC.John": "Married" 
}
},```
#

like wouldnt this work

vernal crest
#

TextOperations is for searching inside the value of a field (or an entry if its fields are slash-delimited, which dialogue is not). Just setting the line to null should work.

golden basin
#

also if i have voth moveinvite and rejectmovie ticket will they both work

vernal crest
#

If you're updating his dialogue it might be a good idea to replace the obsolete reject_<item_id> key with RejectMovieTicket or at least RejectItem_<id> so if the obsolete key ever gets removed your dialogue won't break.

golden basin
#

oh shoot ok

vernal crest
#

From what I can tell, RejectMovieTicket is only for if the NPC is going to use the in-game reasons to reject the ticket (going with someone else, divorced, etc) so if you want him to always reject movie tickets until he's married you'll need the RejectItem_<id> key I think.

#

Having both the MovieInvite_Invited and RejectMovieTicket keys looks fine, since one is dialogue for when they accept and one is for when they reject - neither of the keys actually make the NPC accept or reject the ticket.

golden basin
#

ok cool

bleak spade
#

Does anyone know where the Hat Mouse sprite is located in the game files?
I can find the house itself but not the mouse overlay

golden basin
#

its i cursors yeah

hard fern
#

it's below the MAX and HIT fishing text

bleak spade
#

Ah! Thank you!

golden basin
#

damn beat me to it

devout otter
bleak spade
#

I've finally figured out that is for some reason causing issues with my custom forest mod

#

Basically some kind of clash is happening between the vanilla files, my modded Forest.tmx and the Way Back Pelican town mod

#

And I have no idea how to fix it

#

The game glitches whenever it tries to spawn the area of the map that the mouse sprite would appear

hard fern
#

uh yeah SDVpuffersweats ok so it sounds like maybe cursors is cursed? i know way back pt changes that

left nova
bleak spade
#

What's annoying is that this happens even when I haven't used the Way Back tilesheets

fathom rapids
bleak spade
#

No, I even remade the .tmx edit so that it was identical to the vanilla map and it still did it

fathom rapids
#

or, to be more accurate, does your EditImage action include the mouse area?

bleak spade
#

This is the zipped up mod

fathom rapids
# bleak spade

Okay, so the first thing you want to do is try EditImage instead of Load

#

unless it's a different size?

bleak spade
#

No, it's the same size

fathom rapids
#

EditImage

#

also remove tilesheets from the mod folder

bleak spade
#

So I should do
"Action": "EditImage",
"Target": "Maps/Forest",
"FromFile": "assets/Custom_Forest.tmx"

fathom rapids
#

yes

#

plus the curved brackets

bleak spade
#

Yep

#

And keep the file itself as a tmx?

fathom rapids
#

also, make a separate folder to launch tiled from, with the map and the tilesheets. Keep only the map file (copypasted from the workshop folder after any edits) in the mod folder

#

yes, the file should be .tmx

golden basin
#

sweats in tbin

fathom rapids
#

I don't know how that works so I can't help if Gef tries that XD

#

i know my custom forest edit works

brave fable
bleak spade
#

I'm slightly confused about where I'm putting things

Right now in my mod folder I have an asset folder which contains the tmx file and the tilesheets.

So I should move those tilesheets into a separate folder, keeping only the tmx file? And then reroute the tilesheets in the tmx file to the new location?

hard fern
#

why are you making a blueprint fly

#

🤔

brave fable
#

it's a kite 🎏

fathom rapids
#

in the meantime, your assets folder should have just the tmx file

#

you will not be able to launch it in tiled from there without it giving you a fuckton of errors

#

that's normal

bleak spade
#

What do you mean launch it in tiled

#

Launch it in the game?

fathom rapids
#

i mean. How do you edit your tmx file

golden basin
#

open yor map

bleak spade
#

Oh I see, sorry I thought you meant launch it like in the game

fathom rapids
#

no

mild dagger
#

ohh damn I've been looking for a mod like this

fathom rapids
#

you should do that with the mod folder, which does not contain the tilesheets

bleak spade
fathom rapids
#

there is literally 0 significance to this

#

put it on your desktop if you want

bleak spade
#

Okay

fathom rapids
#

all references in your .tmx file should be to tilesheets being in the same folder as it

#

if moving it around breaks it, that means it cannot work as a mod lol

bleak spade
#

Okay I have copied and pasted the tmx and tilesheets into a new folder on my desktop

fathom rapids
#

kay

#

remove the tilesheets from your mod's assets folder now

#

do the EditImage, and test your mod

bleak spade
#

Okay

fathom rapids
#

(if it doesnt work yet, there's a next step)

#

(it is very, very cursed, but probably necessary for any compatibility anyway)

bleak spade
#

Right, now my content.json now reads

{
"Format": "2.7.0",
"Changes": [
{
"Action": "EditImage",
"Target": "Maps/Forest",
"FromFile": "assets/Custom_Forest.tmx"
}
]
}

fathom rapids
#

looks right

#

wait

#

its probably not edit_image_

#

shit

hard fern
#

EditMap

fathom rapids
#

let me check in my mod

#

right yeah that

bleak spade
#

Okay I've changed it to EditMap

#

(btw thank you so much, I am not a modder as you have guessed this is all me flying blind)

#

Should I launch the game and see if that's worked?

fathom rapids
#

i wasnt a modder before i made my first mod either lol

#

yeah, test it now

hard fern
#

i was born a modder, actually (im kidding lol)

fathom rapids
#

you can probably tell im not a professional mod advice giver either from the editimage fuckup >.>

#

im too used to copypasting code between mods ive already made and not needing to remember shit >.>

bleak spade
#

Omg it's not crashing

hard fern
#

i havent written a manifest from scratch in months

#

i keep copy pasting them lol

bleak spade
#

I think you've fixed it!

fathom rapids
bleak spade
#

Thank you so much this has been like a full week of trying to figure it out

fathom rapids
#

means theres no need to do the final uncurse/curse step... but you rpobably want to anyway. How much of the map does your mod edit?

#

Like is it every tile on the map or is it a limited area?

bleak spade
#

It's just making some paths and changing the spite designs of the buildings

fathom rapids
#

So you use ToArea/FromArea and not just replace the whole map?

bleak spade
#

It's pretty much just the top corner by Marnie's ranch

fathom rapids
#

code example:

#

you find the top left corner of your rectangle, then you count the tiles until your edit is over (min is 1, obvs) in both directions

#

this way you won't mess with other mods that also want to edit the forest (which is very, very many of them)

bleak spade
#

What's annoying is that this worked completely find with my Town.tmx edit (which was far more edits to the cliffs and buildings), but for some reason the forest just didn't want to work with a few paths and adding an island to a river

fathom rapids
#

Edit instead of Load is best modding practice, Load is for when you're adding entirely new assets

#

or when you want to change the size of the original asset 😔

bleak spade
#

I'm now wondering if I go back and do this editmap change to my town.tmx mod but now I'm worried I'll somehow break it

fathom rapids
#

toarea/fromarea is better, too. Like you probably wiped the East Scarp exit, unless you got lucky and ES loads after your mod

bleak spade
#

Here's my town.tmx mod, that I've now done the same editmap change to. Are there any huge errors?

#

It contains changes to the town square festivals too

fathom rapids
#

i dont want to test your mod im sorry itd require restarting my own game 😭

#

have you done the toarea/fromarea?

lucid mulch
#

Progress

#

In related news, I am not looking forward to doing balanced groups / recursive regular expressions in javascript

brave fable
#

'tomb it may concern'. ha ha.

#

cool tool, does it give you a preview on-hover for i18n strings in your ide, or something different?

lucid iron
#

You can view token values basically

#

In different context per cp pack

brave fable
#

i was rather wondering about the json breakpoints hahah

lucid iron
#

Yeah u can get particular slices DokkanStare

lucid mulch
#

fun fact, jsonc is hardcoded to not be breakpointable, bypassing extension config or the debug.allowBreakpointsEverywhere config

brave fable
#

json5 lobbyists at microsoft i see

lucid mulch
#

microsofts stance is that jsonc is for internal vscode use only for their config files

normal rain
gentle rose
brave fable
#

all objects inherit a virtual drawAboveFrontLayer() method that's never used. i feel so betrayed thinking it'd be perfect for kites

#

no overrides, never called

lucid mulch
steep valve
#

I need to figure out why Content Patcher isn't accepting this as a valid content.json, and is throwing a small error about not having a Changes field

steep valve
#

It seems contented in believing that I've filled out the Format field, but not Changes

calm nebula
#

What's the exact error message and is it yellow

steep valve
#

Don't judge the mod name, but it's in red

solemn lagoon
#

hii, i'm trying to make my first npc mod, and I want to ask is there any way I can get rid of the bush and grass?
i've tried different patchmode (Replace and ReplaceByLayer) but nothing seems to work

timid helm
#

How would I make something like the bridge to get to the tide pools in vanilla? Like a broken bridge that requires X amount of wood?

lucid mulch
#

and because people use cursed syntax, I can't parse the document as json (not that it would help much)

hard fern
devout otter
steep valve
lucid mulch
#

Got it kinda working and it can correctly find {{i18n:Core.Hector.{{Season}}.{{Random:{{Range: 1, 15}}|key={{Time}}}}}}, but a nice to have would be for it to successfully find the inner tokens too.

solemn lagoon
devout otter
#

So naturally Content Patcher "cannot load the pack", per the error message, because there's nothing there.

tiny zealot
steep valve
lucid mulch
#

CP can't tell the difference between the absense of Changes and it being at length zero due to how it initializes the data structure

steep valve
lucid mulch
#

being valid json is only step 1 in being a valid semantic content patcher content pack

steep valve
#

Ah, gotcha. Honestly, it seems like being a valid JSON isn't even strictly required. The older mod I'm currently migrating has comments in the JSON, which VSCode is loudly informing me is against the rules

tiny zealot
#

the json has to be valid according to newtonsoft's json parser, which is notoriously lenient

steep valve
#

Oh, I see. I'm not familiar with any specific JSON parsers

tiny zealot
#

(some to most of what it accepts are valid features in jsonc and/or json5)

solemn lagoon
#

the top corner of the map also get replaced, did I get anything wrong with my json?

brave fable
#

are you sure you don't have another patch in your mod doing this? maybe in the content.json file?

solemn lagoon
brave fable
#

!patchsummary SDVpufferthinkblob

ocean sailBOT
#

Can you do these steps to provide more info?

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

I think having this many opinions on json parsing is abnormal and a sign of a broken mind

solemn lagoon
lucid mulch
gentle rose
lucid mulch
#

\{\{ ([^\{\}]++ | (?R=100))* \}\} using a third party regex extension to support the recursion, and heres hoping someone didn't go deeper than 100

#

I don't fully understand the regex as none of the sites I normally test regexes with understand this syntax

gentle rose
#

it's not technically regex in the strict sense

#

once you introduce recursion it's a different type of monster entirely

lucid mulch
#

it does spit out a RegExp javascript type

gentle rose
#

yeah I just mean it's not technically a regex in the formal definition of the term (to do with formal languages and finite automatons etc) which is what most regex parsers are designed to do

lucid mulch
#

taking a peek under the hood it effectively just becomes syntax sugar as if I copy+paste nested the query a bunch

gentle rose
#

oh so not "true" recursion

lucid mulch
#

its up to depth N recursion, not infinite

gentle rose
#

oh I think I get you now (kind of, I'm half asleep lmao)

#

interesting capture group there

#

what's the extension?

lucid mulch
#

the .NET balanccing groups syntax would have done this job great, but only .NET (7?) has it

lucid mulch
#

I hacked up their balanced parentheses example to do the double curley brace instead

gentle rose
#

but it's interesting that so many platforms are extending regexes beyond what they originally were

lucid mulch
#

its become the canonical text pattern match solution so has expanded to do that role better

#

the fact that no one agrees on any of those exensions is typical software, much like how no one agrees on any of the SQL extensions on top on ANSI SQL

gentle rose
#

I vote we go back to implementing regexes purely via finite state machines though /j

calm nebula
#

You know that dotnet has a fsm regex right

timid helm
#

What are all the ways to add warps in tiled? I added one and I want to remove it but I don’t remember where it is

hard fern
weary pivot
#

Hi, I'm interested in making SDV mods as someone who has a little coding experience with mostly web stuff like HTML and Javascript and have been lurking here for a bit. I have a quite a few questions:

  1. If I wanna do stuff like make it so that any small decorations like lamps, plants, and other small furniture can sit on fences the same way torches do, can I do that with SMAPI and CP, or do I need C#? There's probably a good reason I haven't found any mods that actually do this...

  2. Is there also some built-in game limitation for why building interiors all have to have the exact same type of interior map? Like, let's say I want my farmhouse to have Kisaa's Cozy Rustic Farmhouse interior, but have my first cabin use Aimon's Tidy Cozy Farmhouse and the second cabin use something else. Is that possible without having to create them as pocket spaces and use custom warps to get to them?

#
  1. Somewhat related to the above, but I noticed with cellars the first one created is always tied to the farmhouse regardless of if you upgrade a cabin fully first to get a cellar and have not upgraded the farmhouse, with the warp for that cellar going back to the farmhouse and putting you in an iffy place. That's just how the game works right? Edit: Just wanted to add that I used the Anything Anywhere mod to do the builds on day 1. I really should try the vanilla way as well just to see.

  2. Is there something like the mod Debug Mode that can help me tell which mod or folder an asset is associated with? I have a bunch of CP mods that change furniture but I have so many I can't tell which mod is changing my kitchen even after thinking I disabled all the kitchen changing mods. Really wish CP had an AT-like feature to click on something and access all mods that can affect the asset...

  3. I'm a fan of watching Blade's videos and I noticed that he can take a look at the game's code and see how things work. Would I be able to do that too so I can figure stuff out? Like why AT can't change signs when they're added to Fish Ponds...

Sorry if this is a lot!

calm nebula
#
  1. C#, likely painful
#
  1. Not impossible, likely c#
tiny zealot
#

short answers:

  1. C# i think
  2. yes, game limitation. farm building interiors including farmhouse are instanced copies of the same map
  3. ???
  4. lookup anything can do this about items (sometimes), but not about textures afaik
  5. yes, decompile the game
lucid iron
calm nebula
#
  1. Yes all cellars are created at game start
#

!decompile

ocean sailBOT
lucid iron
#

Now the reason why AT magically knows what pack is cus it is managing the texture itself

#

CP itself would also know what pack an item came from but it doesn't express this info to the user

#

Mostly cus it'd be hard to express i feel

calm nebula
#

I mean, textures are editable

#

Lol

#

I could even be a dick and directly edit the texture

weary pivot
#

Oh, I see. Thanks so much for the answers everyone! Guess I gotta pick up C# for real now.

calm nebula
#

You know I'm not a real programmer because I cry about mutation lol

#

Anyways chue

#

When will you make it so I can right click on a mannequin to swap out my equips and inventory with it

#

Dont say "can't you do that yourself?" or "you don't play the game, atra."

lucid iron
#

When game no longer crash on bad mannequin draw SMCPufferjail

calm nebula
#

I can't hear you over soda pop

spice cobalt
#

I need help. I can't find in the SMAPI documentation how to add new functionality to the tool. I'm trying to create a new tool - a notepad based on GenericTool

gaunt orbit
#

C#

#

You need c# for custom tool behaviors

#

Can't do it with just json

spice cobalt
#

yes, it is on image 2

tiny zealot
#

there is some C# happening here but i'm not familiar with tools

gaunt orbit
#

Ah my bad

#

If you want to subclass you need to use spacecore to a) make sure the serializer doesn't explode and b) you need the fully qualified type name so spacecore will allow you to use it as a tool class

#

The alternative to subclassing is using harmony to patch functionality directly into GenericTool

spice cobalt
#

Where I can see examples?

gaunt orbit
#

Vanilla tool data without spacecore only allows vanilla tool types

gaunt orbit
#

The basic gist is you register your tool type using spacecore (documented on the github page for spacecore) and then you use c# to edit tool data, and for ClassName you would do
typeof(MyTool).AssemblyQualifiedName

lucid iron
#

What do you want the tool to do?

spice cobalt
calm nebula
#

(It may be easier to use smapi events tbh)

gaunt orbit
#

In that case it is probably simpler to just harmony patch DoFunction on GenericTool

#

The main issue with using smapi events for item interaction is that you have to manually handle all the weird edge cases that the game normally does for you

calm nebula
#

True but if all you're doing is launching a menu

tiny zealot
gaunt orbit
#

I mean ideally generictool would just have events you could subscribe to, but alas

#

But harmony is not too odious

twilit quest
# weary pivot Hi, I'm interested in making SDV mods as someone who has a little coding experie...

For #2, there is a way to differentiate. If you look at the way I've done this tropical kitchen mod: https://www.nexusmods.com/stardewvalley/mods/29525 you can see that I differentiate between the Farmhouse and Cabin kitchens (plus the island kitchen as a bonus). It's not perfect, because it's all or nothing for the cabin kitchens, but it does give some finer control. The only thing is you have to use OnLocationChange to make sure the correct map/patch is chosen, otherwise it might show the wrong version on entry. Too many OnLocationChanges can slow down the game a bit. Still, it's useful particularly for cases like this.

#

There's also Location Unique Name (rather than just Location) that might be able to let you differentiate between cabins.

lucid iron
#

What if u just make Buildable kitchen

#

i think the problem is more the renovations though, can't do those via just cp edits on location change

twilit quest
# lucid iron What if u just make Buildable kitchen

You can, of course, but it's a different thing. If you want to replace the vanilla kitchen in the farmhouse and not the cabin, this is the way I know how to do it. It will also work if you want to replace the whole farmhouse map with CP as the original ask was about

twilit quest
#

I think it's doable

lucid iron
#

Terrible times then Sleepden

#

Farmhouse is rather cursed

twilit quest
#

But as far as the question was concerned, it's definitely possible to use CP to use different farmhouse layouts for a farmhouse and cabin. Renovations might be tricky, but I believe they would be possible with the right CP conditionals, provided it was checked OnLocationChange. With "LocationUniqueName": it might even be possible to do it by cabin, but I think the cabin names are unique to each game, so it might not be easy. @weary pivot LMK if you have any questions.

weary pivot
#

@twilit quest Oooh, so there's that way to do it as well! Thanks a lot for sharing that! I don't have anymore questions atm because I don't know enough to ask good questions yet but when I do, I will!

twilit quest
twin wadi
#

um this is my first time with temp actor shenanigans, can anyone tell me what the tile x and y are for?

brittle pasture
#

the position on the map?

timid helm
#

There’s a warp in tiled that I can’t remove, what do I do?

twin wadi
tribal bronze
#

so I have an odd request:
got a friend makin a mod and he wants to modify the position of the player when they kiss certain villagers, so the question is where to start XD if anyone has recommended tutorials or forums I could scour that'd be helpful hehe

tiny zealot
#

!decompile you will need C# and most likely harmony to do this

ocean sailBOT
tribal bronze
#

ooooo oki oki

tiny zealot
#

you would need to find the code that sets up the kiss animation and edit it to change the coordinates where the player is drawn

rich tapir
#

i want my custom content patcher npc to dislike artifacts but i don't want to find the seperate item ids for all 42 artifacts

tiny zealot
rich tapir
#

what is it exactly called?

round timber
#

item_type_arch

rich tapir
#

okay ill try it

round timber
#

also i believe artifacts are already automatically disliked or hated so

rich tapir
#

it's neetral'

#

neutral*

round timber
#

hmm

rich tapir
#

okay item_type_arch works

#

thanks

#

is there like a list of all of the context tags

tiny zealot
#

strictly speaking, no, since mods can add new ones whenever they want with no restriction

rich tapir
#

oh okay

tiny zealot
#

i guess those are mostly tags that mods are using/trying to standardize

calm nebula
#

The best way is to hold an item you want

#

And type debug listtags

tiny zealot
timid helm
#

Why is an action warp in tiled not working?

brittle pasture
timid helm
#

It’s on the buildings object layer

brittle pasture
# timid helm

the key should just be Action, and Warp should be part of the property value

calm quiver
#

Hey, does anyone know why this sprite is so downcaled? I formatted it the exact same way I do everything else

brittle pasture
#

is it a big craftable

lucid iron
#

What is that

brittle pasture
#

post another screenshot

timid helm
obtuse wigeon
# timid helm

I think you're either missing the from x and y or the to x and y

calm quiver
obtuse wigeon
#

is the 82 39 the tile on the beach you want to warp to?

brittle pasture