#making-mods-general

1 messages · Page 395 of 1

lucid iron
#

Hm i see

naive wyvern
#

because I thought I needed a lot of extra space

lucid iron
#

Go to edit tileset and change the file it's referencing maybe

#

Also check if u got wrong path at some point good ol climbing

#

So that the expected png isn't the one tiled actually used

naive wyvern
#

Hm, its not changing think

#

well
I guess I could just like, redo the map uidsagiug

lucid iron
#

Naw

#

Send tmx here mayhaps

#

Not the png just tmx

naive wyvern
#

okie i try

#

imagine if the solution was "restart tiled"

#

iuhfgiuga

latent mauve
#

Actually...

#

I just scienced for you, and the solution was close the map after saving the new tileset PNG and reopen the map.

#

_>

naive wyvern
#

omggg

lucid iron
#

Well i do spot climbing on ur paths.png

naive wyvern
#

thank u i shouldve known i shouldve tried turning it on and off again uisgiufsg

latent mauve
#

Even Tiled knows the white isn't part of the tileset, it goes to 0,0 if you try to hover them in the tilesheet settings

lucid iron
#

Should probably fix that

latent mauve
#

So closing and reopening the map gets rid of the white space

naive wyvern
#

hmm i guess my follow up question is how do I send this to a client?
Zip file and ask them to unzip in mods folder?
and potentially like, teach them how to fix tilesheet climbing

uncut viper
#

well if theyre a client you should fix the tilesheet climbing yourself

latent mauve
#

Are you just doing the map for the client and they're loading in the content?

thin fern
#

yes i did i figured it out just now!! tysm tho

naive wyvern
#

i was planning to squeee but more like, what are other things i should do to ensure it goes to them with minimal problems

naive wyvern
#

i normally just do the art but this one asked me to do a map and a spouse room too so i was unsure 😭

latent mauve
#

Ah, I see

gentle rose
#

pau have you tried my extension yet

latent mauve
#

Well, coding it into the game is (the map/location) the most foolproof method

naive wyvern
#

bby i havent yet iugfsiugs i really should 👀

latent mauve
#

But if they're gonna do the coding themselves, you can probably just send them the map and the relevant custom tilesheets, and warn them about the vanilla tilesheets being needed if they open the map in Tiled.

uncut viper
#

you could send just the map and explain that if they ever want to make any edits to it, they will need to add so and so tilesheets

naive wyvern
#

thank you gang SDVpufferheart I'll def let them know

winged charm
#

I'm not on my pc at the moment, but would you be able to go into more detail please :)? I'm still a little lost SDVpuffercry

latent mauve
#

If there's no error, it's possible that the Target you are using for your schedule doesn't exist, and that you're not using a Load to make it exist.

winged charm
#

I would need to create another file called "blank.json" then load it before the schedule?
Or should I just make sure that It's not parsing first?

latent mauve
#

Check that there's no error in your log first.

winged charm
#

Theres only an error once I load a save file, but I can look at it later tomorrow :)

latent mauve
#

That'd make sense, since the character probably wouldn't try to load until you open a save. 😛

winged charm
latent mauve
#

But yeah, the usual culprits for a schedule not running are:

  • It didn't parse the schedule for some reason and throws an error that should say why.
  • Your schedule target is wrong or nonexistent.
  • You changed the schedule or map warps and didn't sleep a day or load a new save to recalculate the NPC pathfinding.
winged charm
#

I've slept in one day to Day2 after creating a new save, but nothing changed. And if the schedule was not parsing would that be a content.json issue?

latent mauve
#

If it's not parsing and is throwing an error, it'll usually tell you it's because of a specific schedule key or format error.

#

Could be anything from a key that isn't recognized to missing punctuation to a location that hasn't loaded yet.

winged charm
#

Yaay!! I love trouble shooting!!! Also I've replied to my Schedule.json I sent earlier. I didn't change anything besides adding a comma behind the first schedule and removing the second one. Is there anything else missing?

#

And thank you again for the help :)

latent mauve
#

Try adding a second schedule point for each of those keys, it might be behaving weirdly because there is only one.

#

