#making-mods-general

1 messages ยท Page 598 of 1

uncut viper
#

The original dynamic tokens are fine

lucid iron
#

having a lot of dt can be a perf problem but the "a lot" in here is pretty high monS

uncut viper
#

(though it's always better to reduce tokens that update constantly in general if possible, but its not always possible)

uncut viper
#

(plus what chu said)

lucid iron
#

its potatoes compared to editmap/editimage tbh

barren tapir
#

Great!... Still gonna need to move a bunch of things around though ๐Ÿ˜…

lucid iron
#

in a way that makes updatecontext notably more expensive

#

then combine it with something unfortunately forcing a time changed update context

barren tapir
#

So in theory, I could make "ShopThemeY" a token in C# instead of a dynamic token in a json file?

lucid iron
#

yea

barren tapir
# lucid iron yea

Dope. It'll be annoying to update things, but it's way better to do it now!

lucid iron
#

i do find this annoying myself so i just do me data edits in C# now blobcatgooglyblep

barren tapir
barren tapir
#

Especially since comments are marked as errors

lucid iron
#

its a little tedius but shrug it is same data to write out in the end

lucid iron
#

!vscjsonc

ocean sailBOT
#
How to make VSCode not scream at json comments

In Visual Studio Code, go to File -> Preferences -> Settings, then search for "associations", and in the "Associations" setting, click the Add Item button to add an item with key *.json and value jsonc (see image).
If you are making a content pack for Content Patcher, you should consider using its json schema so that VSCode can tell you if your patches are valid, you simply have to add

"$schema": "https://smapi.io/schemas/content-patcher.json"

at the start of your content.json file.

barren tapir
strong kite
#

If I have 2 different map patches end up patching in the same coordinate area (for sake of laziness basically), will that cause any issues?

barren tapir
#

I'm trying to follow these instructions, but I'm getting an error in VC stating that the namespace "Framework" could not be found.

I can post additional details later (I just now realized how late it is, and am gonna make some dinner ๐Ÿ˜…)

lucid iron
#

u need to change all the using to what u actually need

brittle pasture
#

TIL adding a condition to a building output (e.g. mill) doesn't make the mill deny the item if the condition isn't satisfied, it just makes the mill swallow the item without producing anything

#

this complicate my plans just a little bit

lucid iron
#

that seems like vanilla bug blobcatgooglyblep

brittle pasture
#

hmm the mill still holds the item, it's just waiting for the condition to be true, eventually

lucid iron
#

ah so its not eaten just put into the input chest bolbthinking

#

can u take it back out

brittle pasture
#

not unless the building lets you

#

(the mill doesn't)

lucid iron
#

jank

brittle pasture
#

i'll submit report once I have min viable content pack SDVpufferrad

#

the fix is probably make GetItemConversionForItem also check that there's a viable output instead of just the input condition

hard fern
#

The mill is hungry and demands sacrifice

#

nuked at the speed of sound

#

or light

#

or

#

whatever is fastest

#

turbo the snail

torpid sparrow
#

new mod idea, adding a tim hortons drive through to the jojamart

#

well i guess there are no cars

#

hmmm

#

walk through..

daring skiff
#

@lucid iron I sanity checked this and SDV reroutes outputs automatically using pipewire.

#

Windows tho.

#

Well, SDV isn't doing anything. It's the OS I imagine.

#

@gaunt orbit I would be interested in this mod still. It would be a really good to have.

#

I do not understand the deep magic of soft_oal.dll.

#

Or how any of this would even work.

gaunt orbit
#

I dont have time to do this today but based on C code from stackoverflow and the monogame and OpenAL decompile, I should be able to do something like this

private static Func<string, bool>? SoftReopenDevice;

public static void Initialize(IntPtr ____device, int[] attributes)
{
  if(Alc.IsExtensionPresent(____device, "ALC_SOFT_reopen_device"))
  {
    var fn = FuncLoader.LoadFunction<Func<IntPtr, string, int[], bool>>(Al.NativeLibrary, "alcReopenDeviceSOFT");
    SoftReopenDevice = (s) => fn(____device, attributes, s);
  }
}

public static void Reload()
{
  SoftReopenDevice?.Invoke(null);
}

public static void Switch(string device)
{
  SoftReopenDevice?.Invoke(device);
}
#

NOT tested and would need harmony and other things, but I think this would make the correct openal native calls

barren tapir
#

Is this not how you add a config menu via C#? No matter what I try doing, it doesn't show up

brittle pasture
#

if you mean GMCM, you need to integrate support yourself

gaunt orbit
barren tapir
#

I think I'm gonna call it a night, but I'm making slow but steady progress. I may need to ask about registering tokens again, but rn I just need some sleep ๐Ÿ˜…

frosty gate
quick adder
#

Hey all. I have a question regarding modding assets. Content Patcher has these Update conditions: OnLocationChange, OnTimeChange, OnDayStart

How would I make this more instant, like swapping sprite sheets in real time in response to flags etc? I can get flags to apply straight away when conditions are met, but content patchers fastest asset update is OnTimeChange and the delay is a problem.

I tried calling Helper.GameContent.InvalidateCache("Data/ObjectInformation"); within a method but it didn't seem to do anything.

uncut viper
#

You cannot.

#

The only way to make it instant is to do the edit in C# instead of Content Patcher and watch for the change you want to invalidate your asset. But you cannot make Content Patcher do its updates before it wants to.

brittle pasture
#

(also Data/ObjectInformation is no longer a thing after 1.6)

quick adder
# uncut viper The only way to make it instant is to do the edit in C# instead of Content Patch...

Sorry, I worded that poorly. I started in content patcher, which worked but was too slow. So I shifted to C# where I could get faster changes. I can get things like instant flags etc to work, but I have gotten confused as to how to get the asset to change instantly.

I saw Helper.GameContent.InvalidateCache("Data/ObjectInformation") on some documentation so tried that using the asset path like I would if using content patcher, in the C# method where I was setting some flags, but it didn't work. Is it as simple as something like that, or telling it to load x instead of y like content patcher seems to?

lucid mulch
#

you would need to register your own C# load/edits via the AssetRequested event and do your realtime aware edits in C# on the asset

brittle pasture
#

@next plaza not urgent but I have a PR to fix a bug in SpaceCore: https://github.com/spacechase0/StardewValleyMods/pull/577
(note that this is not tested because even after the capitalization changes I cannot get it to build on Linux, and honest to gods I don't know if it's a Linux problem, a me problem, or a problem in the code. If you/someone can build it and send me the zip I'd appreciate it)
(EDIT: Got it working thanks to chue)

#

ok I think the issue is I shouldn't be building against develop?

#

actually no that's the right branch, hmm

green spruce
#

so iv'e been having a problem getting my sprites to work i made sure it was a .PNG but I'm not sure if i may have done something wrong i did fallow the guide i was given but they still don't seem to be working

lucid iron
brittle pasture
#

hmm I was under the impression SC needs that code somehow, guess not lol

#

will try tomorrow SDVpufferchicknight

lucid iron
#

Yeah let me make a patch for you

brittle pasture
#

if you can, post a screenshot of the file explorer

#

(the NPC data is also wrong, per the warning, but we'll get to that)

green spruce
#

this is where the guide said they should be placed

brittle pasture
#

your folder is named img

#

whereas your code is images

#

you can rename the folder to match

green spruce
#

oh.. i did not think that effect it mm ill fix that

brittle pasture
#

computers are dumb; everything needs to match

green spruce
#

ok i fixed the folder name -m-

brittle pasture
#

anyway your image should load, but you still need to fix your NPC data

#

SDV 1.6 moves to a new model now

#

!npc you can see up to date tutorials here

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:

green spruce
#

i have two different things for that one info it says is wrong... but they look much different and idk if it will effect that part badly... both r based off of two different guides

brittle pasture
#

you're probably using some old 1.5 guides

#

you should follow the tutorials above

green spruce
#

that is the one i did fallow for making this one ... i still need to fill out some parts.... i think i get a bit confused over some things... like when it says ID like is that the mod name or the name i set for the NpC in the coed ... once this is filly fixed i feel i should move it to the content.jaso IN place of the other one correct?

brittle pasture
#

you just put in {{ModId}} as is, Content Patcher will transform it into your mod ID for you

#

and yes that Data/Characters code replaces the old disposition code

green spruce
#

OK! thank you so much :> i really appreciate your help!!!

vernal crag
#

Is it possible to basically "resumeAdvancedMoves" after stopAdvancedMoves?

I added some advancedMove commands for winter25 to make it less dead but for Secret Santa cutscene I had to use stopAdvancedMoves, so when the cut scene ends nobody resume moving. Or there is no way to do it without Set-Up and MainEvent etc?

uncut viper
#

no. using stopAdvancedMoves completely deletes the pathfinder that makes them go. it doesnt just pause them. they would need to be remade

low shell
#

anyone ever used the JP's Small Fruit Tree Framework to add more fruits to their trees? trying to get it working but it doesnt seem to work

dawn ore
#

Can I do a EditMap triggered by an event and have it happen straight away after the event is done, not the next day?

quick adder
#

So ah, is there a way I can make the game update all characters dialogues? I was trying to set flags where the dialogue will change based on which flag is there, but I wanted it to be more real time sort of thing rather than waiting till the next day.

Best I managed was this in C#
foreach (NPC npc in Utility.getAllCharacters())
{
Game1.npcDialogues?.Remove(npc.Name);
}
Which is stronger than I wanted lol. It causes characters to repeat dialogue if they had been spoken to before

Also tried this, but it just clears the dialogue, including dialogue that hasn't been seen
foreach (NPC npc in Utility.getAllCharacters())
{
npc.CurrentDialogue.Clear();
}

void aspen
#

woops

tiny zealot
quick adder
tiny zealot
#

have you considered conversation topics for this

barren tapir
#

Can't wait till after work to get back to whatever it was I was working on last night.

I believe I was in the process of learning how to define a GMCM config + tokens in C#, but I was also basically working while half asleep ๐Ÿ˜….

quick adder
barren tapir
#

I decided to mark what books I've added logic for, and I'm about 50% complete. Of the remaining books, I believe only 1 to 3 more will require C# (granted, I need to redo a lot of CP once I figure out the aforementioned config and tokens in C#).

The real question will be if I can figure out how to do the pig book

gray bear
#

hmm

barren tapir
#

I want the book to let you feed golden animal crackers to pigs. I know there are a few mods that do this, but I haven't found any that are open source.

In time I could probably figure it out, but I'm perpetually busy

gray bear
#

maybe make pigs produce even if its raining/snowing?

#

or just in winter cause i think they simply do nothing

barren tapir
#

Maybe ๐Ÿค”

#

I've also been actively dreading figuring out the logic for my next Money Sinks mod, as I'm almost certain it'll require me to make a GUI via C# โ˜ ๏ธ

#

That coupled with a myriad of compatibility issues ๐Ÿ˜…

hard fern
#

good luck

gray bear
#

i mean u can C#

#

i just hit things with a wrench

#

the wrench is content patcher but the point stands

hard fern
#

why not next update for money sinks be sink furniture item that u right click and it gives you a random range of g everyday. low chance to hit the jackpot and get 10000g

gray bear
#

i can't even make the config have like clickable sections bc i am scared

#

gambling

barren tapir
#

The reason why I don't want to do GUIs is bc I do that pretty much full time for my IRL job, despite having a masters in Quantum computing and the job title of "systems security engineer" ๐Ÿ˜…

gray bear
#

engineers make guis i guess

barren tapir
gray bear
#

GUIs are like, menu things right

barren tapir
gray bear
#

i see i see

#

well money sink... maybe like, collectibles

#

than again that requires like, sprites of stuff

#

or like, buy a random planet somewhere

#

that used to be a thing

barren tapir
gray bear
#

subscription services that gets you more recipes or something

#

hmmm

#

you can't cancel, only subscribe more SMCPufferWoke

barren tapir
#

My plan for the next mod in this series is probably going to be more community upgrades from Robin. But first I want to finish v2 of my most recent mod in the series!

gray bear
#

ooh yeah

#

that's some i want too

#

more upgrades! i should be mayor anywa

barren tapir
#

I have a list of plans somewhere. About half of them are solely cosmetic features. The big issue is going to be compatibility with mods like SVE

gray bear
#

simply,,, don't do itโ„ข

barren tapir
#

Plus it'll force me to learn how tf NPC schedules work

nova gale
#

is there a way to set a mail key or event id once a given building has been built? I want an event to play only after a certain special order has been fullfilled and a custom building has been built

gray bear
#

npcs schedules are mostly "go here at x time" and that is itโ„ข

barren tapir
gray bear
#

ah, well

barren tapir
nova gale
#

ooh, I may have found it, i can set the special order to trigger with a GSQ on buildings_constructed so you don't get the special order until after the building has been built

barren tapir
# gray bear ah, well

Though I do suppose I could replace at least one of my planned upgrades with unlocking the garden SVE gives you in year 2 ๐Ÿค”

nova gale
#

then the special order sets the mail flag that will trigger the event

calm nebula
#

Or use the active conversation topic

ocean pagoda
#

Is there a tool or script that makes BMFont directly to SDV's XNB?

flat snow
#

Hey guys. I am testing my custom farm mod and I noticed something strange. When I use lookup anything to inspect the Woodskip fish, it says it can spawn on my farm but I haven't added it to the fishing table in data/locations. Any idea why it's saying that?:

torpid sparrow
#

i thought woodskip was able to be caught at the farm in general?

#

albeit a low chance?

#

ah when it's a forest farm, it's able to be caught

#

not sure if your map has anything that would have caused that same outcome

fossil osprey
#

yeah maybe you've used some of the forest farm properties on your water body?

flat snow
#

I'm not sure how or where I would have done that. When I check with fishing info mod it doesn't show it can spawn on the list:

#

very strange anomoly

gray bear
#

there's also some ocean fish on there

flat snow
#

I made this custom fishing table

tiny zealot
flat snow
#

No it's a completely new farm

timid wind
#

In what ways is priorities in mods handeled? Specifically with content patcher stuff. Im trying to add a power that increases an items price after i complete it and it works for vanilla items but not getting it to change Cornucopia items.

fossil osprey
#

there is a priority field

#

you can also use dependencies, but I'm not knowledgable on that front

tiny zealot
#

i think it's overall better to use patch priority rather than dependency/load order, but it's still less than ideal (since you have to use an absolute priority and can't just make it relative)

#

anyway, you'll have to check cornucopia's files to see what priority they are using for their items. since they are mostly adding new ones, it is likely they are not specifying one, so it should be default

#

and for your edits you'd add
"Priority": "Late"
as a field at the same level as Action/Target/When

timid wind
#

Something like this?

tiny zealot
#

yeah, but don't forget the comma

timid wind
#

Fork i just noticed that, it started screaming red

brittle pasture
#

that's probably why your edit isn't applying

#

should be Data/Objects like all object data

timid wind
#

It was giving me error before saying cant apply patch etc

brittle pasture
#

showing the actual error would help

green spruce
#

question how would i replace the 1st with the 2nd without making the problem worse .... i tried to replace the paret that did not seem to be working right with the new updated way of making that info and it had a bunch new things that i could not fully understand

timid wind
#

Weird i cant replicate the error but changing the target makes it work! Thanks very much for all the help SDVkrobushappy

golden spire
#

you don't need that

#

it's just and editdata action patch

#

changes [] contains all the patches/edits you are doing

#

it's also very difficult to read screenshots

torpid sparrow
#

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

green spruce
#

sorry i was looking for the website i had it saved

golden spire
#

ok you have a block of old data outside of your changes [ ] not an additional one

#

it's invalid json

green spruce
#

so would i replace that part of that or just not use that part

golden spire
#

I've not checked to see if the Data/Characters part is missing anything, but it's valid in terms of json

green spruce
#

it does this

ocean sailBOT
#

Log Info: SMAPI 4.5.2 with SDV 1.6.15 build 24356 on Windows 10 (10.0.19045.0), with 13 C# mods and 13 content packs.
Suggested fixes: One or more mods are out of date, consider updating them

golden spire
#

what is your content.json?

torpid sparrow
#

u dont need multiple formats and changes

golden spire
#

I think you need to understand the basic formating of a patch

green spruce
#

:( I'm trying i was fallowing the guide

#

this was it b4 added the chaged part but it says it is not working

golden spire
#
{
    "Format": "2.9.0",
    "Changes": [
        {
            "Action": "Load",
            "Target": "Portraits/Abigail",
            "FromFile": "assets/abigail.png"
        }
    ]
}

this is a single patch for a very simple mod

changes contains all your patches and edits

if you wanted to do a new action/change you add another inside the changes

{
    "Format": "2.9.0",
    "Changes": [
        {
            "Action": "Load",
            "Target": "Portraits/Abigail",
            "FromFile": "assets/abigail.png"
        },
  {
         "Action": "EditImage",
         "Target": "Maps/springobjects",
         "FromFile": "assets/fish-object.png",
         "ToArea": { "X": 160, "Y": 80, "Width": 16, "Height": 16 }
      }
    ]
}
#

there a 2nd patch/edit has been added after the first one

#

this is your block

    {
      "Action": "EditData",
      "Target": "Data/Characters",
      "Entries": {
        "{{ModId}}_WrenSong": {
          "DisplayName": "Cherry Fudge",
          "Gender": "Male",
          "Age": "Adult",
          "Manner": "Polite",
          "SocialAnxiety": "Neutral",
          "Optimism": "Neutral",
          "BirthSeason": "Spring",
          "BirthDay": "11",
          "HomeRegion": "Town",
          "CanBeRomanced": false,
          "CanVisitIsland": true,
          "SpouseAdopts": true,
          "IntroductionsQuest": false,
          "ItemDeliveryQuests": true,
          "WinterStarParticipant": true,
          "Home": [
            /*set this to where you want the NPC to spawn in normally.  */
            {
              "Id": "Default",
              "Location": "BusStop",
              "Tile": {
                "X": 11,
                "Y": 16
              },
              "Direction": "right"
            }
          ]
        }
      }
    }

you want that inside your single changes [] but after the previous patch (and remember to add a comma, as it's just a giant list)

green spruce
#

adding the new part i would want one one set of changes [ ] like where the tings starts has one at the top and bottom so would i remove the ones from that block to keep it in the single changes ? or did i not get what you said..

#

and fix it to not be a big list?

golden spire
#

a mod with 0 alterations

would be just this

{
    "Format": "2.9.0",
    "Changes": [

\\All of your changes go inside here.

    ]
}
green spruce
#

yes what i'm asking is do i remove the 2nd changes in this it has one at the top so i should remove the one in the middel ?

#

so it is all under only one

golden spire
#

you want to get rid of the one in the middle and the ] } belonging to it

#

which is on line 54 and 55

green spruce
#

like this ?

golden spire
#

missing a comma at the end of line 50

#

also gift tastes you are targetting Data/NPCGiftTastes

green spruce
#

it loaded without a problem !!! oh thank you so so much!!!

strong kite
#

Maaan I'm just supposed to be recoloring assets and I'm getting so horribly side-tracked by scope creep ๐Ÿ˜ญ

strong kite
#

How likely is this gonna create some compat issues? ๐Ÿ˜ฌ

#

(I've moved the part of the cliff closest to the camera up 1 tile so you can walk back there and added a passage to a new zone)

urban patrol
#

probably not too many but patching Forest/Town/Beach is always tough no matter what

#

my advice to compat is just publish it and let players tell you what conflicts

strong kite
#

Honestly really loving adding secrets. I need to finish what I actually need to do so I can take my time to add secrets ๐Ÿ˜ญ

latent mauve
#

Anytime I touch the forest map, I assume SVE will be incompatible until told otherwise

#

Mainly because they completely throw out the vanilla forest map, LOL

strong kite
#

OOP- Dang LUL

gray bear
golden spire
#

I'm really the only person who "cares" but replaced Central Station's postboxes with my branded ones.

latent mauve
#

Sometimes it's fine, but it's pretty common to need two patches for any changes to Forest to account for SVE's changes

golden spire
#

maybe a 3rd if there is ever a Re-Imagined 4

latent mauve
#

Nice! I might need to make a Legend of Zelda/less modern ticket machine reskin for Central Station on my NPC Overhaul mod

#

I don't mind if the inside of the station looks out of place, but the modern ticket machine at the BusStop takes me out of the immersion every time, LOL

golden spire
#

I do have these reskins of the mailbox for different retextures if they are of any use in adapting

latent mauve
#

Nice, those may be a helpful starting point if you don't mind them being adapted!

golden spire
#

nope, feel free..

#

one was for wayback, one was for yellog and one was for flower valley

#

so 2 are semi-dead reskins

faint ingot
#

This is messy but is it possible to nest quickquestion commands in an event script? like option 4 of a qq starts its own quickquestion, and then option 4 of that one has it's own?

tiny zealot
#

i don't believe so, but even if it is you'll go insane trying to escape it. use switchEvent inside the qq to break out and handle it that way

latent mauve
#

I believe you can probably trigger new events through quick question

#

Yeah, that

faint ingot
#

I basically want a quickquestion with 15 options and trying to break it up

golden spire
#

I always felt like adding a troll event where vincent comes to your door and asks if you want to play a game... if you say no.. the event ends, if you say yes.. Vincent says he is going to beat you at a staring contest... and then the event just pauses for a very long time

faint ingot
#

I can work with switchEvent if that makes the most sense

tiny zealot
#

1.6.16 will bring us choose/goto and free us from the yoke of the twelve different weird ways to do questions and diverging events, but that's in the future so

latent mauve
golden spire
#

fork bomb

severe cairn
#

If o have to change my events from switch eventd and questions to go to I will explode SDVpufferwaaah I use it so much why did I do thatt

tiny zealot
#

you won't have to change anything, except i think there's an edge case with like trailing slashes that might but probably won't apply to you

#

they're just adding a new way to handle stuff like that which should be easier to deal with

severe cairn
#

Hm i thought I read that it was recommended as switchevent would basically become deprecated?

golden spire
#

just means that it could be removed in some long distant update... maybe 1.8/1.9 (if ever)..

gaunt orbit
#

@lucid iron I'm not sure what happened exactly but I think MMAP's farmhouse furniture mover thing broke and deleted a bunch of my furniture

lucid iron
#

Wow how terrible

#

What's the behavior

golden spire
#

get some wood glue

gaunt orbit
# lucid iron What's the behavior

so I accidentally had two farmhouse interior mods installed. The morning after upgrading, the layout was fucked up, which made me realize that, so I quit without saving and fixed the mods. When I reloaded, some stuff was out of place but still there (the bed, mainly, but also a few random furniture bits), but everything I had placed before was gone

lucid iron
#

Hrm i wonder if one of the farmhouse had initial furniture props and then the constructor triggered again

gaunt orbit
#

the phone was also gone, even though that's a craftable

lucid iron
#

Do u have a previous day save to try with

gaunt orbit
#

I haven't checked but save backup is still installed so I should

lucid iron
#

Yeah i meant like a _old save

#

I wanna see if a normal upgrade without the 2 different farmhouse installed is still cursed Bolb

#

I also wonder if there's jank if u load a save on the day of house upgrade

#

Also is this the single bed to double bed upgrade? That may affect things

ornate drift
#

how am i supposed to test if a specific dialogue works ingame

gaunt orbit
#

it is the first upgrade, single to double bed yes

ornate drift
#

do i really have to switch to specific days and years ๐Ÿ˜ญ

gaunt orbit
#

and I do have _old save files, let me reload with those and see what happens

lucid iron
#

Yeah recently i did a change to retain the bed change behavior which may have broke other stuff

gaunt orbit
ornate drift
#

also hi wrm

#

wem

gaunt orbit
#

actually wait only some of the starter furniture got duplicated

#

it's the sme three things that were the only non-bed furniture after upgrading

dreamy owl
#

Do I have to ask permission from extension mod creators (like ridge side and expanded) to make portraits of those characters?

gaunt orbit
#

double log panel, candle lamp, and house plant

urban patrol
urban patrol
ornate drift
#

now I don't have to switch to festivals and specific years

#

y

#

ty

gaunt orbit
#

okay sleeping the night and waking up the next morning and everything stuck around, plus no duplicates

urban patrol
gaunt orbit
#

so the issue does seem to be related to changing farmhouse maps

golden spire
#

well it's easy to do, just use cjbcheats or debug commands and debug sleep on the spot

#

and use mods that fast forward time

torpid sparrow
#

Just festival, movie, some marriage, green rain, and specific things like questions

golden spire
#

I'm pretty sure there are lot of people who have dialogue for their NPCs that just never ever fires because it's so rare or impossible to actually fire

faint ingot
#

I don't test all dialogue either but I also mess it up all the time

#

So I tried the method of using switchEvent to break up a large number of quickQuestion responses. I have 5 groups of responses each of which have 3 options and a 'none of these' which goes to the next group. For some reason no matter which option I pick always goes to the first group of responses, endlessly. Not sure why. JSON: https://smapi.io/json/none/e5cd6e84b02b4bc3b570ea26ba5466e7

calm nebula
#

Without looking at your json (sorry!), but I've heard reports that if you do a switchEvent out of a quickQuestion the first command can be finicky

#

So always have pause 1 as the first command

faint ingot
#

oh you're right that's a bug with quickquestion i forgot about. i'll look at that thank you

#

that was it thank you! SDVpufferheart

lucid iron
nova gale
#

Why not just use world_setyear or set day?

golden spire
#

was I muted by a mod? or is it due to this Dino message?

proven spindle
#

<@&239770080378880001> ^ (above thelimeydragon)

gentle rose
void aspen
#

scary

ornate locust
#

u ok, discord?

torpid sparrow
#

well this is a bad time to try to mod

#

but

#

does anyone know how to add an option to the Telephone? where you can call shops

strong kite
#

there appears to be issues with large discord servers right now

uncut viper
#

outgoing phone calls are C#

torpid sparrow
#

rats

golden spire
modern mantle
#

I'm making a mod with this currently in content.json https://smapi.io/json/content-patcher/7271d918b00144f68a8fc71686ae2c68 that changes the price of Squid Ink to 250g. It works fine when I spawn in Squid Ink using CJB Item Spawner, but if I pick up ink from a fish pond instead, it sells for the normal 110g. Any ideas why this might be happening? Not seeing any errors related to this mod in my SMAPI log. (First screenshot is a spawned-in item, second is from fish pond, on the same save)

#

(I trashed the spawned one before picking up the one from the fish pond, so it's not the same stack)

ocean sailBOT
#

Log Info: SMAPI 4.5.2 with SDV 1.6.15 build 24356 on Unix 6.17.7.29, with 99 C# mods and 144 content packs.
Suggested fixes: One or more mods are out of date, consider updating them

brittle pasture
modern mantle
#

That makes sense, is that hardcoded or is there a way to get it to update the existing items?

royal stump
#

price is a property on each individual item/stack, so there's not a great way to retcon them

brittle pasture
#

I recall Button's BETAS having a "reload item fields" trigger

royal stump
modern mantle
#

I'll look into it, I think for now I'll just add a disclaimer on Nexus but that may be useful for future mods I make

half musk
#

Can someone help me figure out how to add this crafting recipe as a skip action for an event? I'm trying to make it so when you skip the event, you get the crafting recipe for ancient seeds, but I can't get the key to work. I thought it would look like this: MarkCraftingRecipeKnown All "Ancient Seeds"
But "Ancient" and "Seeds" get read separately. It doesn't work without the slashes or without the quotes and slashes either

torpid sparrow
#

the when conditions are the same as the ones on the equivalent SVE event

#

(well i mean except for the hasmod lol so there's just one condition that's the same)

urban patrol
#

i don't think you can do that with a space delimiter

gaunt orbit
urban patrol
#

you'll probably have to copy the original and null it out

torpid sparrow
#

so just, don't add a delimiter and incorporate the spaces in the value?

torpid sparrow
#

i thought someone said they were able to textoperations an event last week

#

and not copy paste the whole event

#

oh wait im stupid

#

err it doesn't need a delimiter let me try again

#

hmm but gives me error

#

thinks

#

okay yeah idk

urban patrol
#

replace delimited requires a delimiter. my understanding is fuzzy but iirc you can't use space because it'll stop looking after every space

#

but there's no other delimiter to use

torpid sparrow
#

im confused are you saying replacedelimited is just borked

#

or for this type of replacement

#

like trying to add tilly in

urban patrol
#

it's not borked, it's functioning as intended, but i'm not sure of the exact correct way to do it

#

maybe append?

torpid sparrow
#

hrmmm

urban patrol
#

i just know you can't do it that way

torpid sparrow
#

rats

brittle pasture
torpid sparrow
#

hmmm let me see if i can fuck around and do it

#

HA I DID IT

#

although i don

#

i don't know how to insert her in the next part of the event.....

#

time to figure that out

#

well maybe Tilly didn't stay for the whole election or something

brittle pasture
#

since it's a trigger action and not an event command

#

alternatively you can use addCraftingRecipe but that's only for the current player

half musk
verbal glacier
#

maybe post the error log as well

brittle pasture
#

hmm it seems they are indeed trigger actions; is the wiki wrong I wonder

#

but yeah post the full log

#

(with or without action)

strong kite
#

So how would I go about creating a reward boost that makes any item with the custom "Berry" category from my mod sell for an extra 1.2x gold?
Or even just how would I set up a reward boost that increases the sale prices of certain items when you have it?

half musk
ocean sailBOT
#

Log Info: SMAPI 4.5.1 with SDV 1.6.15 build 24356 on Windows 11 (10.0.26200.0), with 7 C# mods and 1 content packs.
Suggested fixes: One or more mods are out of date, consider updating them, SMAPI is out of date, consider updating it

brittle pasture
torpid sparrow
#

anyone know how to add a line break in the new changelog

brittle pasture
#

\\\"Ancient Seeds\\\"

torpid sparrow
#

readability is trash

brittle pasture
#

or just \\" if the prior doesnt work

lucid iron
#

You can just make 2 entries right

#

Or 3

latent mauve
brittle pasture
#

something something the content modder yearns for foreach

elder scarab
torpid sparrow
#

im glad ur enjoying her :3

golden spire
#

I wouldn't worry too much about the readability of the change log, could always make a changelog.txt file in your mods files if you want to ascii art a nicer one

strong kite
elder scarab
torpid sparrow
latent mauve
golden spire
#
          d8, d8b  d8b           
   d8P   `8P  88P  88P           
d888888P     d88  d88            
  ?88'    88b888  888  ?88   d8P 
  88P     88P?88  ?88  d88   88  
  88b    d88  88b  88b ?8(  d88  
  `?8b  d88'   88b  88b`?88P'?8b 
                              )88
                             ,d8P
                          `?888P'
ornate drift
#

yay my seasonals are done XevYay

torpid sparrow
#

yayyy

#

sprites suck booo boooo

ornate drift
#

now how do i add them

valid folio
#

Good morning everyone! I came up with a somewhat crazy idea haha I want to update the โ€œfirmwareโ€ of one of my machines. For the player to upgrade the wind turbine, theyโ€™ll need to create a new metal alloy, but the machine that makes it doesnโ€™t have the data loaded, so the developer company will send an update to the machine so it can produce the alloy.

Basically, what I want to do is have a rule disabled until the player reaches a certain point in my modโ€™s story, receives a letter, and then the rule becomes active. It felt like a good way to simulate a firmware or software update and make it feel organic within my mod, but I havenโ€™t been able to get it to work. I can block the rule, but then I canโ€™t re enable it except if I use HasMod, and I donโ€™t want to do that because thereโ€™s no simple way to implement it without player intervention.

I tried the following
HasFlag
HasMod
HasReadLetter
HasFlag currentPlayer
HasReadLetter currentPlayer
HasCraftingRecipe currentPlayer

In some cases, after receiving and reading the mail, when I try to trigger the rule the machine no longer shows the invalid item error, but it still doesnโ€™t do anything. Before receiving the mail, it did show the error, which makes me think the rule is being injected but for some reason isnโ€™t working. I used a simple control rule to confirm that the machine itself works.
Last Code
https://smapi.io/json/none/9a1a2d10396b4e90937139cf98d00064

torpid sparrow
strong kite
torpid sparrow
#

you can do it right in ur character's disposition under appearance

brittle pasture
ornate drift
torpid sparrow
#

the way you do seasonal outfits is adding conditions on them

ornate drift
#

and he has 4 seasonals unlike most npcs that have 2

strong kite
elder scarab
torpid sparrow
#

thats fine i have 4

torpid sparrow
#

here ill just show u mine

ornate drift
#

Yoinks tillys patch

verbal glacier
torpid sparrow
brittle pasture
strong kite
torpid sparrow
#

also got the ginger island one in there

torpid sparrow
brittle pasture
#

time to entereth the c# mines

torpid sparrow
#

dont forget to load all of ur new images

#

u'll need to do that before trying to call it

glossy cargo
#

Is it possible to have specific items in a shop cost a certain currency, and other items cost a different currency?

Say, for example, I'd like Pierre to sell one item that costs casino coins, and the rest money as usual?

verbal glacier
ornate drift
half musk
torpid sparrow
brittle pasture
torpid sparrow
#

i just had an issue where my costume wasn't showing up when i added a fall outfit

ornate drift
torpid sparrow
#

so now my costume has a -1 precedent (lower = last to apply? i guess which means it'll show up over everything else)

torpid sparrow
ornate drift
#

ah

torpid sparrow
#

tilly's in her own json actually

#

not in the content (except include)

brittle pasture
#

also if you can show the code that's not erroring that'd be nice

latent mauve
void aspen
#

huh

#

oh yeah

elder scarab
valid folio
strong kite
glossy cargo
torpid sparrow
glossy cargo
#

thanks for the answer, it's about what I thought it was, but it's nice to have a confirmation

brittle pasture
valid folio
latent mauve
#

Workaround that doesn't require a shop rewrite would be a voucher item that costs Qi Coins from an exchange counter, and then have the voucher function as a TradeItem for the desired final item.

glossy cargo
#

Oh that's way too complicated lmao

latent mauve
#

haha

glossy cargo
#

I'd rather do a tiny bit of extra work and make it easy on users

latent mauve
#

I'm not a C# person, so the C# is probably easier for you.

elder scarab
glossy cargo
#

absolutely. I've still not done any content patcher anything yet, and I've been working on this mod for over 3 years

strong kite
#

although... aaaa manually doing conditional prices would just be the best idea. How would I actually go about giving an object's sale price a when condition?

latent mauve
brittle pasture
#

(Price is a top level field so you can get away with Fields instead of TargetFielding every object you want)

strong kite
#

This sounds like a 4 hour coding adventure heehee

latent mauve
#

(good clarification, thanks)

brittle pasture
#

to start, the currency is a shop-wide field, so you'll (likely) need to transpile all occurences of that field just for your one shop item

strong kite
#

Wait so what do i put in fields if I'm not targeting individual items?

brittle pasture
#

just

"Fields": {
  "Item1": {
    "Price": 1,
  },
  "Item2": {
    "Price": 1,
  },
}
brittle pasture
strong kite
#

I'm getting the feeling I don't need Entries AND Fields

brittle pasture
#

no

strong kite
#

I'm so used to using Entries by default lmao

brittle pasture
valid folio
#

Yes, itยดs correct
{
"Changes": [
{
"Action": "EditData",
"Target": "Data/Mail",
"Entries": {
"{{ModId}}_Test_Firmware_Update":
}
},

strong kite
#

and so the tedium begins Azusob

brittle pasture
barren tapir
#

Whelp, works done, I've refilled the bird feeder, and read over 200 pages of documents... TIME TO START MODDING!

barren tapir
valid folio
# brittle pasture and do you have the mail? are you expecting it to not work when it does, or the ...

Iโ€™ll try again with the condition, maybe I wrote something wrong the first time I tested it. If youโ€™re saying that condition should work, then I want to give it another try.

The mail arrives, I open it, I read it, and then I go to the machine and the rule doesnโ€™t work. The copper one works, which doesnโ€™t have any conditions since itโ€™s the control rule, but the other one doesnโ€™t. Iโ€™ll try it one more time.

brittle pasture
#

and you're inputting aerinite while having limestone in your inventory?

glossy cargo
brittle pasture
#

yeah that's lowkey not what I want to happen

glossy cargo
#

I don't intend to turn this little feature into 500 harmony patches lmao

brittle pasture
#

but maybe it's fiiiiiine

glossy cargo
#

I did that with bundles

brittle pasture
#

a lot more mods touch the shop menu than they touch bundles

glossy cargo
#

it worked much better than trying to patch my way to making a bundle that contains a bundle

glossy cargo
#

I'm randomizing all aspects (currencies, price, trade items, extra items requested) of every shop item

barren tapir
glossy cargo
#

I feel like I'm already way past that point

barren tapir
glossy cargo
#

I imagine I probably have the mod with the most patches in all of the SV modding community. Or at least close to that lmao

#

possibly lines of code too although that one is much less meaningful LUL

barren tapir
glossy cargo
#

Just know that it'll take 218 years to load the game with these patches active

barren tapir
golden spire
#

SV, text adventure edition

You are in an old wooden shack, there is a bed a table and a chair. There is a box of parsnip seeds on the floor.

#

take parsnip seeds

#

exit

#

you are in an overgrown farm. there are many trees, weeds, rocks and other debris

#

east
you arrive at a bus stop. there is a broken down bus and a number of trees.
eat grass
yuck
hit tree
nothing happens
hit tree with axe
the tree is slightly damaged

barren tapir
#

OMG YOU COULD MAKE AN SV TEXT ADVENTURE GAME FOR THE FARMING COMPUTER

golden spire
#

someone else can.. I have no good programming experience ๐Ÿ˜›

#

tiny little shell scripts are the best I can do

barren tapir
#

TBF, this would be 99% string manip

severe cairn
#

you got me flashbacking to my first text adventure game... and my first time "coding by myself" (spoiler alert, like 12 nestled if statements, endless or's in ifs due to the fact it was case sensitive and i wanted to cover all bases, if you dont type the correct thing the game crashes, and i did not tell you what the options were)

valid folio
# brittle pasture and do you have the mail? are you expecting it to not work when it does, or the ...

It didnโ€™t work, or I should say it only partially works. Thereโ€™s a generic error message that shows up before the mail if I try to put the item into the machine, but once I read the mail, that message stops appearing when I try to insert the trigger item into the machine. However, if I use another item that doesnโ€™t have any rule in the machine, the machineโ€™s error message does show up. The copper control rule works as well.

brittle pasture
#

and you have limestone in the inventory right

#

what does Lookup Anything show

valid folio
# brittle pasture what does Lookup Anything show

No, it looks like I wrote the wrong ID as the second item, but Iโ€™m sure it was that one. Give me a second, Iโ€™ll put the limestone in my inventory. I thought I had used the Star Shard ID.

valid folio
strong kite
#

Ok wow that was not nearly as soulcrushingly tedious as I thought it would be

void aspen
strong kite
#

uhh.. seems like the condition isn't working..?

#

ah. I know exactly why it isn't working

#

wait. no I do not. that is for something else

valid folio
strong kite
#

Did I mess up something here? These price changes are active even on a new save file which means the condition isn't factoring in at all

#

oh shoot another condition thing isn't working either

#

Neither of these conditions appear to be functioning

brittle pasture
#

You can't use GSQs to condition CP patches

#

you need to use When

strong kite
#

aw man

#

so iirc these should work then?

brittle pasture
#

your first Condition was fine you didn't need to change it SDVpuffersweats

strong kite
#

Wha? But it wasn't working?

brittle pasture
#

it's not working probably because you still need to check the item being eaten

#

and also you need to set MarkActionApplied to false so it can repeat

strong kite
#

tbh I wonder where else I might need to put MarkActionApplied: false

brittle pasture
#

to recap:

  • When is a CP construct; it sits on the top level of a patch (same level as Entries/Target/etc.), and it controls whether the patch gets applied and the data is changed
  • Condition is a game construct; it's part of game data (so inside Entries/etc.), and its meaning depends on where it gets used, but it usually controls whether the entity in question will apply a certain change. and you can only use this if the game model in question explicitly have it
brittle pasture
strong kite
#

I am just now realizing I'm also really not smart. I tried giving myself the mail flag using {{ModId}}_ in the console... FacePalm

severe cairn
#

real

#

reminds me of the time I tried to detect an event from another mod... using my mod id

strong kite
#

Okay the berry stuff is working but the condition for the debuff still isn't. Maybe I'm still giving myself the wrong flag?

#

"Condition": "!PLAYER_HAS_MAIL Current {{ModId}}_CresseliaBoon Received",

#

That should be properly formatted, right? (I hit enter not shift enter oops)

strong kite
#

I did start a new save

brittle pasture
#

feel free to show your code

strong kite
#

tbh I'm not sure what you mean by check the item?

#

Like in the object file?

brittle pasture
#

unless this applies to every item?

strong kite
#

No, this is for a specific item ID

void aspen
#

mmm apples

brittle pasture
#

then you need ITEM_ID Input YourDesiredItemhere

#

also your existing condition is "if the player doesn't have the flag"

strong kite
#

I'm aware. I want it to give the debuff if the player doesn't have the flag, so once they have the flag they no longer get the debuff

#

This is what the code looks like atm. The debuff applies at all times regardless of whether or not the flag is set

brittle pasture
#

I guess time to double check the flag is correct

strong kite
#

Guess so pichusad

strong kite
royal stump
#

if that's supposed to happen after eating a specific item, yes, add it to the condition with a comma separator, like ...Boon Received, ITEM_ID ...

strong kite
#

Ohhhhhh okay. I thought since it was within the field with the item's Id already listed that it would take from that

royal stump
#

the Data/TriggerActions IDs* aren't involved in what they do, generally, they're just unique IDs in that asset*

strong kite
#
        {
            "Action": "EditData",
            "Target": "Data/TriggerActions",
            "Entries": {
                "{{ModId}}_NightmarePokePuff": {
                    "Id": "{{ModId}}_NightmarePokePuff",
                    "Trigger": "spacechase0.SpaceCore_OnItemEaten",
                    "Condition": "!PLAYER_HAS_MAIL Current {{ModId}}_CresseliaBoon Received, ITEM_ID Input {{ModId}}_NightmarePokePuff",
                    "MarkActionApplied": false,
                    "Actions": [
                    "AddBuff BadDreamsDebuff 150000"
                    ]
                }
            }
        },``` This still doesn't seem to be working?
#

Is this the right debug command?

#

And yes I've slept to the next day to try it and it still doesnt work

#

Is it possible there's some weird shenanigans going on with the SpaceCore trigger behind the scenes? Which I only suggest because it wouldnt be the first issue I've found relating to something from SpaceCore

royal stump
#

testing on a new save entirely might help; if you ever save after testing a trigger that doesn't have "MarkActionApplied": false,, it'll be skipped from then on, even if you set it false afterward

#

anyway the debug there is correct, assuming that's the right mod ID etc

strong kite
#

I created a brand new save after closing to desktop and relaunching to ensure things were properly reloaded

#

wait a minute... I forgot about this, I don't know if that code as a whole was even working in the first place ๐Ÿ˜ญ

#

Cuz I also have this for the Object and have 0 clue if it's actually working because of the issue I found with SpaceCore's HealthRegeneration Attribute

#

But if that IS working then very obviously that's why this other thing ISN'T working sobber

#

Well, brand new save after removing the buff from the Object.. That code as a whole just isn't even working
If I had a hysterical laugh cry emote I would be using it

strong kite
#

Maybe I just find a different function for Cresselia's Boon to have? HehSweatCloseup

#

Or wait.. couldn't I make this a conditional patch where if you have the flag it patches the object to no longer have the debuff?
Instead of using this OnItemEaten triggeraction thing

urban patrol
#

that would only affect new items

strong kite
#

Would there be no way to do a migration of sorts the next day?

urban patrol
#

not if the object has already been created

#

that's why when testing objects you have to make sure you're trashing all your old ones

barren tapir
#

UGGGHHHHHH

royal stump
#

BETAS does have a "refresh data on every item in the world" action, but that'd back into the same problem

barren tapir
#

I'm so close yet so far

#

I finally got a GMCM menu, only for an error to occur when trying to save the config values

strong kite
urban patrol
#

i havenโ€™t backread so idk the context of what you want to do sorry

strong kite
#

To sum it up simply, I have this food that gives a buff and a debuff when eaten. I wanna make it so once you have a certain mail flag, you no longer get the debuff

#

But yeah no this worked immediately OMEGALUL

#

It wont apply to pre-existing copies of the item, and it wont activate until the next day. BUT it FUNCTIONS

#

I think I'll take a break for the rest of today, Thank you all for the help!

hard fern
#

i dont know what the word is, but is it possible to have something akin to say, a scene with standees where if you walk past, the scene sort of scrolls, but not really...

urban patrol
#

parallax?

hard fern
#

yes.. that thing

#

i know you can do it for a background, but i dont want it as a background

lucid iron
#

removing kisaa and then doing the debug hu 1 for nook house seemed to work ok

#

it is prob a difficult to repro problem but ill keep eye on it

charred plaza
#

i wonder if they'll actually fix this, its been a year lol

brittle pasture
#

it will be fixed in .16, only problem is .16's release date is only 'soon'

deep cypress
#

For a special order, if I want to make it that it only comes in the event, but it is not ever appearing on the board:

"RequiredTags": "NOT_IMPLEMENTED",

Then, yes, It will not appear on the board? But may in the event, if I understand correctly that which is written in the wiki pafe?

calm nebula
#

Your understanding is correct

smoky schooner
#

Hello

#

I've been working on my first mod for over a month now, where the goal is to make spouses more attentive to the player; and I'm building the dialogues, but there are dialogues where I use an expression from a portrait that isn't in the vanilla version... for example: $20, which is a shy but different portrait that's only in a specific mod; I wanted to know if there's a way to make it so that if the player doesn't have that specific portrait, it automatically switches to $l, for example

old edge
#

Could someone please explain why my spawns wonโ€™t work on a new save is it my content patcher condition is it redundant and does ftm work when using this cp logic? ```json

   "UniqueAreaID": "SeaCavernDepths3",
    "MapName": "Custom_SeaCavernDepths3",
    "MinimumSpawnsPerDay": 1,
    "MaximumSpawnsPerDay": 2,
    "IncludeTerrainTypes": [],
    "ExcludeTerrainTypes": [],
    "IncludeCoordinates": [
      "10,6/41,9"
    ],
    "ExcludeCoordinates": [],
    "StrictTileChecking": "Maximum",
    "SpawnTiming": {
      "StartTime": 600,
      "EndTime": 610,
      "MinimumTimeBetweenSpawns": 10,
      "MaximumSimultaneousSpawns": 7,
      "OnlySpawnIfAPlayerIsPresent": false,
      "SpawnSound": ""
    },
    "ExtraConditions": {
      "Years": [],
      "Seasons": [],
      "Days": [],
      "WeatherYesterday": [],
      "WeatherToday": [],
      "WeatherTomorrow": [],
      "GameStateQueries": [],
      "CPConditions": {
        "HasFlag |contains=seaCombat1": "false"
      },
      "EPUPreconditions": [],
      "LimitedNumberOfSpawns": null```
autumn tide
#

OMG i forgot- you can just use a toggle

#

๐Ÿคฆ

#

also cool mod idea!

#

...just checking if you saw this?

smoky schooner
#

Yes

#

How could I make this? My mod is being worked on in VS, so it's a DLL.

autumn tide
#

...I only have knowledge for CP mods and even then its limited SDVpufferwaaah

smoky schooner
#

;-;

autumn tide
#

the C# ppl shall come though, fear not

crimson pewter
#

i need some help, my mods dont work anymore and i dont know how to remove them, any ideas on how?

autumn tide
#

!mh

ocean sailBOT
autumn tide
#

this channel is more for making mods :)

smoky schooner
torpid sparrow
#

i think claude was ersponding to citlali

#

OH WAIT

#

wait yes

#

i read things wrong 3 times before i read them right

royal stump
# old edge Could someone please explain why my spawns wonโ€™t work on a new save is it my con...

That condition seems to work fine on new and old saves. It should disable spawning only after someone gets that mail flag. It might help to try it again with "StrictTileChecking": "Medium" to see if it's a tile issue. Beyond that, you can edit Stardew Valley\smapi-internal\config.json like this to enable more logging, then upload the log after loading a save, and I can see if I spot something:

"VerboseLogging": ["Esca.FarmTypeManager"],
autumn tide
#

wait now I'm confused too

torpid sparrow
#

idk me too

autumn tide
#

twins

old edge
#

Roger that

royal stump
# smoky schooner I've been working on my first mod for over a month now, where the goal is to mak...

You'd probably want to check whether the mod you're thinking of is installed, e.g. with the SMAPI helper's mod registry:
https://www.stardewvalleywiki.com/Modding:Modder_Guide/APIs/Integrations
e.g. Set a static field or something to "$20" if a mod exists that you know adds that, or "$l" if it doesn't. Then you can use that field in your dialogue strings. (Details really depend on how your mod works, but that's the idea.)

gaunt orbit
# lucid iron it is prob a difficult to repro problem but ill keep eye on it

Yeah no it didn't load the map when I had both, that's part of how I noticed it. Still erased the furniture though which is weird and doesn't make much sense

Not sure what happened with the item deletion, but the duplicating furniture should be replicable by just adding cozy nooks to an existing save that's using the vanilla farmhouse

lucid iron
gaunt orbit
#

I glanced at the source for the feature earlier and I couldn't find a reason for it to do that, so the mechanics of it are a mystery to me

#

It could also be a conflict with another mod

lucid iron
#

yea i thought it might be the _FarmHouseFurnitureAdd stuff but cozy nook doesnt use that

gaunt orbit
#

It's also weird that it affects craftables, which is what makes me think another mod is involved

#

At least I'm pretty sure the phone is a craftable

lucid iron
#

yar it is

#

altho the thing in mmap should shift craftables too iirc

gaunt orbit
#

Hmmm

brave fable
valid folio
#

Hi, could someone help me place some coordinates in a spriteโ€™s code? I canโ€™t see the numbers shown in Aseprite at the bottom left when I position the mouse over a point in the sprite, and I need to fill in some values. If I send you the code and the sprite, could someone do it for me please?

orchid glade
#

Sure I can help out

#

@valid folio

#

DM me if you like

old edge
# royal stump That condition seems to work fine on new and old saves. It should disable spawni...

Could it be this because there not showing when I start a new save but when I load my old save they do appear? Is this balanced by the way?```json
{
"MonsterName": "CapeStardewCode.Monsters.InfernoRaptor",
"Settings": {
"HP": 1600,
"Damage": 40,
"Defense": 3,
"DodgeChance": 15,
"RelatedSkill": "Combat",
"MinimumSkillLevel": 2,
"PercentExtraHPPerSkillLevel": 10,
"PercentExtraDamagePerSkillLevel": 10,
"PercentExtraDefensePerSkillLevel": 10,
"PercentExtraDodgeChancePerSkillLevel": 10,
"PercentExtraEXPPerSkillLevel": 10,
"SpawnWeight": 8,
"Loot": [
"Magma Geode"
]
}
},

royal stump
#

those would never be selected to spawn until a player has at least level 2 combat skill, and if that's the only monster in the area's list, nothing will spawn

#

I'm not really the person to ask about balance, but that seems stronger than anything in the base game, if that's relevant SDVkrobusgiggle

old edge
#

yeah ok maybe I should change that so everything else worked then.

marsh reef
#

idk where to ask this correctly, is there a mod that adds further levels with perks as you get to em?

brave fable
meager portal
sullen rain
#

Hey guys, how would I put needing to see an event as an unlock condition for an npc? I have

#

"UnlockConditions": {
"HasSeenEvent |contains=3910975": "true"
}
},

#

But Smapi is saying it can't parse that

proven spindle
#

I think unlockconditions has to be a gsq

verbal glacier
#

i think you need PLAYER_HAS_SEEN_EVENT

sullen rain
#

I think I got it

#

Thanks

frozen jewel
#

hello, is there a site where I can download individual walking sprites of the characters?

brave fable
#

!unpack your game files!

ocean sailBOT
#

Follow this guide to unpack the game's content files in order to see and explore how the game data is structured.
It's helpful when making your own mods, or just to learn about how the game works!

golden spire
#

I forgot I still had error-lewis 'installed'

gray bear
#

just an error man

#

upside down

fast plaza
#

Don't suppose anyone here is an expert in the rules behind buffs and stacking? Trying to implement a buff that stacks but the rules are getting me a bit confused.

#

Yeah so... I have a drink that applies a buff on use and activates a trigger action, but it doesn't stack. It seems like the ID might need to be set to Drink to activate it? But then it would drop the trigger action right? And then there's two IDs for Buffs defined in ObjectBuffData?

#

I may be lost in the sauce but typing that out helped me kinda organise my thoughts so I'm keeping going, but if anyone has been down this route before I'd love to hear your findings

blazing grotto
#

hi i am looking for where i can commission works on stardew valley does anyone knw a server where i can find good prices for my commissions

#

any help will be appriciated

latent flame
#

!comms

ocean sailBOT
verbal glacier
#

:( spelling

void aspen
#

bots won't react to an edit btw

verbal glacier
#

yeah i noticed :(

tiny zealot
fast plaza
#

Thats a fair point actually

tiny zealot
#

you did ask the question afterward, so no real harm done in this case SDVpufferheart

fast plaza
#

yeee

strong kite
#

So I'm looking up the modding page for Buildings- does this require C#?

fast plaza
#

well I got a bit of a hacky solution built atleast. I hope at some point stardew gets a buff code rework or someone builds a buffs framework. Having more control over buffs and adding stuff like enemy buffs/debuffs would be really neat. I've hacked together some ways to do these things but they're extreeeemely gross to read. Just somerhing on the wishlist

verbal glacier
strong kite
#

Anyone know an example I can use then? I work MUCH better with an example to start from and the wiki doesn't seem to have one. Unless the kind of example I'm looking for would be from the Content Patcher docs

verbal glacier
#

hxw buildings for example, they have individual ones which you can look at

strong kite
#

Hm.. For clarification, maybe "building" is the wrong word for what I'm wanting to do. I essentially want to make an Obelisk that the player can build on the farm

#

Which I only clarify because these look (awesome) like they have a lot more information than I need and might complicate things a bit HehSweatCloseup

#

I'll still check out one to see the file structure though, so ty

verbal glacier
barren tapir
fast plaza
#

Hmm, am I misremembering coffee and triple espresso stacking? Now I say that out loud it definitely sounds like I'm wrong

#

Coulda sworn drink buffs could stack with other drink buffs but that doesn't sound right anymore

barren tapir
fast plaza
#

Fair enough fair enough

barren tapir
#

If your doing C#, you could look into what the desert festival does, as it stacks with both food AND drink buffs

fast plaza
#

Yeah I did some research into that but it wasn't quite what I was looking for for my purposes.

barren tapir
#

Perhaps, even, the same boat

fast plaza
#

Maybe? I'm working on a overheal type thing. Had a previous thing going but it was using more harmonylib patches than id like so I'm trying to cut that down.

#

Hoping I can work with buffs to do that. Got a nice solution going rn atleast, just gotta implement the ondamage side of things.

#

What about you? If ya don't mind sharing

barren tapir
#

I need to look through my notes bc its been a while. But I essentially want to modify the buff of an item at random.

#

One method I looked at was trying to stack buffs

fast plaza
#

Oo that sounds neat yeah

#

Like the item would apply a random buff on consumption? Sounds like you could do something like that with game state queries but god knows it's never that simple.

barren tapir
#

Though I've been a but preoccupied with other mods atm ๐Ÿ˜…. I wasted basically all of my limited modding time over the past two days trying to do a super fancy thing to save me from having to copy and paste like 2 or 3 lines of code...

... I gave up on that endeavor sometime late last night and/or very* early in the morning

fast plaza
#

Faaaair hah

fast plaza
#

Real

strong kite
#

I remember seeing the "ObeliskWarp" action somewhere and I cant for the life or me remember where it was. I feel like it was a page on the modding wiki but I cant find which one. It's not too important, but I don't know what the Boolean is for

verbal glacier
#

whether to dismount or not

fast plaza
#

A buff code rework or framework would be so neat. I know some peeps are adding like bosses and it'd totally add so much to that if buffs were easier to implement and could be applied to NPCs

barren tapir
# fast plaza Real

You'd think it'd be easy, but it isn't. I've ran into so many errors trying to do it (it also doesn't help that it involves my very first C# mod)

fast plaza
#

Yeppp I figured hah

fast plaza
#

It's never that simple.

strong kite
brave fable
#

a conditional buff is conceptually simple, but since nothing in the game has ever needed it, it's not implemented

barren tapir
brave fable
#

likewise, there's no real basis for applying buffs to NPCs, the behaviour is entirely farmer-specific

fast plaza
#

I think spacecore is good for monster stuff? Idk I haven't touched that stuff too much

fast plaza
brave fable
#

but then again, buff effects are generally extremely specific, aside from attribute changes

brave fable
barren tapir
fast plaza
#

I had a poison like effect I wanted to add for monsters and I had to Hella hack it together. You're gonna break my heart here if it turns out I just missed something

strong kite
#

Hm.. debating if I want to use the ObeliskWarp action but.. eh it's fine, the only reason why not would be to put in my own custom sound effect for using it

fast plaza
#

That said I'm really hoping that does exist cuz rn I patch the monster update method to do ticking damage and that's actually disgusting to do.

barren tapir
#

Does the shadow shaman not buff enemies?

#

Have I been misunderstanding how it works for years?

brave fable
#

it simply heals them

barren tapir
brave fable
#

monsters don't have any internal framework for applying buff effects

#

there's not even any hacky buff-like effects

barren tapir
#

Luckily for me, the 16(?) Or so monsters I have planned won't need buffs, it's like 95% unique attacks and projectile patterns (so... not any easier most likely)

fast plaza
#

It's so validating that I'm not the only person who's struggled with the buffs stuff

barren tapir
#

The hardest part about SV modding is learning the SV codebase. Especially when you don't have time to thoroughly look through it

fast plaza
#

Ooo gl with that. I really wanna add monsters to my mod too but I got 0 art skill and thinking of making things correctly sync in multiplayer makes my head spin

#

The hardest part of SV modding is looking at other people's mods and being like "oh man they're so much better than this at me I'm legitimately embarrassed by my code now"

brave fable
#

i put about 15 minutes into LOC's lasagna slow aura debuff on monsters and decided that it not even affecting monsters that don't have legs is a feature not a bug

strong kite
#

I don't imagine I can essentially make a 2-way obelisk

barren tapir
barren tapir
strong kite
#

Wait you're so right

fast plaza
#

I think my hacky tired as hell solution for monster debuffs was hijacking some values that exist in NPCs but are unused on monsters, like their personality stats. It's ugly as hell and ethically wrong but it saves me from having to do type casting every update cycle.

strong kite
# barren tapir Mini obelisks

Could I apply that functionality to one custom placed object on the farm and one persistent placed object off the farm?

barren tapir
brave fable
#

though i'll admit i did the same for a mod way back

fast plaza
#

I'd agree usually but since it's time based I'd have to apply it in the update method and type casting string to int for multiple monsters every game tick sounds like it'd lag the game so bad

#

That's assuming monsters have a moddata field and I honestly can't remember if they do

lucid iron
#

You can toss all that in a cwt

fast plaza
#

Cwt?

barren tapir
#

What's a CWT?

lucid iron
#

ConditionalWeakTable<Monster, buffstuffs>

#

Is like a funny ref based dict

fast plaza
#

Ooo ok I'm definitely writing that down

lucid iron
#

The downside is no net sync though

brave fable
barren tapir
#

Whelp, I gtg. I've a meeting soon ๐Ÿ˜…

lucid iron
#

modData is net sync

fast plaza
#

It's a wonderful kind of solution that has no mod compatibility issues as long as you're the stupidest mod developer in the room

brave fable
#

noone indeed SDVdemetriums

strong kite
#

Wait so how would I make use of the Mini Obelisk code for a building and a stationary map object (and more importantly where would I actually find that)

verbal glacier
#

well mini obelisks aren't buildings, they are big craftables

strong kite
#

So I wouldn't be able to use the code for my purposes?

verbal glacier
#

i believe the warp function of mini-obelisks is handled in C#

strong kite
verbal glacier
#

there might be a framework that could help, no clue tho

strong kite
#

eh.. I might be better off not worrying about it. Would there be any other solution to having a warp off-farm take you in front of a building/obelisk on the farm?

verbal glacier
#

totems?

strong kite
#

Uhh not quite

#

Basically, I want to give the player the ability to place a warp to my custom location on their farm which I'm doing like an Obelisk. This warp leads to the area, of course. I then want a warp in the custom location to take you back to in front of the obelisk on your farm

verbal glacier
#

Why specifically back to the obelisk on the farm?

strong kite
#

Because it's like a portal, it would make sense for it to take you to the other side of the portal

#

If it's not possible I can work with that, but if It is possible (without C#) then I wanna try it first

verbal glacier
#

Hope someone comes with an idea for you SDVpufferheart

brittle pasture
#

-# my idea is learn c# SDVpufferwoke

#

-# i keep forgetting how to smol text

strong kite
lone grail
#

ohhh okay,, i sadly dont think i ahve any good advice for you but i wish you luck !!

#

i kinda see the vision

strong kite
#

(question not specifically for Selph despite the reply)

#

Like could I set a warp to in front of the door of the farm house?

brittle pasture
#

hmm maybe you can make it a shed-like building

#

probably no fancy teleport though

strong kite
#

Would I be able to set a trigger action that has it play a sound effect?

summer spoke
#

Can I post a line of code that's giving me a bit of trouble? It's not more than a line

brittle pasture
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.

strong kite
brittle pasture
#

you want SawEvent

#

(and remove the [seen] part)

summer spoke
#

Right, okay, thank you. Little details like that always trip me up lol

#

And do you know why the comma at the end is turning up red?

brittle pasture
summer spoke
#

Right, okay, thank you

strong kite
brittle pasture
#

buildings can take you to a non-instanced location (see the greenhouse)

strong kite
#

Ohh okay

#

Admittedly I'm not entirely sure what I'm doing but how does this look?

#

And here's the action

brittle pasture
#

still need to create the location but looks good so far

#

ignore me if it's already created

strong kite
#

It's existed for a while :3c (It's leading to the main new location in my mod)

#

Also you say so far which I take it to mean there's still more I need to do?

brittle pasture
#

outside of setting a builder and cost you probably got it

summer spoke
strong kite
#

Oh yeah. That ah.. requires C# doesn't it? since it's meant to be a bundle reward

#

With an object next to the exit in the Rift that I hoped to have let you move the building

brittle pasture
#

if you're willing to add one more dependency you can set a custom builder menu

#

either MMAP or Custom Builders

#

the bundle reward can be a special item that the building requires to build

verbal glacier
strong kite
summer spoke
#

okay thank you @verbal glacier

brittle pasture
#

that's the Builder field

verbal glacier
strong kite
#

And then I just add a BuildCondition for having the mail flag from completing the bundle?

summer spoke
#

Right sorry

strong kite
#

Alright! I think the last thing I need to know is how to set the warp out of there to take you back to the front of the building

lucid iron
#

Is this a building interior

strong kite
inland rain
#

I made a custom monster framework that works with Dynamic Map Tiles monster spawning

lucid iron
#

Wow angry roger real

#

What can u customize?

lucid iron
#

This is fine even if non instanced

strong kite
#

Wait are you saying that any warp would take you back to the front of the building?

lucid iron
#

The first warp

#

Not any warp

#

Also gotta be destination farm iirc NotteThink

#

I don't remember exact the details off hand

#

Ah no the first warp matters for where u land when inside

strong kite
#

honestly maybe this just ain't the way to go about this ๐Ÿ˜ญ
-# (brain no work pichusad )

#

Maybe I just need to get it in game and see how what I've got works

#

Though it 100% wont work how it's supposed to because I don't have a warp back specified-

inland rain
strong kite
#

The modding page mentions a "warp list" but idk what that means

inland rain
#

lots of sound customization, sprites ofc, projectile customization

#

and all the basic stuff like damage, health, speed, experience, resilience, slipperiness

tiny zealot
#

what does slipperiness do? (i don't know much about monsters)

inland rain
#

I have no idea tbh

#

probably how slow they decel or smth

#

gliders

#

oh and custom drops

craggy goblet
hard fern
#

it sees the { and freaks out

brittle pasture
#

you have a rather wacky block in line 477

hard fern
#

bc its in the middle of the everything

brittle pasture
#

just remove everything other than the rain dialogue line and fix the key

craggy goblet
#

oh wait i get it

#

Now it's yelling that 'translation files can only obtain text property values' ๐Ÿฅฒ Something something with Changes

hard fern
#

oh

#

if its an i18n yeah you can't have changes

#

it would be just the strings

#

so no editdata, no actions etc.

barren tapir
#

I have a dynamic token ShopThemeY whose value is determined by the config value set in the CP mod.

I'm currently in the process of transferring over the config file to the C# mod.

How would I define and register the "ShopThemeY" token in the C# mod?

strong kite
#

Honestly I might give up on the whole acting like a shed thing and just find a point on the farm for it to warp you back to cuz otherwise this is going to be SO much more complicated in my head than it needs to be

#

My first thoughts are either have it send you to the door of the farmhouse, or have it send you to where the warp totem sends you. But I'm saying these on the assumption there's special warps for those (not sure why I think there is for the door of the house tbh)

#

Though tbh any location works for me as long as it's consistent across all the farm types and accounts for moving buildings (like moving the farmhouse)

brittle pasture
barren tapir
#

I think I figured it out

#

Maybe

brittle pasture
#

also i browsed the code and if an interior location (instanced or not) has a Warp to the farm then that warp should take you back to the building's entrance

#

other warps are untouched

barren tapir
#

I swear, I've probably read at least 200 pages of documentations this week alone (I'm so tired ๐Ÿ˜…)

strong kite
#

Oh sweet okay!

barren tapir
#

Just to clarify, only a small percentage of those documentation articles are related to modding. Most of it comes from government policies and/or post-quantum algorithms.

I'm so tired ๐Ÿ˜…

barren tapir
#

Between my IRL job, job hunting, and modding it feels like I have 3 jobs a day sometimes ๐Ÿ˜…

strong kite
#

I'm also gonna have to figure out how to limit it to only ONE rift on the farm

void aspen
#

Does anyone have a string map for \LooseSprites\font_colored and \LooseSprites\font_bold by any chance?
Or game has it somewhere?

brittle pasture
#

theres a GSQ for building count

strong kite
#

Ohhh I know EXACTLY why I thought there's a warp that puts you at the farmhouse's door. 'Cuz of CJB's Cheats Menu, the farm warp takes you there

strong kite
#

Oh I thought the return scepter takes you to the same place as a totem. Then again I've never bought it HehSweatCloseup

barren tapir
strong kite
brittle pasture
#

you probably need to specify coords for formatting purposes, but the exact values shouldnt matter

#

the building code will rewrite the Farm warps

strong kite
#

Hm.. so it's probably because interacting with the building is a trigger action which triggers a BETAS warpfarmer function?

#

Cuz it's not taking back to the outside of the portal, and instead the coordinates I specified

#

Unless it's also not sending me to the location as a NonInstancedIndoorLocation and instead a regular warp ๐Ÿค”

#

Which very well could be

#

I'll remove the DefaultAction I had set and see what happens

autumn tide
#

oh heavens

strong kite
#

I get a sea of errors that triggers every frame I'm holding right click on it LMAO

craggy goblet
#

Can NPCs actually go for a swim in the Bathhouse pool? Was wondering if I can add that into my schedule SDVpuffermlem

autumn tide
#

I think if you wanted to add swimming animations they could?

craggy goblet
barren tapir
strong kite
#

So I'm guessing I need to specifically set where in the location you're warped to?

#

(I thought it would use the DefaultWarpLocation value in the location file ftr)

craggy goblet
autumn tide
#

godspeed SDVpuffersalute

tough osprey
#

Hello I was wondering if I could get some help with sending mail
Been trying to get these to show up on my mailbox and its not working and idk why I've been staring at these same lines for too long ๐Ÿซ 
I've tried with both "Condition" and "When", both are in the screenshot to show how i write them. I can mark them as seen in SMAPI and the events run fine but I can't get the actual mail to show up in the mailbox aaaa

brittle pasture
craggy goblet
tough osprey
#

I've done that as well, still not working SDVpufferwaaah

brittle pasture
#

you can try the debug gq command to test that your condition actually evaluates to true

#

also note that your trigger is adding mail to tomorrow on day start, meaning there's a 1 day delay

strong kite
#

again maybe I just stop trying to do the indoorlocation thing and just have it warp you elsewhere on the farm because I don't know where to even begin with this error heehee

brittle pasture
#

code?

strong kite
tough osprey
brittle pasture
brittle pasture
void aspen
#

wait is there a way to check the games code

#

not just content

strong kite
#

I'm gonna need to add a regular warp to this, aren't I? I removed it cuz I thought something about it having an indoor location would like.. automatically register it as a warp or something

#

And the Betas warp didn't seem to function properly with what you described should happen

golden spire
void aspen
#

yeah that

golden spire
#

!decompile

ocean sailBOT
void aspen
#

tyy

brittle pasture
tough osprey
strong kite
#

But the ones that do work, then send you to the specified coordinates upon return and not outside the portal

brittle pasture
#

oh woops didnt mean to reply to that one

strong kite
# brittle pasture the warps to Farm inside the location?

Yee. The tile marked as "Human Door" on the farm results in a flood of errors, but the tiles that aren't Human Door warp you correctly, but when those work, returning instead warps you to the coordinates I've specified in the other action rather than outside the building

brittle pasture
#

ok yeah the exit warp has to be on the map

strong kite
#

Rather than done through a trigger action?

brittle pasture
#

yeup

strong kite
#

dang. so no funni sound huh

#

Unless I can have an action run multiple things?

brittle pasture
#

there's still the vanilla LocationChanged trigger

tough osprey
#

I FIGURED IT OUT

#

Sorry for interrupting and thanks again SDVpufferparty

brittle pasture
strong kite
#

Ah shoot, alright. I appreciate the help!
-# my brain is registering the pieces on how to make it work but not actually comprehending it Tiredkip

patent lanceBOT
strong kite
#

I don't know why I'm struggling to grasp how this works so badly

#

Okay. For now, I'm just completely disregarding the whole interior and human door thing and whatever- Shit ain't workin, it's stressin me out. So I'm just gonna go with an implementation I know functions and possibly return to this later when I have a clearer mind

hard fern
#

so whats the difference bwteeen a human door and an inhuman door

strong kite
hard fern
#

huh

#

since humans are technically animals can we go through both doors SDVdemetriums

strong kite
#

I mean you can try

#

Anyway, is there a way I can call on the Return Scepter or Farm Warp Totem's code for the warp home?

half tangle
#

all the animation and frill with those is handled by C#, but I see that BETAS has a trigger action that can warp the player

#

(also in case it matters, the return scepter and the farm warp totem go to different places)

strong kite
#

I'm aware, I just need it to send you to a "fixed" location that can vary

#

I can't just do Farm 48 7 because not every farm type has the totem point at 48 7

void aspen
#

I wont mind a mod that allows me to use the barn gate tbh

#

and mb that little coop door

strong kite
#

This is what I've got so far, and yea this works but it's not universal for every farm type

half tangle
#

the totem location is determined by the map property (on the Farm) WarpTotemEntry, so if there's a way for you to get info about a map property then you might be able to?

strong kite
#

Maybe I just find a way to set conditions based on the farm type. but that would mean no compatibility with modded farm types Azusob
I definitely don't know how to call upon that map property

half tangle
#

yeah, I'm not seeing anything helpful in the wiki or the CP docs (I live in C# land primarily)

strong kite
#

So best bet might be to wait for someone to come by who does know how to do this. Is there a mod anywhere that has a functionality like this?

fossil osprey
#

probably, but which one? no idea

urban patrol
#

is your issue that you want a traction that doesnโ€™t use specific coords?

strong kite
#

I just want a traction that will warp you to a consistent location regardless of farm type or building position

urban patrol
#

i once again bust in after not backreading

strong kite
#

Most preferably on the farm

urban patrol
strong kite
urban patrol
#

but you canโ€™t use 48 7 because farm maps vary?

strong kite
#

Yea. The place the warp totem sends you would be perfect cuz it's always a clear tile. No debris or player placed objects that might get in the way.
But the warp totem doesn't take you to the same coordinates on every farm type

urban patrol
#

gotcha

#

@lucid iron is a traction that warps the player to the farm warp statue in MMAPโ€™s scope

#

or a tile property you could define as a landing point

#

you can use that with this or just this as normal

#

oh wait nvm you said it wasnโ€™t a building

#

sorry i just woke up from a nap

strong kite
#

Well no no hold on

#

This IS a building that warps you to my custom location, then theres a warp there that's meant to send you back to the farm

#

I WAS trying to figure out how to have it warp you in front of the building