(even if it's just a few tiles over for the second location)

#

separate your two stops with a /

winged charm
#

So for example "spring": "610 BusStop 15 23 3/630 BusStop 19 23 2",

latent mauve
#

yep

gentle rose
latent mauve
#

I recall thinking there needed to be 2 stops for a schedule key to be valid at some point and I think it was purely to avoid weirdness rather than being strictly required, LOL

winged charm
grave scarab
#

someone made a localisation for SVE based on/recommending my vanilla localisation!!

#

truly I have made the big time

mellow saddle
#

Has anyone ever tried switching scenes from within an event?

#

For example, a farmer is at a bus stop. The screen goes black, and then he appears at the beach. The event continues.

stark spindle
#

changeLocation will do that

mellow saddle
#

I tried it, but it completely failed — the camera keeps moving.

stark spindle
#

its not moving at the bus stop and after you changelocation its moving around?

mellow saddle
#

Are there any similar mods with such events that I could refer to? Thank you so much for your help, anyway!I'm a little slow.Because it is being translated.

#

The situation is actually much worse — after changing location, the character keeps moving and won't stop.

stark spindle
mellow saddle
#

It's okay, I really appreciate your help — thank you! There is indeed one in the vanilla game. I remember it's related to Leo, but my attempt to copy it failed.

#

Anyway, thank you so much. I'll try to find a similar event.

vernal crest
#

You can also use changeToTemporaryMap

mellow saddle
#

!thank you!!!

vernal crest
#

However, vanilla events that use changeLocation are:

  • 711130 (beach)
  • 60367 (bus stop)
  • 3910975 (forest)
  • 471942 (haleyhouse)
  • 571102 (hospital)

(To name a few)

mellow saddle
#

Wow, that's amazing! Thank you so much, Teacher!

eternal moss
#

hello,
I added few custom sounds into my mod but I wonder can I stop sound effects in the middle of the effect?

mellow saddle
#

I'll save this for later — maybe this time I'll actually get the event to work! Thank you so much!

vernal crest
#

Vanilla events that use changeToTemporaryMap are:

  • 8 (mountain)
  • 384882 (mountain)
  • 5183338 (mountain)
  • 528052 (railroad)
vernal crest
mellow saddle
#

I get it now! Thank you so much for your guidance — I'm going to try it right away!

stark spindle
#

Sorry got wildly distracted.

mellow saddle
#

💯 🥰

hard fern
#

hm. would it be better to use one of those frameworks that lets you spawn animals to make a whole duck, or is there a different way just using plain content patcher

vital lotus
#

r they meant to be reachable or just there for vibes?

#

Gil is map tile 👀

hard fern
#

just there for vibes, really. i want an npc to be keeping ducks

#

but i dont want said duck to be like. cold and unmoving.

lucid iron
#

I think meep is good bc you get to use duck skins

hard fern
#

:o

#

i see

devout otter
#

(And you can easily give it portraits to if you want.)

lucid iron
#

However a duck is only 16x16 anyways, you can make antisocial npcs

#

Put em on simple schedules around the pen

vital lotus
#

how complicated is it to make antisocial npcs?

#

do they need a lot of definition?

lucid iron
#

Well you make a regular npc, with less stuff

devout otter
#

Just like an NPC without all the gift thingies.

hard fern
#

thats true. i could make a couple of antisocial npcs as like. pets

#

.... wait a second, the vanilla ducks are all male. how the hell are they laying eggs

lucid iron
vital lotus
#

stardew magic

devout otter
#

The vanilla cow is all female right.

hard fern
#

yeah, and yet somehow immaculate cowception

lucid iron
#

Cows are female ox

vital lotus
lucid iron
#

Oh the file died

#

Well iirc the min req is

#

Need some chara data, cansocialize false

#

Need mon to sun dialogue keys

#

Need a spring schedule

vital lotus
vernal crest
#

Antisocial NPCs are very quick and easy

lucid iron
#

I guess you can have 0 dialogue keys if you don't need to talk to duck

hard fern
#

how did i end up on a site for ordering ducks

vital lotus
#

irl scope creep

devout otter
#
  "Action": "EditData",
  "Target": "Data/Characters",
  "Entries": {
    "DolphINaF.Jinu": {
      "DisplayName": "{{i18n:Name.Jinu}}",
      "CanSocialize": false,
      "Home": [
        {
          "Id": "Default",
          "Location": "DolphINaF_WaitRoom",
          "Tile": {"X": 5, "Y": 5},
        }
      ],                      
    },    
  }
},``` The absolute minimum.
inland rain
#

I reduced the size to 10,000x10,000 tiles, which is still around 7,000 Pellican Town maps

#

100k is doable, but it just loads into the save a bit slow

blissful panther
#

Only 100 million tiles? Pfff. /j

#

Seriously looking good, though!

inland rain
#

haha I eventually realized that 100k square is 10billion tiles

#

there is a very small hiccup when moving chunks, because I can't make async work, idk if it's even possible

#

only when you load a new chunk, it keeps it cached for next time

versed wyvern
#

Whoa KannaWOW
Are you planning to have structures and goals and such in there?

inland rain
#

you can add structures, I didn't show it in the test, I haven't created anything that would fit yet

#

I'm hoping to make an indoor outdoor system where if you go inside a cave it no longer shows tiles outside the cave and vice versa

#

I posted this earlier, but it's as easy as:

{
    "Format": "2.7.0",
    "Changes": [
        {
            "Action": "EditData",
            "Target": "aedenthorn.StardewOpenWorld/landmarks",
            "Entries": {
                "{{ModId}}_Example": {
                    "MapPath": "Maps/Forest",
                    "MapPosition":{
                        "X":5000,
                        "Y":5000
                    }
                }
            }                  
        }
    ]
}
#

this adds the entire forest in the middle of the open world

#

I still can't get debris to stay, something is deleting them as soon as they are spawned because they are outside of the map's tile array

#

if there are any wizards around maybe someone can help point where that might be happening in the code

#

I found one spot, where it checks the map.DisplayWidth and Height but fixing that didn't solve the problem yet

drowsy pewter
dusky sail
#

How am i supposed to decide what objects a fish pond produces 😭 (less of an actual question more of just complaining through a rhetorical question)

vital lotus
#

go wild

devout pecan
#

hello

versed wyvern
#

I'd start by deciding if you want the items to be purely for immersion or if you want them to actually be useful

dusky sail
#

I think ive got a good idea of it i just have to smooth it out a little

#

So much of modding is just. Deciding things. All the time

devout pecan
#

jus wondering

#

but is it possible to have mods on a chromebook

fossil osprey
#

I don't think your OS has any influence, what's important is where you're getting your game
are you playing to steam? if so, i don't see why not
if not, entirely depends on the platform

fading walrus
fossil osprey
fading walrus
#

If you run the game on Linux mode then it's fine tho

#

And this is indeed the wrong channel

devout pecan
#

nope! but i think i got it to work

#

i have the pc version of stardew with stardew expanded

versed wyvern
#

They're trying to tell you this is the channel for making mods, not for tech support

devout pecan
#

i want to know how to do the coding and stuff

civic vortex
#

Can someone make a frog mod

#

For stardew

#

Ping me if you need ideas

vital lotus
#

!modideas

ocean sailBOT
#

If you have a mod idea that you aren't planning to make yourself, you can put it in the mod ideas github: https://github.com/StardewModders/mod-ideas

However, this does not mean anyone is guaranteed to work on your idea—modders who are looking for ideas sometimes go through and work on what they find interesting off this list. If you want to pay someone to make your mod idea, there are a few people who do commissions (mostly art, sometimes code); you can ask around, search usernames for the word comms, or see !commissions.

fading walrus
#

(Already mentioned the github to them)

vital lotus
#

ah i see

versed wyvern
#

So I've got a question here, I have an EditData action conditioned to start being used after the player's seen an event, but would it be possible for me to activate it during said event as well? henyaHmm

vital lotus
#

does it affect something inside the event?

versed wyvern
#

Portraits, ye

vital lotus
#

i think there's event command to change portrait and sprite

flat sluice
versed wyvern
#

Hmm, ok... if that's the only way I'm probably better off not trying it since seasonal outfits and whatnot would need to be considered too blobthinking1

vital lotus
#

seasonal outfit is prolly best done with appearance system?

versed wyvern
#

So my specific use case is that it's an Overlay action to add light back into Shane's eyes after his 8-heart event where he finds new purpose in life

#

But given the nature of edit actions I don't think there's any way to have that already in effect going into that event

calm nebula
#

Change Portrait

unreal spoke
#

Spacecore lets you use being in a specific event as a condition. Would that help?

calm nebula
#

The event command

vital lotus
#

u could technically make different appearance just for that

calm nebula
#

You can just changePortrait for that

versed wyvern
#

Yeah they suggested change portrait but then a lot more additional event edits need to be written for stuff like outfit changes

vital lotus
#

u could consider dora's suggestion of using spacecore

#

I happen to have snippet of editing an asset when on that event

"When": {
        "HasMod": "spacechase0.SpaceCore",
        "spacechase0.SpaceCore/CurrentEventId |contains=3900074": true, //Shane's Charlie event
        "LocationName": "Temp"
      }
devout otter
#

I think the tricky part here is there's a need to have compatibility with seasonal outfits. And like if the event happens during fall, and Shane is wearing fall outfit, then you need to change the portrait specifically to "Shane with light in his eyes wearing fall outfit."

vital lotus
#

if it's overlay it won't be a problem right? because no matter the portrait from appearance system it'll be the one targeted?

versed wyvern
#

Spacecore just might work, although the edit action would need to update OnLocationChange or else it only takes effect at the start of the day, right? ThinkO_O

devout otter
vital lotus
#

i was referring to spacecore 😅

versed wyvern
#

Right, that was the issue with changePortrait, but Spacecore does sound like it lets me do what I need

vital lotus
#

can we suggest update rate:

  • on event start
  • on dialogue triggered
    👀 👀
devout otter
#

Oh, I thought it would happen in the middle of the event.

versed wyvern
#

That said I probably shouldn't tack on Spacecore as a dependency just for this tiny immersion function, but thanks for the brainstorming henyadance

vital lotus
devout otter
#

(My mod has a number of small features from various frameworks that I set up like "will happen in case you have it installed")

versed wyvern
#

Well, on the other hand... Spacecore might also be alright because pretty much everybody's using that WoahThink

vital lotus
#

optional dependency is def a thing

devout otter
#

To entice people you need to first make them feel what they'd miss. SDVpuffercool

flat sluice
#

I know I'm probably late, but I finally found a fix to that VSCode debugging:
You have to have a .vscode folder in the folder you're in (see picture), in it a launch.json file. It should look like this:

    "version": "0.2.0",
    "configurations": [
        {
            "name": "SMAPI X VSCode fix",
            "type": "coreclr",
            "request": "launch",
            "preLaunchTask": "build",
            "program": "C:\\SteamLibrary\\steamapps\\common\\Stardew Valley\\StardewModdingAPI.exe",
            "args": [
                "--mods-path",
                "Mods - test"
            ],
            "cwd": "C:\\SteamLibrary\\steamapps\\common\\Stardew Valley",
            "console": "integratedTerminal",
            "stopAtEntry": false,
            "env": {
                "DOTNET_SYSTEM_CONSOLE_ENCODING": "utf-8"
            }
        }
    ]
}```
Of course, edit as necessary, especially the `program`, `args`, and `cwd` parts.
For any questions, feel free to ping me!
#

Here's the pic.

lucid iron
#

Setup hopesanddreams shane as a different appearance

#

Condition it on whatever mailflag u set and then /action updateappearance

versed wyvern
#

Well the general idea seems to be that an additional framework is needed to achieve this and I think I probably shouldn't make things so complicated just for this ManjuuNom (And also it seems to be doable with Spacecore)

fossil osprey
versed wyvern
#

Well as far as I'm aware that still runs into the same issue as using changePortrait in which I'd need to have variants for every possible alternate outfit like seasonal ones

fossil osprey
#

Yeah, that would means a lot more works for you, but that could remove the need for additional framework if you really don't want to use one

versed wyvern
#

whereas an overlay just automatically works with every outfit because his eyes should be in the same spot in every one

fossil osprey
lucid iron
#

Hrm

versed wyvern
lucid iron
#

I think you only need 1 alt?

versed wyvern
#

Not worth adding a buttload of alternate patch actions, or making an action update OnLocationChange

lucid iron
#

Tho it depends on how you are applying the base portraits

modern moth
#

So I want to make custom difficult bundles for a multiplayer playthrough that incorporates the different mods we're going to use. Is there a mod that will let me add specific items, or can someone point me in a direction so I can write the xnb myself? I don't have a lot of experience with C# but I know a little JavaScript for reference.

obtuse wigeon
proven spindle
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.

modern moth
proven spindle
#

You'll probably want to start by making a simpler mod (like adding a recipe or item or something) in Content Patcher to get into the feel of how modding works in SDV too

modern moth
#

Good advice!

barren quartz
#

I need help making my mod that fixes the Island Tilesheets! This is just for personal use. I have the png files and all that I think I need for the mod, but I keep getting this message from SMAPI. This is my first time modding, and I will not be making any more mods any time soon lol

gentle rose
#

what's wrong with the island tilesheets that needs fixing?

barren quartz
#

I forgot who the mod author is but they changed the graphic of the water underneath this tree and it just not compatible with the vanilla game but I still like the tree graphic. So I just made my own mod to fix that cus i didn't want to see a big square that was a completly different color from the rest of the water. Let's just say it was looking crazy on my beach farm. The trees were tweakin out 😭

hard fern
barren quartz
#

super super new to modding, I just watched a yt video to walk me through it. here is what I have.

hallow prism
#

do you have file extension enabled?

#

a common issue is to have a file that is looking like a file.json but is a file.json.txt because it's hidden by default

barren quartz
#

omg how do i do that

#

that may be the issue idk

hallow prism
#

i don't remember the steps so google may be of better help

barren quartz
#

ight

calm nebula
#

!fileextensions

ocean sailBOT
#
Hidden File Extensions

Windows and Mac hide most file extensions by default. If you are creating or updating mods, it's helpful to show file extensions so that you can be sure all mod files are named correctly.

To show file extensions on your computer:

On Windows 10, open File Explorer, click on the View tab, then check the File Name Extensions box.

On Windows 11, open File Explorer and click on View > Show > File Name Extensions.

On Mac, open Finder, and in the menu bar, click on Finder > Settings (or Preferences) > Advanced, then check the Show all filename extensions box.

barren quartz
#

ya ya now it looks like this

#

ok I removed the ".txt" but now I'm getting this msg

obtuse wigeon
#

The "FromFile" feilds need the file extension .png

#

so it would be "assets/fall_island_tilesheet.png"

#

also it looks like it will apply all of these as the same time, you may want to use a condition to only allow them to apply during the correct season, using the "when" field along with a GSQ can allow you to do that

Use Tokens not GSQs in a "When" Field

uncut viper
#

When fields do not and can not use GSQs

#

also it doesn't matter if those all apply at the same time

obtuse wigeon
uncut viper
#

When conditions are tokens

barren quartz
#

thank you guys for helping this noob! I don't see the big square in the water anymore ❤️

obtuse wigeon
uncut viper
#

Season is a token

obtuse wigeon
#

season is a GSQ and a token? cause it's also listed on the GSQ page

uncut viper
#

There is both a GSQ called "SEASON" and a token called "Season"

#

PLAYER_HAS_MAIL is only a GSQ, and will not work

#

But HasFlag will

obtuse wigeon
#

Ahhh okay, so it's been working due to hopes and dreams, but adding another GSQ will cause it to stop, good to know, didn't mean to provide false info

uncut viper
#

GSQs are entirely a vanilla concept. Nothing to do with content patcher whatsoever

#

Tokens are the opposite

#

The only caveat to this is Esca's Modding Plugins, which adds a token that will evaluate a GSQ, but you should really only use that if you absolutely need to

obtuse wigeon
#

Gotcha, Learning a new modding enviroment is so confusing

#

Thank you for correcting me, I would've been going insane trying to use GSQs instead of tokens

blissful panther
#

By the way, Button... the first ever BETAS > MEEP interaction happened earlier today. SDVkrobusgiggle

#

I was just playing around for some interesting triggers to see what the new closeup interaction trigger action... actions could pair with nicely.

uncut viper
#

first ever........ headline event

#

did you find anything it paired nicely with

blissful panther
#

I made it happen on monster kill. I'm sure that's a useful one.

#

Nothing huge yet though, sadly!

uncut viper
#

do the meep close-ups take an Input or Target item?

#

actually wait they can't they're actions

#

got them mixed up with conditions for a sec

blissful panther
#

Yeah, figuring out a trigger action vs a trigger vs a trigger action action was a feat.

sand bronze
#

Hi, I'm making a simple mod for my friend that changes Elliott to Jungkook. She plays in Russian, and I'm stuck on “stitching” the ru.json file in the i18n folder with the content.json file.

Am I correct in understanding that the translation from the “i18n” folder only translates “custom” mod dialogues, or is it possible to use dialogues from i18n in the original game?

Overall, I'm completely confused about dialogue modding. Please help!

hard fern
#

i18n is just for the mod it's in

uncut viper
#

The monster kill interaction can probably be used to show a popup of the item it dropped but only if the player hasn't received it before (or if it's a special item maybe) with the right set up, I think

blissful panther
#

Yeah, the monster kill trigger + a condition for the item dropped for, say, some rare item?

uncut viper
#

exactly

#

Which then sets a mail flag so it doesn't keep showing that every time you get the same drop

#

Like when you pick up a valuable rupee for the first time in a Zelda game

hard fern
sand bronze
# hard fern So yes. Any mod with an i18n will have its own i18n folder thats used by just th...

In short, the task is simple: replace all of Elliott's dialogues with custom ones. Am I correct in understanding that I need to do the following: 1) Change the dialogues in content.json. 2) Write them in Default.json in the i18n folder. 3) Translate them into ru.json and SMAPI will change everything in the Russian version of the game

If so, it doesn't work for me, so I'm asking for help(((

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.

hard fern
#

Using the json validator site, so it's easy to see

sand bronze
uncut viper
#

!elliot

ocean sailBOT
#

Elliott has two t's in it...

uncut viper
#

it comes for us all at one point or another

humble timber
#

never for me (i am an elliott enjoyer) SDVkrobusgiggle

autumn tide
#

Hey!! Uhh I’m Claude (all pronouns), I recently downloaded the unofficial updated version of the More Krobus Mod (he’s the objectively correct marriage candidate btw), but there were a few glitches that made events break. I noticed that there were tips on how to fix these issues in the comments, eventually I did so, then I decided to tweak the dialogue a little bit aaaand long-story short I got hyper fixated (still going, this has haunted me for 5 days straight) and fell down a huge rabbit hole; now I really wann use More Krobus as a base for a fully-fleshed out Krobus expansion, but I have no experience and am just wholly winging it- terribly I might add 😭 - and I would really love someone to collaborate with on this idea!

gentle rose
#

(genuinely asking, I've never heard of it)

autumn tide
#

The modder's inactive, but their permissions are fairly restrictive, I sent them a PM on Nexus just in case. I'd just like it for personal use too tbh

gentle rose
#

fair enough if it's for personal use, but as you seem to know you can't publish it unless they get back to you and give you permission

autumn tide
#

gotcha, ty!

#

The mod btw, I really like ithttps://www.nexusmods.com/stardewvalley/mods/9342

#

the events are so cute!!!

gentle rose
#

yeah, just found it. it seems they worked with lemur at some point so they may know if there's a way to contact them still?

autumn tide
#

Hmm okay

#

Thanks for the tip!

humble timber
#

uuh is there a console command to reload fs packs

#

brain not working rn and i do Not understand positioning

uncut viper
#

it'd be in the fs docs if anything

#

can probably be found with the help command as well

humble timber
#

oh wait found it

#

thank god theres a command for it i was gonna perish otherwise

#

lmao

autumn tide
lucid iron
#

You can always make your own krobus mod AquaThumbsup

autumn tide
#

Yeahh

devout otter
#

Yeah, if you're making a full-fledged Krobus expansion out of it, how much of More Krobus would still be in there anyway.

autumn tide
#

maybe I'll make a version with More Krobus Compatible Lore and generic

#

still dont really know how to mod tho-

devout otter
#

(I'm totally up for a collab for things other than art.)

autumn tide
#

ooh okay!!

#

can I PM you? don't wanna blow up the chat

devout otter
#

Sure.

opaque field
#

If I have two variations of an event and one of them is a "when" the community center is complete would I use the GSQ "IS_COMMUNITY_CENTER_COMPLETE" or CommunityCenterOrWarehouseDone

brittle pasture
#

CommunityCenterOrWarehouseDone checks for either CC or Joja Warehouse, IS_COMMUNITY_CENTER_COMPLETE is only the CC

opaque field
#

okie cool CommunityCenterOrWarehouseDone is the one I need then - just to be safe. ty

worldly wadi
#

Heyyyy I'm a new modder on the Stardew Valley community and I'm learning how to program my own Expansion mod.

I will add new machines, maps, NPCs, crops and more. So I was wondering if anyone could help me in a few matters or even be friends!

I wanted to ask about compability first, my mod's map will modify the backwoods, and I really really reeeeealy wanted it to be compatible with SVE, but on their wiki it's said that if you change certain maps (it's a list where it includes Backwoods), SVE is incompatible, but RSV makes a few changes to it and it works perfectly fine. I won't change much, I even researched what the base game and mods change in the Backwoods, I only added stairs.

So I was a bit confused abt that and wondering if someone could help me in this matter.

#

Sorry if I misspelled something, English is not my first language and I'm still learning (⁠●⁠´⁠⌓⁠`⁠●⁠)

brittle pasture
#

the big thing about Backwoods is that NPCs can't walk through it

#

the SVE thing is not that your mod will be incompatible, but that you'll need to do extra work for SVE compat

#

but yeah the NPC thing

#

that's the bigger problem

lucid iron
#

For ez compatibility just use central station to bus/boat/train to your place

autumn tide
worldly wadi
#

Really? Awww :/// I chose the backwoods bc it was closer to the farm
I'll try to find somewhere else to change so the NPCs thingz will work

#

But I might keep the stairs, so it will be easier for the farmer

worldly wadi
#

I love Krobus too

vernal crag
#

How do I move rock debris that prevents access to Mine till day 5 in Mountain location?

gentle rose
#

I think that might be hardcoded

#

what are you trying to make?

vernal crag
#

SVE moved it but I couldn't find it in CP part

I changed that location a bit, so I need to move it like 2 tiles left or something

uncut viper
#

it is hardcoded

autumn tide
oblique meadow
#

This should have a simple answer but Im not finding it on the wiki.

Im trying to spawn a chest as part of a new save in the farmhouse. the code is:

"FarmHouseFurniture": "709 6 6 0 1466 9 6 0 130 6 9 0 130 6 10 0 1614 6 3 0 1614 10 3 0",
Which according to Data/Bigcraftables is the chest ID. However when the house spawns this is happening:

brittle pasture
#

FarmHouseFurniture is for furniture only

uncut viper
#

it will be changed in 1.6.16

oblique meadow
#

awww poo

#

ok

#

easy enough

#

Thanks both

uncut viper
#

it also is only ints, not string furniture IDs

winged charm
# latent mauve Try adding a second schedule point for each of those keys, it might be behaving ...

Hey I tried that line of code for the schedule, but it still having issues parsing it's stating that it's something wrong with the first few lines of the schedule. I copied it straight from the guide on the modding wiki.

    "Changes": [
        {
            "LogName": "Aiden Schedule",
            "Action": "EditData",
            "Target": "Characters/schedules/{{ModId}}_NPCAiden",
            "Entries": {
                "spring": "610 BusStop 15 23 3/630 BusStop 19 23 2",
            }
        }
     ]
}```

[Content Patcher] Can't apply patch Aiden - Custom NPC > NPC Schedule to Characters/schedules/Aiden.Haydel_NPCAiden:
StardewModdingAPI.Framework.Exceptions.SContentLoadException: Failed loading asset 'assets/data/schedule.json' from SMAPI\aiden.haydel: an unexpected error occurred.
 ---> Newtonsoft.Json.JsonReaderException: Can't parse JSON file at D:\Program Files (x86)\Steam\steamapps\common\Stardew Valley\Mods\Aiden - Custom NPC\assets\data\schedule.json. This doesn't seem to be valid JSON.
Technical details: Unexpected character encountered while parsing value: [. Path 'Changes', line 2, position 13.
uncut viper
#

(though i should say i dont actually recall if itll be dehardcoded away from furniture in 1.6.16 actually)

#

(it might jus be dehardcoding the int part? i think its already in the alpha build though but i dont have that installed to check)

calm nebula
#

There is a way to spawn bigcraftables iirc

#

In the building data

#

Not sure it works for farmhouses

#

It definitely won't make a proper chest

brittle pasture
#

maybe FTM can work SDVthinking

calm nebula
#

I have no idea what is or is not in 1.6.16

#

I assume it'll be great!

#

But i have no kept up on 1.6.16 news

brittle pasture
#

the important part is that it won't add Moss 2 SDVpufferpensive

royal stump
#

SDVpufferlurk yeah, FTM can do a chest with specific contents (of the specific chest type/sprite that players make, not the farmhouse gift box ones) and spawn placed BCs in general, fwiw

#

or rather the chests despawn after opening, they just look like crafted chests

winged charm
royal stump
#

I should probably add more options to that in the 2.0 stuff

winged charm
worldly wadi
brittle pasture
winged charm
#

You mean schedule.json itself? :o

#

I did, but it's something with the first few lines before the logname. Would you happen to have an example of schedule.json that I can use to test maybe?

uncut viper
#

the thing is the error you posted does not match the json you posted

winged charm
#

Here is my current schedule.json I have in my mod's folder and the error SMAPI gives me :o
https://smapi.io/json/content-patcher/e0f2f59763474a9ab5591d012ed80f52

[Content Patcher] Can't apply patch Aiden - Custom NPC > NPC Schedule to Characters/schedules/Aiden.Haydel_NPCAiden:
StardewModdingAPI.Framework.Exceptions.SContentLoadException: Failed loading asset 'assets/data/schedule.json' from SMAPI\aiden.haydel: an unexpected error occurred.
---> Newtonsoft.Json.JsonReaderException: Can't parse JSON file at D:\Program Files (x86)\Steam\steamapps\common\Stardew Valley\Mods\Aiden - Custom NPC\assets\data\schedule.json. This doesn't seem to be valid JSON.
Technical details: Unexpected character encountered while parsing value: [. Path 'Changes', line 3, position 2.

latent mauve
#

Since it doesn't have a Format line, I'm guessing that you're using an "Action":"Include" in your content.json that pulls the file?

#

That, or you're cutting out the rest of the content.json file to put in the json validator

uncut viper
#

oh, its expecting a string to string dictionary i bet

#

im guessing you are trying to Load this file to their schedule instead of including it

winged charm
latent mauve
#
      "LogName": "NPC Schedule",
      "Action": "Load",
      "Target": "Characters/schedules/{{ModId}}_NPCAiden",
      "FromFile": "assets/data/schedule.json"
    },```
#

yep, you called it, Button

uncut viper
#

it was you mentioning the include part that clued my brain in!

#

teamwork makes the dream work n all that

#

the error is because when you Load the file, its trying to use that file as the schedule.json itself. its not trying to use it as a list of content patcher patches

#

so it thinks "Changes" is the schedule key

#

and then it gets confused because its looking for the actual schedule data after it but instead finding the [

winged charm
#

Crazy because I followed the example for Jeans and Jorts from the modding wiki https://stardewmodding.wiki.gg/wiki/Tutorial:_Making_a_Custom_NPC#Schedule
I pasted a part that goes into my content.json from the wiki

Stardew Modding Wiki

So, you're interested in creating a new character for Stardew? Good news: with version 1.6, creating a character is easier and allows for more flexibility than ever. However, NPCs are one of the more complicated things to create for Stardew, as they have a LOT of moving parts. This guide aims to provide...

uncut viper
#

well you didnt follow it 100% bc that example says Include SDVpuffersquee

latent mauve
#
            "LogName": "NPC Schedule",
            "Action": "Include",
            "FromFile": "assets/data/schedule.json"
        },```
winged charm
#

Theres no way :(

latent mauve
#

from that tutorial, see how it doesn't have the Target there, and it's Include instead of Load?

#

I think you mixed the Include and EditData blocks together by mistake

winged charm
#

I do. I think I changed it when converting from the old format to the new one

uncut viper
#

mistakes like that happen to the best of us sometimes!\

winged charm
#

Theres no error this time!! But now he doesn't move and is not interactable 🙃 But this is progress!

#

Hey, what did you mean by using EditData on a Blank.json file? Would that make the NPC able to be interacted with?

dusty scarab
#

I'm getting this error when I try to load my new mod, and I don't understand what it's saying beyond 'cannot convert the data in your json into objects'. I've attached the first three entries in my data/objects.json, since the error mentioned entry #3. does anyone know where I went wrong?

uncut viper
dusty scarab
#

sure

ocean sailBOT
#

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

latent mauve
#

It's not always needed, but it helps if you want to be able to EditData on a Target that doesn't exist yet, and lets you use tokens freely in your Entries for that EditData block without running into issues.

#

Basically: If you do "Action":"Load" to load a JSON file that has stuff like {{ModId}} in its Entries: { ... } field, CP can't read the tokens. So, "Action":"EditData" is needed instead, but you can't do that on a game asset that doesn't already exist. Loading the blank.json to the Target creates that game asset so you can write to it. 🙂

winged charm
#

Ooohhh so you're referencing an empty file, then having the game write it's down dialoge from content.json into blank.json

latent mauve
#

Yep!

winged charm
#

🤯

uncut viper
uncut viper
#
"CustomFields": {
  "spacechase0.Spacecore/...": "..."
}
#

(very good reason to always go to the smapi uploader, not screenshots. this was not shown in your screenshots)

dusty scarab
#

it says in the SpaceCore documentation to put it into the Custom Field, so I can only assume that I did it incorrectly. what is the correct way to do it?

uncut viper
#

i just showed you

dusty scarab
#

oh, derp me

uncut viper
dusty scarab
#

thank you very much :)

uncut viper
#

Dictionary/Object = {}, List = []

#

so just remove your [ and ]

dusty scarab
#

ahhhh, so I had a pair of closed brackets that shouldn't have been there, and that's why it was throwing that error?

uncut viper
#

your pair of brackets changed the field from a Dictionary to a List of Objects

#

Entries for example is a Dictionary, and Changes is a list of objects. Patches are Objects since they are inside { }, so Changes is a list of patch objects

#

but ofc you cant just change what type of field the game is expecting for something. CustomFields is a Dictionary, so it must be formatted as a dictionary

#

oh, and a List is also called an Array

#

hence the error mentioning arrays

dusty scarab
#

ahhh, ok, I think I understand it now. thank you for explaining it to me. I learned something today :D

uncut viper
dusty scarab
#

I will definitely give that a read later :D

white vale
#

In content patcher, is there a way to use the when condition to check if another mod's config setting is enabled or disabled? Don't think it's possible but figured I'd ask

violet valley
#

Is there a way to make a map edit directly after you see an event?

lucid iron
white vale
#

thank you guys

violet valley
#

Does anyone know? Its okay if not 🙂

urban patrol
#

yep, the condition HasSeenEvent with an update rate of on location change

#

and you can end your event with a warp out so that when the player enters the location again they'll see it

violet valley
#

I mean like as soon as the event ends. is that possible or should I just do that?

humble timber
#

i think the easiest way would be warping out

#

but im not super knowledgeable

urban patrol
#

i think you may be able to change map tiles while in the event but not sure if it'd stay

#

and that would be frustrating to do one tile at a time

violet valley
violet valley
latent mauve
#

Two ways to do it: OnLocationChange with a forced warpout at the end of the event, or force the event to happen immediately on entry to the location and already have the change active in the background on that day and have a temporary map or extra tiles with it unchanged for the event.

humble timber
#

ohh sneaky

latent mauve
#

I went with the second option for my Deku Forest/master sword event code.

violet valley
#

Wdym have it change active in the bg? how would I do that? lol

urban patrol
#

change it on day start according to whatever condition (set a mail flag perhaps) and then have the event take place on a temporary map

latent mauve
#

I have the condition for the event and map patch set to the same thing so both become active on the same day, but when the player enters the location, I initiate the event immediately and change them to a Temporary Map that's just another version of the map before the patch.

violet valley
#

ah ok. thanks for the help guys

latent mauve
#

Depending on how much changes, you can also just use the Add/Remove tiles event commands (exact commands escape me at the moment) to change them during the event as if the patch hasn't happened.

violet valley
#

thats a thing? didnt know abt that

#

would it stay?

latent mauve
#

That would be part of the 2nd option, so that you aren't using a Temporary map, because the changes don't necessarily stay outside the event.

violet valley
#

ok. I think I'll just use a mail flag with temp map(s)

white vale
lucid mulch
#

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

your screenshot is way too zoomed in to get enough context

latent mauve
#

So for a use case example: In my event, you pull the master sword from the pedestal during the event. So the map after the event needs to have the sword missing. I use the event command to change the pedestal tiles to the version with the sword present, and then change them again to the version without the tiles after the sword pulling animation happens.

Before the event has even triggered, though, the map patch to change the sword pedestal has been activated. So when the event ends, they see the map with the empty pedestal.

violet valley
#

Talking to me?

latent mauve
#

I was

violet valley
#

alr

uncut viper
violet valley
#

oh wait is it changeMapTile?

#

And is changeMapTile permanent?

latent mauve
#

I do not know if it's permanent, but I usually assume it's not.

violet valley
#

Dang ok

latent mauve
#

You can always change it back on your event fadeout if it does turn out to be permanent and that's not the desired result.

violet valley
#

Change what back?

latent mauve
#

The tile

violet valley
#

oh

lucid mulch
uncut viper
violet valley
latent mauve
#

In my case, since I have the event trigger as soon as you enter the location, my conditions for the map patch and the event preconditions are the same.

lucid mulch
violet valley
lucid mulch
#

maybe it was meant to be Fields rather than Entries, which everything else was

uncut viper
#

oh that does seem likely. i got tunnel visioned bc it was a ping about CMCT lol (but do still remove those braces)

latent mauve
#

It's why vanilla has a lot of events that happen "the next day"

violet valley
#

Ok. Tysm for the help SDVpufferheart

white vale
#

The braces did seem to be what was causing the issue. Sorry I was using SeedShop as dummy code to easier test if the when condition was actually working. For some reason it's working with LantanaLoveShop but not SeedShop, even without brackets, so I'll need to test further.

violet valley
urban patrol
#

the advantage of doing it lily's way is that you don't have to do it on location change, which is more resource intensive than on day start

white vale
#

https://smapi.io/json/content-patcher/162e654c1fda420c91b3160e0a8c5b96 Lines 121-136 still produce the error (this is just a test code to see it's working). ApryllForever.CPPolyamorySweet_AineFlowerSeeds is added to the shop by another mod, I am just editing it's selling price. If I remove CMCT's when condition, it edits the item's price correctly. I wonder if CMCT doesn't like the fact I am editing another mod's items without specifying the ID.

violet valley
#

for what im making?

uncut viper
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.

ocean sailBOT
#

Log Info: SMAPI 4.3.2 with SDV 1.6.15 build 24356 on Microsoft Windows NT 10.0.26100.0, with 105 C# mods and 81 content packs.

urban patrol
#

it depends on how you do it. if you update it on day start, then switch to a temporary map in the event (which triggers as soon as the player enters the location), then they'll never see the location in between you changing the map and them seeing the event.

however, if you want to do it on location change, then you can do it on warp out like how i originally suggested. it just depends on which method you want to do

#

but there's no reason to do it with the temporary map during the event AND having it be on location change

violet valley
#

im not -

would this work?

use a mail flag, then make the mapedit with onlocationchange and then use a temp map for most of the event?

urban patrol
#

i don't understand why you would want to do that, so maybe it would help if you explained why you would want to/what you're trying to do, specifically

white vale
lucid iron
#

how do i safely delete an NPC yggy

#

can i just remove em from their location

violet valley
#

ok. so basically,

the wizard will send a letter asking to meet up in my area, and then a event will start when you get there and then in the event he will do an animation where after that it will make a map edit, so my reason to do that is to make it change after

#

I gotta go, but trust me it makes sence for what im making

urban patrol
#

i believe you! i just was trying to get more information about the desired effect you were hoping to achieve

latent mauve
#

Okay, so the method I use is perfect for that if you reword the letter to meet the Wizard the next day.

#

If you'd prefer it the same day and are okay with the performance hit, then you use the other option with the warpout that nic mentioned.

uncut viper
uncut viper
latent mauve
#

Sending them to the shadow realm is fairly simple.

lucid iron
#

make them not go into the save

#

shadow realm them

uncut viper
#

do you want them back again later

lucid iron
#

here's the context

uncut viper
#

the game just does GameLocation.characters.RemoveWhere() to delete broken NPCs so

lucid iron
#

ok fair enough i shadow realm broken kids

#

i wonder if it's a good idea to just always remove the npc version of the kids

urban patrol
#

bad and naughty children get sent to the pear wiggler to atone for their sins

lucid iron
#

since for the most part im treading the Child version as the real one

winged charm
lucid mulch
urban patrol
lucid mulch
#

Oh TIL npc's in WitchHut get nuked before saving

lucid iron
#

isnt that like the same thing blobcatgooglyblep

#

but my concern is more about implications

#

what do the NPC flavor of kids lose by not persisting basically

latent mauve
#

The example I linked earlier is the bare minimum for a talking NPC that isn't a map tile.

uncut viper
#

like a teleporter

winged charm
lucid iron
#

im just letting them be spawned by game stuff tho pippleDot

uncut viper
#

then it'll probably be fine

#

and if it isnt you'll probably find out

winged charm
lucid iron
#

it just that i wanted to handle the case where someone uninstalls a HMK mod

uncut viper
#

just dont put moddata on them

lucid iron
#

bc i have actually bypassed the npc removing thing in Game1.fixProblems by making them sorta valid

latent mauve
lucid iron
#

im probably worrying about this too much

latent mauve
#

I didn't use any includes, so it's all there except for the blank.json, so you can see how it gets formatted

urban patrol
# winged charm I do, yes. I have it in it's own file

!json take your time, but it would help if we could see each relevant character file, any errors you get in your log, and a screenshot of your mod folder. if any essential NPC parts are missing or aren't working, then they won't walk/talk/etc

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
#

When I did SinZational Shaded Spaces, I didn't go with the "cleanup the save so it can be loaded without the mod", I went with patching the game until it stopped crashing when loading the save in its state

urban patrol
#

but yes please make sure your files match any examples that have been sent

lucid iron
#

ok that sounds like approxmiately what im doing ig thats fine kyuuchan_run

lucid mulch
#

Some fun hacks required to make the approach not explode for farmhands, but if you are only dealing with NPC's you might be fine

#

locations were much more sensitive

lucid iron
#

i never remove the actual Child anyways only invisible them

winged charm
#

In regards to my current content.json

urban patrol
#

Include and EditData are different formats. when you include a file it tells CP "look at everything in the file located at FromFile and act like it's inside of content.json". EditData is an actual patch that targets a game asset

#

so, yes, if you have the formatting correct

winged charm
#

So for my external NPCGiftTastes.json, I'll either use include or just place it in content.json itself

urban patrol
#

yep! include is sort of kind of like a copy/paste

uncut viper
#

Include basically says "use this other file as another content.json"

#

(minus the Format field)

#

(and ConfigSchema, etc. just Changes)

lucid mulch
#

(and dynamic tokens, configschema and aliases)

uncut viper
#

(its ok no one remembers aliases anyway)

lucid mulch
#

I do, mainly because it makes the internal codebase kinda confusing as they are referred as Local Tokens

uncut viper
#

in this case you take on the role of aliases georg /lh

lucid mulch
#

I don't think I've seen a mod actually use them, it would be useful for modded tokens that get quite long, but no mod example will use them because its extra effort to explain and setup the alias.
and the constraint that it must be the token itself, so many just use dynamic tokens for it anyway

humble timber
#

aliases georg...

calm nebula
#

There's a Game1.fixproblems but is there an Atra.fixproblems SDVpufferthinkblob

uncut viper
#

no, thats stuck in atracore and tangled up in its weird compile setup

lucid mulch
#

it is good that CA took the twitter/reddit suggestions to get rid of bugs and simply call the fixproblems method

uncut viper
#

more gamedevs should take after him i think .

lucid iron
#

is SaveLoaded before DayStarted

lucid mulch
#

yes, but wont be called for the save creation flow

calm nebula
#

Yes

lucid iron
#

ty

#

i admit i asked instead of checking cus you 3 r here

uncut viper
#

it is however after the games own DayStarted process

#

its prior to the SMAPI DayStarted

lucid mulch
#

and I think farmhands either always call it (regardless of how save got made) or never call it, I can't remember

uncut viper
#

also it is called after creating a new save

calm nebula
#

Farmhands call it

#

It's possible it's not called after creating a new save

#

I think SaveCreated does that

uncut viper
#

the wiki says it includes after the first day after creating a new save

lucid mulch
#

new save behavior can also be different if you skip the intro or not

uncut viper
#

not after the first day i typo'd a bit

calm nebula
#

Oh, DayStarted is called

#

At some point

uncut viper
#

just "including the first day after creating a new save"

calm nebula
#

You know what button

#

I'm running on approximately way too little sleep to make any sense

uncut viper
#

we also still dont know which DayStarted Chu meant

calm nebula
#

I'm going to call atra.fixproblems which is going the fuck to bed

uncut viper
#

gnight then! enjoy sleep

lucid mulch
#

if you asked me this 18 months ago I could have diagrammed exactly how it all worked as I became an expert on it when working on shared spaces

kind shell
#

im making a c# based add-on to my farmhouse that makes the lights come on when the player's spouse or kid are home & awake during the evening/night or on rainy days, ive run into a lot of issues partially because its my first c# mod and i'm not super sure what i'm doing, but i got a lot of stuff working now - it's just that the lights are rendering on top of the player changing the layer depth does not seem to make any difference, does anyone have any suggestions?

lucid iron
#

light maps goes above things yes, although it doesn't look like you have a light map per say?

#

that looks more like a draw layer bolbthinking

lucid iron
#

what is defined as "awake" here

#

mmap does actually have a thing for conditional draw layers as well, but it kinda depends on whether the thing you want can be specified as a GSQ

latent mauve
#

sirroofsalot: You've already been answered but on a permissions level: absolutely, feel free to yoink that example and replace all the relevant bits.

#

That goes for anyone here. ❤️

#

I only made it to test the dialogue priorities, LOL

kind shell
#

yeah, its not a light map i'm using SpriteBatch.Draw to render ot

lucid iron
#

yep so you are drawing at the wrong layer depth Dokkan

#

you want to just do all the non-vanilla features in your C# dll and not take on dependency right?

winged charm
#

It's failing to load blank.json I have absoluely nothing in the file, but do I need something in there atleast to get it to work? <:)

lucid iron
#

you need {}

#

that makes it a valid json

winged charm
#

ofc 😮‍💨

kind shell
lucid iron
#

well if you define what is meant by "spouse sleeping" you can actually just use mmap to do it monS

kind shell
#

i was trying to just define spouse sleeping or in the house in c# make it a token for CP and go from there, but CP was only checking tokens at the start of the day so my design was just always failing D:,

lucid iron
#

it looks like spouse is always sleeping at time=2200

#

or at least, will attempt to path to sleep Bolb

kind shell
#

yup i finally figured out it wasnt some super dynamic thing lol, between diff spouses so i'm just killing the lights @ like 10:30 at this point

lucid iron
#

in mmap you can control draw layers by a game state query

kind shell
#

so from 6:30 to 10:30 i check if their location is the farmhouse and if yes turn on the lights

lucid iron
#

this particular example uses a custom gsq i added, but it can just be TIME 2200

#

and player married ofc

#

this wouldnt need C# cus, i wrote the C# already kyuuchan_run

kind shell
#

i see, i seee

lucid iron
#

as for doing it yourself the approach i'd go with is

  1. SMAPI Event Warped, new location is Farm
  2. Do checks to determine if you need the LightSource and the Draw at this time
  3. For draw, find the farmhouse Building instance on map (iterate location.buildings), and then find out it's layer depth by copying the game's math, also get to check what upgrade here. Do the actual drawing in some smapi event render step
  4. For light source, simply add new LightSource at the right spot game does the rest
#

remember to handle split screen by abusing PerScreen PecoSmile

kind shell
#

ohh okay i'll def try getting the layerdepth for the farmhouse, i have it so the check if the spouse is home code runs every hour the player is on the farm map and when they enter the farm map, so the lights can pop on while your on the exterior

lucid iron
#

game's math is (building.tilesHigh.Value * 64 - building.GetData().SortTileOffset * 64f)/ 10000f;

kind shell
#

okay i have no idea abt split screen, lol but i'll worry about it when i get the first draft working i guess

lucid iron
kind shell
#

okee i get you!

lucid iron
#

still, i really do think i already wrote all the C# you need lol (mmap's condition thing also updates every 10min while at location)

#

but i support doing it just 4 fun Dokkan

dusky sigil
#

what is the name of the sound effect for warping with an obelisk? i swear i've read the audio modding page like 3 times and i can't find it

lucid iron
#

"wand"

dusky sigil
#

thank you so much

uncut viper
#

question about the shadow realm: i know that if a location is not active, and a Farmhand is not in that location, that location is a shadow location. if the Farmhand is in a location, they can trust that the data they see is real
but what if I am a farmhand and a different farmhand is in a location? do I also receive the data for that location, or does only that specific farmhand get the real data while I still see the shadow realm?

lucid iron
#

why would you (farmhand A) need data made real for someone else (farmhand B)

uncut viper
#

in case i have a GSQ checking the data in farmhand B's location

lucid iron
#

no i mean, i feel this would need extra work that is unlikely to be done accidentally right

#

so gut feeling says it wouldnt work, but always test cus what if spaget

lucid mulch
#

a farmhand only has their local location and AlwaysActive locations being syncronized and being active.
other farmhands dont change that

uncut viper
#

not non-AlwaysActive locations that the host is currently in?

lucid mulch
#

hosts location doesn't change that equation either afaik

uncut viper
#

just to double check

#

understood then, thank you SDVpuffersalute

lucid mulch
#

host sees everything because they run the world, everyone else sees the bare minimum

uncut viper
#

will a farmhand at least always know where other farmhands are, or are there shadow farmers

lucid mulch
#

yes

#

no shadow farmers as farmers aren't stored in the location instance but on the team netroot

uncut viper
#

good enough for me then, thank you again

lucid mulch
#

the world map even in vanilla shows where all other farmers are

uncut viper
#

id forgotten about that

lucid mulch
#

back in 1.5.6 the farmhands were part of the cabin but that got cleaned up in 1.6

winged charm
#

And thank y'all for all of the help still :D

urban patrol
winged charm
#

900 it is then ☝️

urban patrol
#

also i'm not sure if this is a problem, but you don't have a space between your targets of your blank load

winged charm
#

I CAN SPEAK TO HIM ONLY ON THE FIRST DAY????

#

And after sleeping to day 2 I can no longer speak to him SDVpufferflat

urban patrol
#

if i'm reading this right, you don't have an entry for tuesday/spring 2/etc

winged charm
#

Oh so spring isn't a generic dialogue for every day. I would need a dialogue for every day :O

urban patrol
#

someone correct me if i'm wrong, but dialogue isn't like schedules where spring is the default for any day that isn't defined, i think?

urban patrol
uncut viper
#

and correct, spring is not a dialogue key

winged charm
uncut viper
#

that lines up with what nic said

urban patrol
#

if you're interested, there's a template out there for dialogue based on heart level

winged charm
#

I would love to incorporate that, yes please! For now I can start making more progress on the dialogue finally :D

urban patrol
#

you don't have to use every line included here

#

use [[Modding:Dialogue]] to look up what each key means

winged charm
#

Awesome!! I'm really excited to work on this mod more, and thank you for the link

latent mauve
#

Oh, yeah, my apologies, my example only had those three keys because I was specifically testing to see if spring_1 read properly

winged charm
urban patrol
#

if you want it to be a click-through, use #$b# instead

winged charm
#

Oh thats what it's for :O

urban patrol
#

yep! having two sets of " " in the value will break it

winged charm
#

And what would be the difference between something like "Tue" and "Tue2"? That would be the 2nd Tuesday of the month right?

urban patrol
#

Tue2 would be tuesday at 2 or higher hearts

golden basin
#

how would i add a location to the default world map?

golden basin
#

so i dont show in the farm when im in my custom location

winged charm
#

Oh this is all in the wiki, then I'll keep looking through it. Thank y'all again for helping with my troubleshooting and questions SDVpufferheart

golden basin
#

i know it I need to edit the world map data but i just dont really know how

urban patrol
golden basin
lucid iron
#

can you use content patcher to replace a map tilesheet's image source NotteThink

golden basin
#

cause it shows how to add a new location but not hwo to edit a vanilla one? and thats what i want

#

like its weird i dont know id ont get it pfpf

winged charm
#

Everything is starting to click

urban patrol
vital lotus
#

Do we need NPC map locations for that?

golden basin
#

thats different

#

im talking the vanilla world map

urban patrol
#

yeah it's only tangentially related

#

yeah, in my json i 1. EditImaged the world map, then 2. defined map areas and stuff

#

ignore my comment in there of NOT WORKING it works lmao

vital lotus
urban patrol
#

this is my image edit if you want to compare pixels etc

urban patrol
#

it took me many many tries to get the actual data for the world map correct so don't feel discouraged if it doesn't click for you

vital lotus
#

Would still be a long while for me. But it def should come handy for Clown

#

Is the mod released yet?

#

Or should I save the json?

urban patrol
#

feel free to take any code you like from there

#

it's also up on github if you just want to view the files without DLing

vital lotus
#

Aww, that's nice

#

Will give a more thorough look on the mod later

urban patrol
#

feel free to @ with questions (though i may be in bed in a few hours)

golden basin
#

there it worked sort of

#

im getting it

urban patrol
#

nice!

golden basin
#

i jsut cant seem to get the tooltip working

urban patrol
#

the tooltips pissed me offffff

golden basin
#

can i show my code?

urban patrol
#

trying to remember what i did wrong first

#

yeah sure!

golden basin
#
"Action": "EditData",
"Target": "Data/WorldMap",
"Entries": {
"BaseMap": {
     "Tooltips": [
          {
            "Id": "{{ModID}}_Gradys",
            "Condition": null,
            "KnownCondition": null,
            "PixelArea": {
              "X": 119,
              "Y": 112,
              "Width": 5,
              "Height": 5
            },
            "Text": "Talon Resident's",
            "LeftNeighbor": "Forest/WizardTower",
            "RightNeighbor": "Forest/LeahCottage",
            "UpNeighbor": "Forest/MarnieRanch",
            "DownNeighbor": "Forest/SewerPipe"
          }
        ],
// the in-game locations that are part of this world map area
"WorldPositions": [
{
            "ScrollTextZones": [],
            "Id": "{{ModID}}_Gradys",
            "Condition": null,
            "LocationContext": null,
            "LocationName": "{{ModID}}_GradysHouse",
            "LocationNames": [],
            "TileArea": {
              "X": 0,
              "Y": 0,
              "Width": 0,
              "Height": 0
            },
            "ExtendedTileArea": null,
            "MapPixelArea": {
              "X": 119,
              "Y": 112,
              "Width": 5,
              "Height": 5
            },
            "ScrollText": "{{i18n:FC.Gradys}}"
          },
]
}
}
}```
urban patrol
#

does BaseMap exist in vanilla or is that yours

golden basin
#

vanilla

#

i dont have a map im adding to vanilla

urban patrol
#

ok let me check unpacked files rq

#

i remember MapAreas being important. i'm pretty sure that you have to TargetField Valley, Map Areas and have tooltips underneath that

latent mauve
#

lemme see what I did for my custom area

urban patrol
#

i think you have to drill down by region > map area > map area position, according to the wiki

#

it's not very intuitive to me though

latent mauve
#

this is my working Deku Forest area for the world map stuff

urban patrol
#

ah yeah then i think the target field is necessary!

golden basin
#

thank you!

urban patrol
#

yay!

golden basin
#

there we go

white vale
#

In visual studio code, is there an easy way to make auto-formatting make something like this (Image 1) look like this (image 2)? Like can I just tell it to stop formatting anything inside the RandomAmount field or something?

brave fable
#

nope ☀️ if it's too long, just collapse it with the downarrow in the left gutter

white vale
#

is there an easy way to automatically do that... it's like.... I got (according to search) 786 entries like that lol

brave fable
#

some extensions exist to change the rules a little for file auto-formatting, but it's unlikely you'll find something that's exactly how you want it, because it was made exactly how someone else wants it

white vale
brave fable
#

i'll be honest i'm a little scared at the amount of entries there

#

is there no way of automating what you're doing?

white vale
#

shrug lol

brave fable
#

if i had maybe 10~20 entries i'd start asking how i can start reducing all the duplicate lines

placid pond
#

Can I ask for help with json files here or does it have to be in the tech field? (I'm adjusting a dialogue mod and it's not even the dialogue I've actually edited giving me issues nor is it causing my overall game issues... I just need help)

white vale
#

I only know how to use content patcher, so it's limited in that regard. Not sure how to simplify adding variances to shop stock across vanilla, 20 mods and dozens of stores. They all require their own entry one way or another, since it's a balance mod that has to edit multiple variables

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.

placid pond
#

That's the first one

placid pond
#

this is the second

#

I've been staring at the code for 30+ minutes and I don't know what to do

urban patrol
#

you're missing commas at the end of some of your lines

white vale
urban patrol
#

see how the validator points out lines?

placid pond
#

Yes

urban patrol
#

look at the lines above where it points out unexpected characters

placid pond
#

But with the lines, it points me towards I can see the commas?

brave fable
#

the line above where it points out

#

as far as the json parser is concerned, the issue isn't a missing comma, it's the " that it's found on the next line instead of a comma

urban patrol
#

a good 80% of the time i'd say an "unexpected value" error is a missing comma or bracket

brave fable
#

of course, the lines each seem to have their own issues anyway

#

line 74 reads as "Roommate.Nearby(*)(Heart>=0):0": "#Npc.Nearby(*)(Heart>=0)", "See you later, {npc}!" , which is a key with what appears to be two values

#

same for line 75

placid pond
#

Ahh

brave fable
#

this isn't legal json, so you'd need to clarify what you were aiming for here to decide on a fix

urban patrol
#

oh good catch

placid pond
#

That mod kinda came like that ngl (but thank you)

#

Do you have any idea what's wrong with the other one?

urban patrol
#

also, just for the future, discussion of NSFW mods is against the rules in here

placid pond
#

ahhh, sorry

#

my bad

blissful panther
#

(I assume you found your answer! SDVkrobusgiggle)

pine elbow
drowsy pewter
#

I'm confused why CP can't parse this line, can i not put tokens inside dynamic tokens?

"PerItemCondition": "ITEM_ID Target {{CartStock_{{Random:1, 1, 1}}_ingredients}}, !ITEM_CONTEXT_TAG Target traveling_cart_banned",

({{CartStock_1_ingredients}} is a dynamic token)

https://smapi.io/log/ac2a061fd0714e99ad16f30370679a3d

ocean sailBOT
#

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

lucid iron
#

No tokens in a token name i guess

finite ginkgo
#

Correct, you can't have dynamic token names

lucid iron
#

You will have to make a CartStockMerged token

uncut viper
#

you cannot use a token to be parsed into a token name

drowsy pewter
#

Not so dynamic now, is it

drowsy pewter
lucid iron
#

Yeah extra one that collects the other values

drowsy pewter
#

Doesnt sound too bad

lucid iron
#

Although given the location you sure you can't just gsq?

drowsy pewter
#

I want multiple groups of items listed by id to pull from, I can also put it in the shop entries or use gsqs and stuff but it would put the id lists inside the shop entry code, and thats a little more annoying to list all together in one huge conditions secion idk

#

like 20 groups each with 20 items

lucid iron
#

Does RandomItemId work for you

drowsy pewter
#

its already random

#

The dynamic token randomization is in order to select a random group of ids

#

then the shop listing selects a random set of ids from within the larger selected group

#

Normally id use context tag gsq but the group contains a list of items from vanilla and various mods, so I would have to patch a context tag into hundreds of items if i wanted to do that approach

lucid iron
#

No the RandomItemId list

drowsy pewter
#

I dont know what you're referring to then

lucid iron
#

By default i random the vanilla milk

#

Hm i forgor to add the When vmv lol

drowsy pewter
#

Same issue tho, I dont just want random items within a list, but random list within a set of lists. If I used RandomItemId, I can do that, but I'd be copying the same shop entry 20 times and just changing that value

#

id rather have the lists written up somewhere else thats easier to compare them side by side, like in the dynamic token section

lucid iron
#

But i meant to add it When vmv for mod support kyuuchan_run

#

Hm so i think my confusion comes from you using ITEM_ID

#

I thought that can only check for 1 thing

drowsy pewter
#

nope it takes a list

lucid iron
#

Do you need to Render it then

#

So that it's space delim

#

Instead of comma delim

drowsy pewter
#

No just have to write it with spaces between?

#

I write the dynamic token by hand

lucid iron
#

Ah ok it make sense now Dokkan

icy whale
#

is there a mod for an island

#

like there’s ginger island

#

but has anyone made another island mod? 🤔

hallow prism
#

there was mermaid island but i believe it's not updated yet

drowsy pewter
#

Well too bad I can't just random the number in there but I just did this in another dyanmic token so I dont have to shove this into my shop entry

hallow prism
#

i wonder if you could do stuff like cartstock_ingredients_numbers and then have {{CartStock_Ingredients}}_{{Random:1, 1, 1}}

drowsy pewter
#

It would fill the value of {{CartStock_Ingredients}} not {{CartStock_Ingredients_1}} hehe

finite ginkgo
#

Since they're already space delimited, could you not put all lists in the same DT separated by commas and use {{Random: {{CartStock_Ingredients}} }}

drowsy pewter
#

Ahhhhh

#

There's a thought

#

Not bad, I think I'll try that. The dynamic tokens in this mod are already gargantuan beasts

lucid iron
#

-# what if local tokens

drowsy pewter
#

I saw you guys talking about local tokens the other day but honestly the coding for this mod is so close to being done

lucid iron
#

I didn't suggest it for this usecase because idk if it'll actually work on a list (randomitemid)

#

It's jank over there kyuuchan_run

finite ginkgo
#

Not sure how LTs would help here, it's only one entry

brave fable
#

if nothing else it'd delay the mod being done a little longer

#

maybe even break it. the possibilities are endless

lucid iron
#

Well assuming it did work, you would include several different entries using SYNC_RANDOM probably

#

But im fairly sure it wouldn't so moot point here

drowsy pewter
gray bear
#

heck yeah breaking things CMTYhammer_WOMBATspeed

blissful panther
#

(Quick sanity check... we never did get a vanilla/CP way to regrow things like stumps/logs, did we? SDVpufferlurk)

hallow prism
#

i believe the ones in secret wood use a special property for that, but it may be limited to it

drowsy pewter
hallow prism
#
Stumps [<int x> <int y> <unused>]+
(valid in any location)     Adds stumps to the Secret Woods map daily. The third field for each stump appears to be unused.
Example: Stumps 24 6 3 29 7 3 26 10 3 46 6 3 34 26 3 41 26 3.```
"any location" "secret wood"
well, check how it really works i guess
uncut viper
#

must work for the forest farm somehow

brave fable
#

well it does, but in this case 'the vanilla way' is the same way all farms handle unique behaviours

blissful panther
#

Yeah, the forest farm I checked and it does do it in C#.

brave fable
#

which is a very long if-else that isn't much interested in map properties

blissful panther
#

Just for the farm! SDVkrobusgiggle

gray bear
#

meep me a stump

uncut viper
#

to be fair the mountain farm unique behavior is a map property

gentle rose
#

I think it's finally time to bite the bullet and figure out what Appearances are SDVpufferwaaah

uncut viper
#

it's what something looks like

#

hope this helps

gray bear
#

appearances are hell

gentle rose
#

ty button that helped

uncut viper
#

I expect a 50% DP share

gray bear
#

u see this? hell

gray bear
#

and local tokens but those are fun

lucid iron
#

You dun have to worry tbh

gentle rose
#

aren't appearances overlays SDVpufferthinkblob

lucid iron
#

No

gentle rose
#

and I do have to worry, I'm implementing a portrait framework SDVpuffersquee

lucid iron
#

At dialoguebox level the portrait is already selected

#

That's why you don't have to worry

brave fable
gentle rose
#

yes but I ignore that portrait and put in my own one

gray bear
#

that'd override appearances no?

uncut viper
#

it would yes

gentle rose
#

exactly, which is why I need to deal with them SDVpuffersquee

lucid iron
#

Then you can just check the current appearance of speaker

uncut viper
#

unless iro handles it

lucid iron
#

It's on a net string right

gentle rose
#

is there an overlay based portrait system that isn't just content patcher overlays, or did I imagine it? SDVpufferthinkblob

gray bear
#

also portrait framework as in give everyone a portrait when speaking?

gentle rose
#

portrait framework as in framework mod authors can use to add certain portraits

lucid iron
#

Yeah there is i heard irocendar is making it /lh

gray bear
#

cool

gentle rose
#

right now looking at hd animated talking portraits

lucid iron
#

I think you imagined it yea

gentle rose
#

(or not hd. or not animated)

#

(whatever people want)

gray bear
#

im sure some people will want hd

gentle rose
gray bear
#

personally i am aversed to animated ones but again

#

im sure some people

gentle rose
#

no, as in I'm implementing all of it and people can choose what to use haha

gray bear
#

oh, have fun

#

or, don't suffer

gentle rose
gray bear
#

i am distrubed how the farmer is on top of abigail

#

but cool

#

reminds me of this emoji

gentle rose
#

I mean I love dacar's talking animations, there's something so cool about them

drowsy pewter
#

wow, abigail is hot

next quarry
#

lol the emoji got me

gray bear
#

they are very fitting for stardew

#

considering the sound dialouge makes

gentle rose
gray bear
#

👀

#

ah yes abigail

gentle rose
#

abismodia

gray bear
#

tfw you turn into your maybe-mother

uncut viper
#

(and the "mostly" is only bc it only checks up to x:20 fsr but i think that still counts regardless)

gentle rose
#

button do you like my code

uncut viper
#

im on mobile now bc i just left the house i delayed my trip specifically to check the forest farm code and thats it

#

which is to say: i cant read that iro its so small

gentle rose
#

maybe that's for the best

uncut viper
#

lgtm approved

gentle rose
#

lgtm?

lucid mulch
#

looks good to me

uncut viper
#

looks good to me

gentle rose
#

ah

uncut viper
#

classic "i didnt really look at your PR but im approving it anyway" comment

lucid mulch
#

yeah its github culture leaking

uncut viper
#

(im sure its used genuinely too, somewhere maybe)

gentle rose
#

ty I'm submitting this as a pr to all of your mods now

uncut viper
#

you think i look at those

gentle rose
#

ew this code is so ugly who wrote this (me)

#

(not that one, a different thing)

#

Squint what was I trying to achieve here

I take care of this after lunch

lucid iron
#

I disagree with this color scheme but lgtm

gentle rose
#

why am I making it blank though SDVpufferthinkblob guess I’ll find out in a sec when I remove it and it breaks

icy whale
#

is there a mod for a bigger casino with more games?

drowsy pewter
#

ask them

patent lanceBOT
lucid iron
#

@gentle rose so iro are u replace portraiture or are you just doing this little bit Bolb

calm nebula
#

It happened

gentle rose
lucid iron
#

are you suplanting the appearance system or working within it PecoWant

crimson kettle
#

it sounds interesting for me, one of portraiture user

manic gull
#

can someone help me with my mod, can not compile it with visual studio

lucid iron
#

!startmodding

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.

lucid iron
#

Did you follow the C# guide

manic gull
#

yeah but many errors in my modentry.cs

lucid iron
#

Did you install dotnet 6

manic gull
#

yes

calm nebula
#

Can you show an error message

manic gull
obtuse wigeon
#

You're lissing many ), ;, and }

manic gull
obtuse wigeon
#

Does it say what line these issues occur on?

#

If my german is any good it should be the column to the right of Datei

manic gull
#

but there are even more lines affected

blissful panther
#

There are so many things I'm confused about here...

hard fern
#

i cant read german at all so im probably more confused..

blissful panther
#

Why is that a screenshot of it in Notepad, and why does it have Unix line endings when you're using Windows and Visual Studio?

obtuse wigeon
#

I'm not too familiar with C# syntax so I can't help very well, someone who is more familiar can offer more support,

obtuse wigeon
blissful panther
#

I think at this point, it would be easiest for everyone involved to just upload the file in question.

obtuse wigeon
#

)/}/; expected, A statement can't begin with "else", Invalid expression "else", and honestly ye an uploaded file would make it easier

manic gull
#

thank you very much for looking, I am not that talented

craggy goblet
#

If German's one of the problems here (besides all the code-related stuff, cuz that's absolutely not my kitchen lmao), I could offer myself to help?

obtuse wigeon
#

If possible could you confirm whether my translation was right? Using a mix of my very poor german skills and translation software tends to make terrible tranlations

dapper crown
#

Yes, it's accurate

#

I'm german and a Sharp-C-er

dapper crown
dapper crown
# manic gull

When you have this many errors, usually it's a cascading issue from missing a or having a surplus parenthesis/brace/bracket. If you can show me the file, you can send it to my dms if youd like, I can probably fix it.

#

wait i just noticed you sent the .rar, lemme have a look

#

1 - I'm pretty sure that there is no 4.5.0 version of the build config nuget package, so change line 12 of the .csproj to <PackageReference Include="Pathoschild.Stardew.ModBuildConfig" Version="4.4.0" />

#

2 - On line 37 you have the FQCN of your API sandwiched between a pair of double-double quotes. Remove one on each side so the line reads JA = Helper.ModRegistry.GetApi<IJsonAssetsApi>("spacechase0.JsonAssets");.

lucid iron
#

(json assets why)

dapper crown
#

3 - The same issue is repeated on lines 48, 52, 87, etc.

#

Part of me hopes im wrong but im starting to think this is AI generated code

#

Too many type mismatches and references to undefined stuff

hard fern
#

if it were it would explain how Weird it is 🤔 ?

gentle rose
#

(it would explain things like the made up format version, but things like the syntax mistakes would actually be even stranger. AI code tends to have correct syntax with made up elements, not just outright incorrect syntax)

humble timber
lucid iron
#

I never lived through those times, but I'm glad C# mods no longer have to pack JA api just to support custom items using their stuff

humble timber
#

oof

gentle rose
#

(this is not me saying whether that code is AI or not, just giving you guys hopefully some tools to use to better be able to tell in the future)

humble timber
#

heres hoping this is just someone not fully knowing what theyre doing which. is honestly relatable

dapper crown
#

That weird reference explains the type errors i think

obtuse wigeon
#

I don't know C# but I think a few things arn't quite right there

hard fern
#

huh?

#

🤔

dapper crown
#

I just dont see a way to get to this point of borked without using LLMs or working off an old-ass codebase

lucid iron
#

Stardew Valley was a good sve mod /j

hard fern
#

is stardew valley compatible with sve though

obtuse wigeon
#

There is a lot of changes, I think many things had to be removed

#

(By Yoba is this Deja Vu)

royal stump
blissful panther
lucid iron
#

Like rn if im making i dunno, eggs be smelly mod

#

I'd just look for items that r marked as smelly egg

calm nebula
#

ANYWAYS

#

That was the past

#

Chue is in the future