#making-mods-general

1 messages · Page 478 of 1

urban patrol
#

although if your mod ID contains non alphanumeric characters you’ll still get an error

#

your config doesn’t need to have your mod id

fierce vault
#

Ok, I'll change that then

#

Thanks

urban patrol
#

np

opaque cobalt
#

Okay thanks. Have not played much 1.6 so wasnt really sure how the two new festivals worked

ornate locust
#

These are what willy's look like

#

Penny may just do normal things those days if she doesn't attend

fierce vault
#

oops, just noticed a typo too 😅

#

Gotta fix that

ornate locust
#

Yeah looking at Penny's schedules, I don't think she attends those, just does what her schedule normally does

gray bear
#

some npcs simply don't attend passive festivals

vernal crest
#

Your conditions are not correctly written, no. Separate to what Nic already pointed out about how your config tokens should be written, your syntax is wrong.

They should look like this:

"Condition": "SEASON Winter, {{KrobusWinterBlue}}"

I'm assuming that you want it to randomly pick between blue and pink if they are both true?

opaque cobalt
#

Thank you guys for the explanation. I guess that would mean that Penny doesn't need a festival outfit for those events as she doesn't do anything with them

fierce vault
#

Oh, thanks! I'll change that

ornate locust
#

Yeah, a small number of NPCs actually attend those, basically just fishermen

fierce vault
#

Hmm, it doesn't seem to be working, but strangely, I think I only see a million errors for my custom npc now. Double confusing

#

oh. nvm

#

There are still errors for my portraits

#

Wait, there may be a mismatch somewhere, I'll see if I can work that out

opaque cobalt
#

just my two cents before sleep takes me, make sure your file spelling/naming is consistent, I once chased an issue for like 30min or an hour because I couldn't spell...

fierce vault
ocean sailBOT
#

Log Info: SMAPI 4.2.1 with SDV 1.6.15 build 24356 on macOS Unix 15.6.1, with 12 C# mods and 5 content packs.
Suggested fixes: One or more mods are out of date, consider updating them, SMAPI is out of date, consider updating it

fierce vault
#

It looks clean here, except for the version number being out of date

vernal crest
fierce vault
#

Ohh, I'll go over that. Thanks!

fierce vault
#

Just realized I'm not sure what to do with the assets file path if I have all the targets in one field (I was looking seasonal cute characters for reference). Do I make a separate target for each one, or put a bunch of paths in the from file at once?```{
"LogName": "Load Krobus Clothes",
"Action": "load",
"Priority": "High",
"Target": "Portraits/{{ModId}}_Krobus_Winter_Pink, Portraits/{{ModId}}_Krobus_Winter_blue, Characters/{{ModId}}_Krobus_Winter_Sprites_Pink, Characters/{{ModId}}_Krobus_Winter_Sprites_blue",
"FromFile": "assets/"
},

whole raptor
#

You can only use one from file path, but if your files' names match, you could just use something like assets/{TargetWithoutPath}}.png and it cycles through each target

fierce vault
#

If my file names match? Like using the same naming convention among all of them?

#

I did do that

whole raptor
#

Yeah, you just need to make sure that all the paths would line up at the end

#

For example:

vernal crest
#

Your files would need to be called <modid>_Krobus_Winter_Pink.png, where you replace <modid> with your actual unique ID written out in full.

whole raptor
#

I don't think I've actually seen mod id being used in in actual asset names SDVpufferthinkblob

fierce vault
#

Yeah, I'm confused which files, because I've never seen any with the mod id on the png

vernal crest
#

A lot of people don't bother making sure things like portraits are unique.

hard fern
#

Ive done it, and it works

#

So long as you write out the mod id fully

whole raptor
#

I'm not saying it wouldn't work... I feel like it'd just be annoying to do 😅

hard fern
#

Ehh... It kinda is? But only if you have a lot of assets

fierce vault
#

Can I ask about assets/{{TargetPathOnly}}/{{TargetWithoutPath}}.png? Do i use both?

whole raptor
#

Depends on what your path is

vernal crest
#

It is, but so is having a mod incompatibility because you named your asset the same thing as someone else. Though to be fair, the likelihood of two mods that are trying to edit the same NPC in a way that isn't inherently incompatible and yet also manage to accidentally have identical asset names is really low.

whole raptor
#

It's basically a mix & match. On the example of your first target they just turn into:
{{Target}} -> Portraits/{{ModId}}_Krobus_Winter_Pink
{{TargetWithoutPath}} -> {{ModId}}_Krobus_Winter_Pink
{{TargetPathOnly}} -> Portraits
You use them when you need to make it match

hard fern
#

I think ive at least like tried to include my mod id (not exactly, just the latter half of it) in the name of my assets even if I don't write it out fully

fierce vault
#

I'm sorry, but reading through this, I don't think I really get what making them match means. I don't see a "characters/" either, so I don't get what the use of the other two is. Something just isn't clicking with that.

whole raptor
#

Yeah, I suck at explaining 😅

fierce vault
#

Oh good, I though it was mostly me 😅

hard fern
#

There's a lot of things u can do with the target and stuff

fierce vault
#

I'm just going to be honest now, I'm probably going to continue to mess up my mod id's too, because I just don't intuitively get where to place all of them

vernal crest
#

TargetWithoutPath only returns the value of your Target field after the final forward slash. So the TargetWithoutPath in your case would be {{ModId}}_Krobus_Winter_Pink because the full Target (right now) is Portraits/{{ModId}}_Krobus_Winter_Pink.

Target returns the entire value: Portraits/{{ModId}}_Krobus_Winter_Pink

TargetPathOnly returns only the part before the final forward slash: Portraits

hard fern
#

Aba was faster than me XD

vernal crest
#

When you use any of those tokens in your FromFile, Content Patcher will replace the token with the value that it finds in your Target field.

So if you do: "FromFile": assets/{{TargetWithoutPath}}.png" it would look for assets/ParcySnippet.Krobus_Krobus_Winter_Pink.png

fierce vault
#

Ok, so it looks like to me I only need the assets/{{TargetWithoutPath}}.png

vernal crest
#

Oh ho ho ho. I just tested and confirmed that it's possible to have this in the Appearance data: "Portrait": "Portraits/{{ModId}}/Sam_Test",

#

Meaning it's possible to have a mod id in a portrait asset without needing to have it in the file name.

fierce vault
#

Oh, ok. So I should try to use the mod id then?

vernal crest
#

TBH, no. I don't know enough about how the game works to be sure that it wouldn't break in some circumstances so I don't want to recommend it without having tested it fully myself.

If you want increased likelihood of uniqueness without having to put your fully mod ID into your file names, you could use initials like PK_Krobus_Winter_Pink.png (Parcy's Krobus) or something.

lucid mulch
#

I don't think you need the prefix either in Appearance

#

but you need a stock Portraits/{npcid} and Characters/{npcid} when appearance doesn't happen

gentle rose
fierce vault
#

{npcid}? What is that short for? I haven't seen that anywhere

vernal crest
#

That's not a token, it was just SinZ indicating that you'd replace it with the NPC's actual internal name.

fierce vault
#

Ok

vernal crest
#

And since a custom NPC's internal name should ideally be prefixed with a mod ID anyway, the default portrait and character would have the mod ID in them. (Not relevant for your Krobus though Parcy)

lucid mulch
#

its mainly places where the game is injecting stuff in front of a name or id where mods are forced to play ball with vanilla naming conventions

#

the stock portrait and sprite follow that rule, but appearance fields dont

gentle rose
#

portrait appearances still have IDs though, they’re a model of ID: appearance

unless I’m misunderstanding what you guys are saying

#

oh wait I am, you just meant you can make it unique without necessarily doing a prefix

lucid mulch
#

yes

#

Portraits/{{ModId}}/Sam_Test and Mods/{{modid}}/AbigailPortraitSummer are equally valid

gentle rose
#

yup, makes sense now

gentle rose
#

the bone being Mister Qi shaped. or MrQi shaped, the game can’t decide SDVpufferwaaah

lucid mulch
#

hmm, you can use the CharacterData.TextureName field to force the stock stuff to route to something deeper

hard fern
#

....

#

Why is mr qi named that way

#

Why, mr ape

gentle rose
#

my npc realm had to have special code for mr qi and the bear SDVpufferwaaah and at least the bear makes sense

lucid mulch
#

more that you can use TextureName to make {{ModId}}_MyNpc to have their non-appearance textures to be Portraits/{{ModId}}/MyNpc by setting TextureName to {{ModId}}/MyNpc

#

which would make non-appearance portrait/sprite play nice with TargetWithoutPath and avoid filenames with modid

#

runs into the other problem with targetwithoutpath that its annoying to pack it in one giant load and still have the portrait and sprite point to different files

gentle rose
#

oh right I had optimisation questions for you sinz but I didn’t manage to refine them past “howwww”

lucid mulch
#

I like optimisations

gentle rose
#

so my mod needs to essentially just load a Lot Of Big Textures. which will obviously always carry a cost

#

but I want to optimise it as best I can. so far I’ve run into weird unload behaviour and potentially some multithreaded loading? which is bizarre

lucid mulch
#

outside of speedysolutions messing with audio, nothing should be multithreaded as far as the content pipeline is concerned.

it can be nested, but not concurrent

fierce vault
limpid gorge
#

How can I delete this warp?

lucid mulch
#

the portrait/sprite fields in Appearance need to be fully specified (Portraits/{{ModId}}_Krobus_Winter_Pink not Krobus_Winter_Pink)

gentle rose
#

that’s what I thought, and yet it was behaving weirdly

basically I have a prefix and a postfix on a method that for our purposes will be

static int prev game time
prefix: log time since prev game time in ms, update prev game time
postfix: load some stuff, log time since prev game time in ms, update game time

bizarrely, a delay that’s DEFINITELY caused by the loads is being logged by the prefix logger not the postfix logger

#

they share prev game time and the logging is done after the loads are

lucid mulch
#

if at any point the stacktrace has the method earlier on, and later on that will break

gentle rose
#

stack trace?

gentle rose
#

it’s a draw method that should be called in a pretty predictable loop

#

and not call itself or anything that calls itself

lucid mulch
#

Which draw method

gentle rose
#

it’s dialogue box drawPortrait iirc?

lucid mulch
#

because some draw methods call other draw methods which call super

#

for the postfix - prefix time, putting the stopwatch in the harmony state makes your life considerably saner

#

for previous postfix to current prefix, less of an option

gentle rose
#

yeah, exactly

#

but actually regardless, I’d expect a call to the same method to result in out of order postfix and prefix logs

lucid mulch
#

transpilers and skipping prefixes can also mess with it

fierce vault
#

Smapi error... krobus is repeating, but not in the content json [02:28:36 ERROR Content Patcher] Patch error: Parcy's Krobus Portraits > Load Krobus Clothes (Portraits/{{ModId}}_Krobus_Winter_Pink) has a FromFile which matches non-existent file 'assets/ParcySnippet.Krobus_Krobus_Winter_Pink.png'. [02:28:36 ERROR Content Patcher] Patch error: Parcy's Krobus Portraits > Load Krobus Clothes (Portraits/{{ModId}}_Krobus_Winter_Blue) has a FromFile which matches non-existent file 'assets/ParcySnippet.Krobus_Krobus_Winter_Blue.png'. [02:28:36 ERROR Content Patcher] Patch error: Parcy's Krobus Portraits > Load Krobus Clothes (Characters/{{ModId}}_Krobus_Winter_Sprites_Pink) has a FromFile which matches non-existent file 'assets/ParcySnippet.Krobus_Krobus_Winter_Sprites_Pink.png'. [02:28:36 ERROR Content Patcher] Patch error: Parcy's Krobus Portraits > Load Krobus Clothes (Characters/{{ModId}}_Krobus_Winter_Sprites_blue) has a FromFile which matches non-existent file 'assets/ParcySnippet.Krobus_Krobus_Winter_Sprites_blue.png'.

#

I've for sure messed up the mod ids,

#

or something

lucid mulch
#

I'm assuming your modid is ParcySnippet.Krobus and so ParcySnippet.Krobus appended with _Krobus_Winter_Pink makes ParcySnippet.Krobus_Krobus_Winter_Pink

fierce vault
#

Oh, maybe. That would make sense

#

I think I did do that

#

Definitely not necessary

#

I wonder if it would work I just nuked all the mod ids

gentle rose
fierce vault
#

I'm going to try it out....

#

later, I think. Thanks for all the help guys. I appreciate it.

#

I'll fix the rest of this mess later

limpid gorge
#

Guys How can I change MapProperties in content.json. I wanna delete a warp.

limpid gorge
vernal crest
limpid gorge
# vernal crest Well, Append is to add things. If you want to delete you need to look at RemoveD...

I write my code like;

 {
    "Format": "2.8.0",
    "Changes": [
        {
            "Action": "EditMap",
            "Target": "Maps/FarmHouse",
            "FromFile": "assets/Otel_Lobi.tmx",
            "AddWarps": [
                "23 49 Farm 64 16",
                "24 49 Farm 64 16",
                "25 49 Farm 64 16"
            ]
        },
        {
            "Action": "EditMap",
            "Target": "Maps/Farm",
            "AddWarps": [
                "65 15 FarmHouse 24 48",
                "63 15 FarmHouse 24 48",
                "65 16 FarmHouse 24 48",
                "63 16 FarmHouse 24 48"
            ]
        },
        {
            "Action": "EditMap",
            "Target": "Maps/FarmHouse",
            "TextOperations": [
                {
                    "Operation": "RemoveDelimited",
                    "Target": [
                        "MapProperties",
                        "NPCWarp"
                    ],
                    "Search": "3 12 Farm 64 15",
                    "Value": "24 48 Farm 64 15",
                    "Delimiter": " "
                }
            ]
        }
    ]
}

But I got an error; https://smapi.io/log/3ca1a36b2e5246eebe918f090f9321ef

ocean sailBOT
#

Log Info: SMAPI 4.3.2 with SDV 1.6.15 build 24356 on Microsoft Windows NT 10.0.19045.0, with 4 C# mods and 1 content packs.

vernal crest
limpid gorge
gentle rose
#

why do you have a "Value" in your RemoveDelimited patch?

vernal crest
lucid mulch
#

patch export Maps/FarmHouse map to work out what happened to the map after the patch

#

as something bad happened to the map property to cause that to explode

limpid gorge
# lucid mulch `patch export Maps/FarmHouse map` to work out what happened to the map after the...
patch export Maps/FarmHouse map
[14:47:15 TRACE SMAPI] Content Patcher edited Maps/FarmHouse (for the 'StardewValleyMultiWorld' content pack).
[14:47:15 ERROR Content Patcher] Mod failed handling that command:
NullReferenceException: Object reference not set to an instance of an object.
   at xTile.ObjectModel.PropertyValue.ToString() in D:\GitlabRunner\builds\Gq5qA5P4\0\ConcernedApe\stardewvalley\Farmer\xTileSource\xTile\ObjectModel\PropertyValue.cs:line 179
   at TMXTile.TMXFormat.Store(Map map)
   at ContentPatcher.Framework.Commands.Commands.ExportCommand.ExportMap(Map rawMap, String path) in E:\source\_Stardew\Mods.Pathoschild\ContentPatcher\Framework\Commands\Commands\ExportCommand.cs:line 199
   at ContentPatcher.Framework.Commands.Commands.ExportCommand.TryExportRaw(Object asset, String& path, String& error) in E:\source\_Stardew\Mods.Pathoschild\ContentPatcher\Framework\Commands\Commands\ExportCommand.cs:line 171
   at ContentPatcher.Framework.Commands.Commands.ExportCommand.Handle(String[] args) in E:\source\_Stardew\Mods.Pathoschild\ContentPatcher\Framework\Commands\Commands\ExportCommand.cs:line 145
   at Pathoschild.Stardew.Common.Commands.GenericCommandHandler.Handle(String[] args) in E:\source\_Stardew\Mods.Pathoschild\Common\Commands\GenericCommandHandler.cs:line 60
   at Pathoschild.Stardew.Common.Commands.GenericCommandHandler.<RegisterWith>b__10_0(String _, String[] args) in E:\source\_Stardew\Mods.Pathoschild\Common\Commands\GenericCommandHandler.cs:line 74
   at StardewModdingAPI.Framework.SCore.OnPlayerInstanceUpdating(SGame instance, GameTime gameTime, Action runUpdate) in SMAPI\Framework\SCore.cs:line 668
lucid mulch
#

oh fun, it explodes enough to also not be valid to export

limpid gorge
hard fern
#

uh oh

lucid mulch
#

Are you sure the original warp is an NPCWarp and not Warp?

vernal crest
#

There are no NPCWarps in the vanilla farmhouse.

limpid gorge
lucid mulch
#

only way I can feasibily see this exploding is if you tried to remove from a property that didn't already exist causing it to be created with a null value

limpid gorge
lucid mulch
#

interestingly enough I've seen null map properties before and its... fine in other places

#

but guess the warp logic doesn't use the wrappers like what lightss use

#

as its null map properties that makes Speedysolutions error out when trying to make tbins

limpid gorge
#

When I try this code now, I see that it doesn't work. There's still a Warp there.

{
    "Format": "2.8.0",
    "Changes": [
        {
            "Action": "EditMap",
            "Target": "Maps/FarmHouse",
            "FromFile": "assets/Otel_Lobi.tmx",
            "AddWarps": [
                "23 49 Farm 64 16",
                "24 49 Farm 64 16",
                "25 49 Farm 64 16"
            ],
            "TextOperations": [
                {
                    "Operation": "ReplaceDelimited",
                    "Target": [
                        "MapProperties",
                        "WarpPoints"
                    ],
                    "Search": "3 11 Farm 64 15",
                    "Value": "24 48 Farm 64 15",
                    "Delimiter": " "
                }
            ]
        },
        {
            "Action": "EditMap",
            "Target": "Maps/Farm",
            "AddWarps": [
                "65 15 FarmHouse 24 48",
                "63 15 FarmHouse 24 48",
                "65 16 FarmHouse 24 48",
                "63 16 FarmHouse 24 48"
            ]
        }
    ]
}
vernal crest
limpid gorge
lucid mulch
#

tbh I wouldn't fully trust warp edits to a building interior let alone farmhouse due to how it has to update the warps to reflect the current position of the exterior building

vernal crest
# limpid gorge Yes I try that too. But it doesnt work

Because your delimiter is a space, there is no value 3 11 Farm 64 15 in that map property as far as Content Patcher is concerned. It's seeing 3, 11, Farm, 64, and 15 all as separate values. In order to actually find it, you'd need one TextOperations search for each value separately.

lucid mulch
#

there is hardcoded logic that any building interior that has warps to Farm will be corrected to be aimed at the buildings human door anyway

limpid gorge
vernal crest
limpid gorge
#

I guess I should leave Farmhouse alone

#

I have to think another way

lucid iron
#

Can I ask why u want to delete the warp

limpid gorge
#

And also thats not enough because I have to change Warp in Farm entryway to FarmHouse

#

But I didnt find it. I know coordinates but even if I change it doesnt work

lucid iron
#

Farmhouse is a building so warp out is based on human door instead of what the warp target says

limpid gorge
lucid iron
#

Farmhouse

west thunder
#

Sorry if I'm interrupting anything, but given that I'm literally JUST starting, this shouldn't take too long.

#

So, baby's first CP mod.

#

How should I be writing my content file when I want to replace not one, but multiple (in my case, two) assets?

#

This changes one, how 'bout another?

iron ridge
#

two assets with different fromfiles?

west thunder
#

Two sprite sheets.

#

One from loose sprites, other from tylesheets.

iron ridge
#

you'd just add a second copy of the { } section inside changes, with a , between

hard fern
lucid iron
iron ridge
#

so ```
"Changes":[
{"Action": "Load", ... },
{"Action": "Load", ... },
]

west thunder
#

Like so?

iron ridge
#

neeed a , between them

#

after the first }

gentle rose
#

you’re loading abigail’s portrait twice?

iron ridge
#

i assume they're working on adding the proper paths

#

abigail is the wiki's example

gentle rose
#

gotcha

#

just in case, you really shouldn’t be Loading something like a vanilla npc’s portrait asset at all, that should be an editimage

vernal crest
#

I disagree. Vanilla NPC portraits can be Loaded - it's not like you need compatibility with other mods trying to completely replace the same asset.

#

But they're changing emotes anyway.

gentle rose
#

but the load wouldn't even work, would it? if it's to Portraits/Name? or am I being confused

I really shouldn't be messaging here today until I sort out my dizziness tbh SDVpuffersquee

hard fern
gentle rose
#

yeah but Portraits/Abigail already exists

hard fern
#

Yeah but loading it just overwrites it

west thunder
#

me bac

hard fern
#

Nothing explodes

vernal crest
#

But the game doesn't Load so there's no clash, like Forsy says

gentle rose
#

huh. wha

stray hemlock
#

You can even Load with priorities. By default it's exclusive, but you can change that.

vernal crest
#

It's a CP or SMAPI thing to refuse to Load two exclusive patches

stray hemlock
#

So you can maintain compatibility.

gentle rose
vernal crest
stray hemlock
vernal crest
#

Yes, that's the exploding I referred to

west thunder
#

Like so?

vernal crest
#

When only one or neither has Exclusive, there's no exploding, but still only one will apply

gentle rose
vernal crest
#

Unlike EditImage where multiple will apply which is how overlays work

hard fern
west thunder
#

Oh, I need the asset as well. Oopsies.

vernal crest
# west thunder Like so?

Close, but you're currently only using half of the asset names. You need "Target": "TileSheets/emotes" etc

stray hemlock
gentle rose
vernal crest
west thunder
#

There we are.

gentle rose
#

loads with lower priorities will just be ignored.

west thunder
#

Stellar. And this will make it so the two images I have in my mod's asset folder will replace the images following these targets, yeah?

hard fern
#

Yup

west thunder
#

Brilliant.

vernal crest
#

Oh yeah, ignore what I said. Only one will Load.

west thunder
#

And I believe that's all.

stray hemlock
hard fern
#

Im finding it very funny that your text editor refuses to accept FromFile as a correct word though

west thunder
#

But that doesn't make much sense, the others aren't redded out.

#

Oh well.

stray hemlock
#

I recommend using an actual code editor that supports JSON highlighting.

west thunder
#

I have Notepad++, but I keep forgetting about it.

stray hemlock
#

I have a Windows "mod" that forwards everything to a code editor of my choice. So I can't even open Notepad if I wanted to.

modest dagger
#

In general would people want a mod that adds more machines or do you think they'd want to use already existing vanilla machines

stray hemlock
#

I don't think you can generalize like that. Mods exist so people can adjust based on how they want to play, so thinking in terms of "do people want this or this" is usually counter-intuitive.

vernal crest
#

I don't care, personally. I'll use Lookup Anything to figure it out either way.

modest dagger
#

I am making a mod so you can turn produce you grow into animal products. Do you think people would want to use existing machines or specifically dedicated machines

vernal crest
#

(We, uh, both just answered that question.)

#

And Wiz you know better than to ask the modmakers :P Go ask the players!

modest dagger
#

I was tryna be more specific

#

sorry aba

stray hemlock
gaunt orbit
# limpid gorge How can I delete this warp?

That's not a warp. The front door is handled by building data. If you delete it, the game will break, but you can move it to elsewhere on the building by editing building data

exotic token
#

im curious if this is even possible, but could I make a mod that spawns me in a non farm house and I have to buy the farm?

gaunt orbit
#

With harmony anything is possible

#

Real answer is that it shouldn't be too hard

exotic token
#

new age healing isnt helpful

gaunt orbit
#

Hah! No I meant Harmony, the c# code-patching library that mods use

exotic token
#

ah, i dont know that library

gaunt orbit
#

!harmony

ocean sailBOT
#

Harmony is a framework for patching .NET code, allowing you to take any portion of the game's logic and insert or substitute your own. This gives you more flexibility and control than SMAPI helpers and events, at the cost of being typically more complex and difficult to use safely and correctly, and more likely to break with a future update of the game and/or SMAPI.

If you are trying to do something that isn't possible or practical with SMAPI alone, then Harmony is usually the solution.

For more information, refer to the following:

exotic token
#

ah

hard fern
#

XD now im thinking of someone making a mod simply with the power of positive vibes (not vibe coding)

exotic token
#

although thinking about it a bit more, maybe it would be easier to edit the farm map itself, and make a new farm?

#

A new second farm map I mean

hard fern
#

i mean you could always make a new farm map/farm type but for what you're saying, you'd still need some kind of C#

#

to prevent the player from actually being on the farm

gaunt orbit
# exotic token ah

You would need harmony to add an option to buy the farm to Robin's menu, as well as to tweak some other things, like disabling farm events until purchased, and changing the respawn logic

gaunt orbit
#

Also I think moving cabins or farmhouse to a different map might break things

lucid iron
#

Actually what if u just do some crimes like

  1. Day started, betas warpfarmer somewhere else
  2. Map edit all the entrances to farm to gate it off
  3. Until the farm is "unlocked", keep warping farmer to somewhere else every morning if they ever end up in farmhouse by pass out
mortal hatch
#

i want opinions about this before i make the mod


Verdant Maker
+ 40% sell price and 10% processing speed for plant-based artisan goods


Lvl 10 Rancher Profession
Barnstead Maker
+ 40% sell price and 10% processing speed for animal-based artisan goods


Coopmaster and Shepherd gets combined:

Husbrandy Master
Befriend Farm animals quicker. Incubation time cut in half
* also increases product quality of animal products, like vanilla```
worldly wadi
#

Heyyyy I'm trying to create a custom monster but I'm a bit lost. I already checked the wiki, but, from what I was able to understand, it only gives information on how to EDIT monsters, not explaining how ADD a new monster. I'm lost, I can't find tutorials to do so, do I need to use C#?

fossil osprey
#

By "adding monsters", do you mean adding a completely new type of monster with its own loot pool and mechanic? Or a new "skin" for a monster/a monster with the same mechanics as an existing one?

worldly wadi
digital herald
#

Do you know if the event id are unique?

gray bear
#

in that context

fossil osprey
fossil osprey
#

Only downside is it will be that type of monster, so spawn at the same time and attack the same way

#

It'll just look different

ebon birch
#

hello!

#

i was wondering if there was a mod request area? it's a mod i could make myself but i'm just so tired lately i wanted to venture to see if i could work with someone instead

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.

gray bear
#

u can also say it here

ebon birch
#

i want to make a fashion sense pack for an outfit, nothing extreme

fossil osprey
#

If you want a collab, then feel free to describe it here so people can reach out to you

ebon birch
#

i already have all the pngs as i modified a mod for personal use a long time ago so i didnt have to write the code

gray bear
#

u need help with the code bit?

ebon birch
#

yeah

#

ive got the fashion sense wiki up but i am tired and my brain is fuzzy, chronic fatigue stuff

gray bear
#

mood

#

how many items is it

ebon birch
#

a hat, a shirt, a pants, and a boot.

gray bear
#

i did wanna try my hands at FS code. the art bit not for me

ebon birch
#

it's like a onesie of my fursona, nothing fantastical lmao. i'd love to make wings to match but i've made do with other wing mods instead

gray bear
#

feel free to dm me, i'll give it a shot. can't promise it'll work lmao

ebon birch
#

we could work together if you want, since i already have all the art. i bootegged a different mod and just changed the graphics, but stardew doesn't like that mod anymore and it's a weird mod anyway as it starts an event on game start to give you the clothes an i'd rather just use fashion sense

#

thanks, will do!

lucid iron
#

On location change to farm warp again PecoWant

gaunt orbit
#

That would work but you'd still get the various farm events when that happened

lucid iron
#

C# would do all that much nicer yeah

gaunt orbit
#

I miss entoarox framework. It had an event that let you change a warp before it happened

lucid iron
#

Warp redirection bolbthinking

#

What was it used for aside from this niche feature

dusk terrace
#

is there an easier way to get the current appearance data?

CharacterAppearanceData currentAppearance = null;
foreach (var appearance in speaker.getData().Appearance)
  if (appearance.Id == speaker.LastAppearanceId)
    currentAppearance = appearance;
#

or var currentAppearance = speaker.getData().Appearance.FirstOrDefault(x => x.Id == speaker.LastAppearanceId)
but that's still iterating over all appearance entries...

#

not sure the cost of getData() either

lucid iron
#

GetData is a dict lookup

#

I don't think you can do anything else here

dusk terrace
#

welp

lucid iron
#

But that is why u can consider checking the effects instead

#

Like the portrait as result of appearance selection

#

You can also consider only checking the id

woeful lintel
#

that's a bit weird to store an ID but not have a dict to use this ID on...

dusk terrace
#

so... something like checking against speaker.Portrait.Name to have something like...?

"Conditions": { "Portrait": "Sebastian_Beach" }
#

or does Name include the path and/or extension?

#

I'd check but um...

lucid iron
#

The Portrait is a Texture2D right? That means it should be entire asset path

dusk terrace
#

it's a GraphicsResource

lucid iron
#

What class is that LilyDerp

dusk terrace
#

er, nvm that's the parent class of Texture2D

lucid iron
#

I have never heard ok

dusk terrace
lucid iron
#

Yeah ok

lucid iron
woeful lintel
#

Yeah, actually, good point, since this is about appearance

lucid iron
#

But i think the reason for Id is probably so that content patcher which does stuff in dict form has something to edit

#

So there's a lot of vanilla assets that r list with Id

woeful lintel
#

I meant the fact that the speaker holds the id specifically instead of the actual appearance data. Don't know much about that though

dusk terrace
#

might also have something to do with how the last appearance id shouldn't be taken as a source of truth as explained in this comment:

    // Summary:
    //     The appearance ID from Data/Characters chosen by the last StardewValley.NPC.ChooseAppearance(StardewValley.LocalizedContentManager)
    //     call, or null if the last call didn't apply an appearance entry. This may not
    //     match their current textures if they were manually overridden after calling StardewValley.NPC.ChooseAppearance(StardewValley.LocalizedContentManager).
#

if there was a field readibly available to grab the appearance from, you might be more inclined to think that's the actual appearance being displayed, when it might not be

dusk terrace
#

what's the util method to strip the path and extension from a texture again? SDVkrobushappy

lucid iron
#

There wouldn't be extension right

dusk terrace
#

hmm I guess not if it's internal

#

would the locale be included?

#

var portraitTextureName = ModEntry.SHelper.GameContent.ParseAssetName(speaker.Portrait.Name).BaseName;
no idea if I'm doing this correctly

lucid iron
#

Hm i never considered loading a localized portrait asset

dusk terrace
#

mod idea: add holiday decorations to portraits depending on holiday in the locale SDVkrobushappy

royal stump
dusk terrace
#

I guess including the path wouldn't be so bad anyways if it's just a Portraits/ prefix or whatever path a mod puts it at

royal stump
#

you could split the string by / and grab the last index if needed
it gets a bit longer if you have file extensions, but ig if that's NPC portrait data it wouldn't

#

(or \\? whichever it is after helper parsing)

lucid iron
#

It's possible and honestly frequent for mods to not load to Portraits i feel

#

I would just check the entire asset name and trust mod author to know

#

(minus the locale bit)

dusk terrace
#

example usage

"Action": "EditData",
"Target": "Mangupix.DialogueDisplayFramework/Data",
"Fields": {
  "ExampleMod.WinterPortraits": {
    "ID": "ExampleMod.WinterPortraits",
    "Portrait": {
      "texturePath": "{{ModID}}/{{DDFC_Speaker}}_Winter",
    }
    "DisplayConditions": {
      "PortraitMatches": "Portraits/{{DDFC_Speaker}}_Winter",
      "AssetExists": "{{ModID}}/{{DDFC_Speaker}}_Winter",
    }
  }
}
latent mauve
#

Hooray, my test for whether or not separating out the dialogue break and portrait commands from my i18n text would cause issues worked. Now to change the rest of my event dialogue to match, so translators don't have to parse through the dialogue commands...

dusk terrace
#

...or maybe just {{DDFC_SpeakerPortraitName}} that extracts the part after the last / as Esca mentioned, and skip the PortraitMatches entirely

#

side note... {{DDFC_TokenName}}, {{Mangupix.DDFC_TokenName}} or {{Mangupix.DialogueDisplayFrameworkContinued_TokenName}}? lmao

lucid iron
#

Is that gonna update fast enough

dusk terrace
#

👆 idea from SinZ/irocendar, it'll insert a substring I can internally replace when needed

dull bay
#

@brittle pasture Hello, i would like to thank you for your reply on the Nexus forum ! I changed what you told me for the target "AnimalExtensionData" but it still doesn't work and i don't know why :/ Could you help me figure it out ? I hope my request doesn’t bother you too much

lucid iron
#

Maybe u could just put a {0} and use regular C# string format

dusk terrace
#

interpreted by CP or by mod authors?

#

because the idea is to use it as a token

lucid iron
#

By cp

#

You'd need to escape this somehow to use it in content patcher i fear

uncut viper
dusk terrace
# lucid iron You'd need to escape this somehow to use it in content patcher i fear
// in ModEntry.Entry or something:
ContentPatcherAPI.RegisterToken(ModManifest, "Mangupix.DDFC_TokenName", () => "\U55512speaker\U55512");

// in my patch validator:
if (!string.IsNullOrEmpty(conditions.AssetExists) && Game1.content.DoesAssetExist<Texture2D>(conditions.AssetExists.Replace("\U55512speaker\U55512", speaker.Name)))
  continue;
// in content.json
"AssetExists": "Portraits/{{Mangupix.DDFC_TokenName}}"
uncut viper
#

i don't really understand what that token is supposed to be doing or why it wouldn't break due to not updating fast enough

lucid iron
#

If you aren't depending on content patcher to resolve your values nor do you expect things to work in a When cond then there's no need to jump through all these hoops

uncut viper
#

if it's meant to just be a single static for the whole game session identifier value whose only purpose is to be replaced then I agree with chu

dusk terrace
#

why  {0} for the speaker's name, though? then {1} for the portrait string, {2} for the next variable, and so on?

lucid iron
#

That's just how string.Format wants it

#

Standard C# not sdv land

uncut viper
#

also you don't get a choice what your token is called here really. your token name is prefixed with your mod unique id. it's not negotiable

brittle pasture
dusk terrace
#

I get how string formatting works, but I'm saying mod authors might want to substitute with different values

brittle pasture
#

(a bit busy currently so wont get back immediately)

lucid iron
#

Afaik there's no issue with passing more params than what the string actually references

uncut viper
#

correct

lucid iron
#

You could also do custom format syntax really, point is just that this ain't a job for content patcher tokens imo

dusk terrace
#

here's the convo that convinced me to use CP tokens btw

dull bay
uncut viper
#

you can also just copy what SMAPI does for translation tokens, so long as you follow the license

dusk terrace
#

how does SMAPI do translation tokens?

uncut viper
#

im on mobile so you'll have to go looking in it's source yourself

autumn tide
#

hellooo would there be a way to give krobus a 'wedding' event where they show up at your house for the first time? if so, could i make the weather rainy that day?

urban patrol
#

do you mean you want the event to happen 3(ish) days after roommate proposal, and you want it to be raining that day? i don't think you can control when the wedding happens without C#, and i don't think you can change the weather at the farm without C# as well

#

if you want to make the event separate from roommate proposal though, you could have Weather rainy be an event precondition

autumn tide
#

hm, I am using BETAS to trigger the roommating, since i made a proposal event, maybe i could also use it to make it rain 3 days after, AND use spacecore to trigger the event after going to bed on the third day?

urban patrol
#

is there no vanilla roommate "wedding" event?

autumn tide
#

nothing, they just show up in your house lol

uncut viper
#

cannot do overnight events without More Nightly Events

autumn tide
urban patrol
#

then yeah you can handle all that timing yourself!

autumn tide
#

awesome, thanks guys :)

urban patrol
#

watch out for festivals though

autumn tide
urban patrol
#

nice

uncut viper
#

also I don't know what day it is during an overnight event

autumn tide
uncut viper
#

¯_(ツ)_/¯

autumn tide
#

I'll find out ig haha

dusk terrace
#

aren't translation tokens writen the same way as CP tokens?

#

with double brackets

uncut viper
#

yeah, but they don't have to be if you're writing your own implementation based on it

dusk terrace
#

I mean the implementation is a simple string.replace

uncut viper
#

well no, it isn't, it uses regex

#

and can take in a dictionary as values to replace

#

also, I can't believe I forgot about these, but why not a tokenizable string?

#

"why not" not as in "why didn't you think of this" because I clearly didn't either, but more as a "huh, wouldn't these work here?"

dusk terrace
#

huh... why not indeed SDVpuffersquee

uncut viper
#

(also apparently the SMAPI translator can also get token values from just... any class instance? by looking at the properties and fields via reflection? i must've forgotten that too because when has someone used this that seems way overkill lmao)

fierce vault
#

Progress???SDVpufferparty I did completely destroy the mod id's in the file, so it's loading now... sort of

lucid iron
#

I was gonna suggest tokenizeable string but i felt it was too much context anyways

uncut viper
#

though thinking about it, with new folder based i18n I could just load a "substitutions.json" into some data model and then pass that into the translator... SDVpufferthinkblob

lucid iron
#

You don't have easy access to speaker in tokenized text

#

And this is your data model to begin with, not dialogue or whatever

uncut viper
#

you have as much access as the string. Format way

lucid iron
#

It comes back to the point that this is a narrow scope thing

uncut viper
#

I'm not sure what you mean by too much context

lucid iron
#

Too specific to one context I mean

uncut viper
#

a tokenizable string is just a glorified find and replace

dusk terrace
#

Game1.content.DoesAssetExist<Texture2D>(TokenParser.ParseText(conditions.AssetExists))
much cleaner

uncut viper
#

it'll also have precedent in 1.7 when tkstrings get all that wild stuff for tractions and whatnot

lucid iron
#

If you know you only ever need to support this for some fields on your custom model then do u rly need to expose it blobcatgooglyblep

#

Not saying you shouldn't consider doing tokenizeable string parse on ur fields ofc, just whether the specific substitutions should be so

uncut viper
#

personally I think it's mostly for the benefit of the end user not needing to remember which substitution is which and whether it's one brace or two

dusk terrace
#

wasn't that the same concern with GSQs? which would also be an alternative offered for doing the exact same outcome

uncut viper
#

if you really wanna get silly with it you can put a {0} in a tokenizable string. don't know to what end but you could

lucid iron
#

What is the behavior if you call the ddfc tokenizeable string on like, a furniture name

uncut viper
#

the standard behavior for a tokenizable string that doesn't have a value, an empty string

dusk terrace
#

same user error 😂

uncut viper
#

very user error

lucid iron
#

Well as long as u r fine with that sleep

uncut viper
#

i still don't think gsqs are good but I think tkstrings are fine

#

People use i18n for all sorts of non dialogue stuff, misusing string storage systems is normal in Stardew modding

#

don't know what emotion that is

#

ill take it as approval

lucid iron
uncut viper
#

tbh I don't know what emotion that is either

#

I kinda just accept whenever you use it that I don't know

dusk terrace
#

wasn't there a GSQ for checking assets...? could've sworn I've seen it but can't find it now

lucid iron
#

Checking assets of what

dusk terrace
#

if an asset exists or not

lucid iron
#

Well u can add one

#

It's a bit strange to want tho

uncut viper
#

there would be no reason to have that in vanilla

#

there's barely a reason to want one in SMAPI

lucid iron
#

I feel like there's nothing a content mod can do if asset no exist so...

uncut viper
#

and they'd likely already be able to know if it exists via other means

lucid iron
#

More of a game/c# mod thing to deal with bad texture loaded

dusk terrace
#

hmm maybe it's just a niche usage to portraits then

lucid iron
#

You can certainly make one

#

For your niche usecase

#

But I feel like it's just part of normal valid/invalid check and not something user ever should think about

dusk terrace
#

I mean the field condition should be plenty enough, I just thought there was a GSQ alternative 🤷

lucid iron
#

In livestock bazaar i just refuse to display animals that have bad textures

#

Because they would be broken if you did buy them

#

Warn + skip bad portrait texture makes sense to me too

fierce vault
#

If anyone has time for it, I have a question. The assets load now, after I got rid of the faulty mod id's, but I was wonderin if I should be using a high priority and if my weight/precedence should be higher, like 101? "KrobusWinterPink": { "Id": "KrobusWinterPink", "Condition": "SEASON Winter, {{KrobusWinterPink}}", "Portrait": "Portraits/Krobus_Winter_Pink", "Sprite": "Characters/Krobus_Winter_Sprites_Pink", "Precendence": "1", "Weight": "1" },

dusk terrace
#

so in the same use case as earlier (but now tokenized) where you have a mod that replaces some NPC portraits but you don't want to list them all directly:

"ExampleMod.SomePortraitEdits": {
  "ID": "ExampleMod.SomePortraitEdits",
  "Portrait": {
    "texturePath": "{{ModID}}/[Mangupix.DDFC_SpeakerPortrait]"
  }
  "DisplayConditions": {
    "AssetExists": "{{ModID}}/[Mangupix.DDFC_SpeakerPortrait]"
  }
}
lucid iron
#

The game uses -100 for all winter outfits

#

Lower precedence wins

brittle pasture
lucid iron
#

It's good to follow the conventions i feel

brittle pasture
fierce vault
#

Krobus doesn't have winter outfits, or at least not visible ones... I'll go with lower precedence if you think it's better though.

lucid iron
brittle pasture
#

(ie. {{ModId}}_bulbasaur instead of just bulbasaur)

lucid iron
#

It's probably impossible for anyone to have a portrait for every custom npc that exists so

#

Is it actually worth offering a mode where you apply this entry even when portrait doesn't exist?

dusk terrace
#

hmm SDVpufferthinkblob good point...

#

so you're saying it should soft fail without warning if the texture isn't found? what if the user did a typo in their filename?

lucid iron
#

You should log something probably

uncut viper
#

if the user is specifically trying to use an asset that doesnt exist, you warn about it

ocean sailBOT
#

@uncut viper You leveled up to Desperado. That's level 1000! :open_mouth: You have been taken by the server's evil clutches and there is no escape for you. Congrats!

lucid iron
#

Whether that's a warning or a trace is up to you

uncut viper
#

thanks man

lucid iron
#

Urple

dusk terrace
uncut viper
#

incredible that when i finally get my so sought after ourple, i cant even see it

lucid iron
#

I do think it's visually definitely not working for the modder

dull bay
lucid iron
#

And easy enough to debug

#

The asset name being only known at runtime is why logging would be helpful for the debugging

#

Tell ppl that hey i tried looking for this asset it no there

#

Therefore i didn't proceed

dusk terrace
uncut viper
#

wouldnt they know then that the asset did or did not exist?

autumn tide
#

hellooo I wanna see if i did my more nightly event thing right, here it is! ```
{
//===================//
//MORE NIGHTLY EVENTS//
//===================//
//
"LogName": "{{ModId}}.Log.More_Nightly_Events",
"Action": "EditData",
"Target": "Mods/leclair.morenightlyevents/Events",
"Entries": {
"{{ModId}}.MoreNightlyEvents.Lunaloo_Event": {
"Id": "{{ModId}}.MoreNightlyEvents.Lunaloo_Event",
"Type": "Script",
"Conditions": [
"PLAYER_NPC_RELATIONSHIP current Krobus Roommate, PLAYER_HEARTS Current Krobus 12, SEASON_DAY fall 1, PLAYER_HAS_CONVERSATION_TOPIC current {{ModId}}.Topic.KrobusSeesLunaloos"
],
"IsExclusive": true,
"TargetMap": "Beach",
"OverrideWeather": "Sunny",
"TimeOfDay": "2600",
"Script": "enter the event script here"
}
}
},

if no one on here's familiar with it, do you guys know if Khole is okay with being @-ed?
lucid iron
dusk terrace
#

I'm probably overthinking it

gentle rose
#

is changing portraits via DDFC a new feature? I thought DDFC was for changing the layout of the dialogue box SDVpufferthinkblob

dusk terrace
#

they could just list the NPCs that have their textures patched in the DDFC patch

lucid iron
#

Nah ddfc always had that

dusk terrace
#

for better or worse

lucid iron
#

||it's what those big booba mods uses to get vn style portraits||

gentle rose
#

weird, never realised

lucid iron
#

But yeah theoretically someone could make i dunno, mistria style portraits with ddfc

#

And have them display at 3/4

dusk terrace
#

heck ye

uncut viper
lucid iron
autumn tide
dusk terrace
lucid iron
#

Which would mean "do this only of this other ddfc patch took effect"

uncut viper
#

if its not right bc of some syntax error or something, then several people here can probably help even without being familiar with MNE

autumn tide
#

god i'm so into modding i forgot you can actually play the game SDVpufferchickcry

lucid iron
#

It does mean u gotta graph theory a little bit

uncut viper
#

implementation though is shrugs

gentle rose
lucid iron
#

Another similar concept is having some sort of patch group

#

Apply only if all patches in this group is valid

dusk terrace
gentle rose
#

it definitely can if you're willing to do some funky things

lucid iron
dusk terrace
#

asdjkhf just realized I've been mixing things up... AssetExists wouldn't apply in my earlier examples because no new portrait texture is loaded, only altered

uncut viper
#

ill be honest i realized like three scrolls up ago that i think i just dont understand DDFC enough or how to use it/how it works to be able to offer further input on it. i like tokenizable strings tho. thats all i know

autumn tide
uncut viper
#

all i need to know, really

autumn tide
#

!log

ocean sailBOT
#

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

Please share your SMAPI log file. To do so:

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

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

dusk terrace
#

I like tokenized string too SDVpufferheart thanks for that

uncut viper
#

i expect 50% of the DP

lucid iron
#

Wow a 0.5 dolar discount

dusk terrace
#

scribbling with 25% already to aedenthron, that leaves 25%.....

uncut viper
#

oh, i didnt realize i would already be sharing with someone else. 60%, then

autumn tide
uncut viper
#

that looks about right for something that breaks overnight on loop

autumn tide
#

yeah

ocean sailBOT
#

Log Info: SMAPI 4.3.2 with SDV 1.6.15 build 24356 on macOS Unix 15.5.0, with 83 C# mods and 231 content packs.
Suggested fixes: One or more mods are out of date, consider updating them

uncut viper
#

are you Loading something instead of EditData'ing it?

autumn tide
#

hmm lemme see

uncut viper
#

because i see an i18n token in your log, which should not be possible

autumn tide
#

uhh edit data

uncut viper
#

also i dont know if you patch reloaded after the first json parse error at the top

autumn tide
#

nope

uncut viper
#

well you should fix that first and foremost

#

but yeah, there should be no way that the game even knows you're using a token unless something is being Loaded when it shouldnt be and bypassing token parsing

autumn tide
#

Yeah, i know what the problem is, i need to actually add the portraits lol

autumn tide
#

i understood roughly 70 percent of that lol, so somewhere in my code (or maybe someone else's???) I have a load when it should be editdata?

uncut viper
#

probably. the token in question is in some Condition field

#

Failed parsing condition 'IS_FESTIVAL_DAY Any 1, !IS_FESTIVAL_DAY, !IS_PASSIVE_FESTIVAL_TODAY, !SEASON_DAY {{i18n: i18n_Code.SpecialDaysList}}, [...]

autumn tide
#

i'll fix it!

uncut viper
#

also why are you so behind on BETAS updates when you're using BETAS features

autumn tide
#

that one has never interfered with other stuff tho

uncut viper
autumn tide
#

Oh, that condition is unused so far

uncut viper
#

its unused always as long as its broken SDVpufferthumbsup

#

regardless, every error that can be fixed should really be fixed when you're asking for help fixing errors

autumn tide
#

hm, any idea what the issue was that caused it to keep repeating the same error?

lucid iron
#

That's more of a quirk of night stuff exploding more violently

uncut viper
#

well you didnt fix the json parse error at the top that seems to hold your night event data

autumn tide
#

..i am just very lost rn-

uncut viper
#

or whatever "Events.json" holds

autumn tide
#

found it, it was an extra / in another event

#

eughhhh what have i done-

#

hm, should i post it to modded tech support later?

uncut viper
#

its for making a mod, so it goes here

#

unless the error happens even without your mods and its someone elses mod

autumn tide
dusk terrace
#

I've created a monster SDVpetcatsad

young pond
#

Hello!
My new NPC mod seems to break NPC Map locations and I can't seem to figure out what's going on. No NPCs show up on the map at all thinkies

It seemed to be working fine when I tested my world map edits, but something must have happened?

Here's my smapi log and my world map changes:

https://smapi.io/log/7fcf148b64454916a8771b7b9be1544d

ocean sailBOT
#

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

uncut viper
#

you need to use TargetField to drill down into the MapAreas level so you can add new entries without deleting the whole thing

young pond
uncut viper
#

Fields will replace only the fields you specify, yes, but that applies to the top level only. you're replacing the whole MapAreas field of Valley still

young pond
#

Yeah, I didn't think of that - thank you so much! :)

uncut viper
young pond
#

Thanks! SDVpufferheart

fierce vault
young pond
#

Yeah, thank you! :D
It has been a bit of a long-term project, lol

fierce vault
#

Can I ask how long it took? Mine's been taking forever!

young pond
#

I think I've been working on it on and off for about half a year thinkies

dusk terrace
#

have you applied for cheeto yet?

young pond
#

Oh, I haven't SDVpuffereyes

fierce vault
#

I think you need a higher level

#

first

dusk terrace
#

oh, right

young pond
#

Guess I'll do that when the time comes

fierce vault
young pond
#

Especially with all that dialogue to write, it's a lot all in one go

fierce vault
#

Writing mine has proven to be quite hard. Mix that in with coding, and actually making events, and finishing assets... it's a lot

young pond
#

Sure is! But I also think it's a fun and challenging project

fierce vault
#

I have been enjoying it!

young pond
#

As someone with zero talent for anything remotely related to coding, I have wanted to throw my laptop out of the window many times, but seeing my NPC slowly come to life has also brought immense joy

fierce vault
#

You also technically released two npcs around the same time didn't you??

young pond
#

Yeah, but Leela is veeeeery minimal

#

Only the basics for now

#

I wanted to get Aliyah done before going more in depth for her

fierce vault
#

Makes sense

young pond
#

Now I can focus on adding heart events and all that good stuff

#

Along with the dialogue, I think that's what took me the longest for Aliyah

fierce vault
#

Yeah, that should be fun. Especially since you've already done it once!

young pond
#

Yeah, I'm starting to memorize the commands, I definitely got faster by Aliyah's 14 heart event SDVpuffereyes

#

... I should also probably save the wedding day on my test file, I don't know how often I've watched that ceremony just to test some small stuff and forgot to save

opaque field
#

I can see my npc on the worldmap, and her events trigger but even after sleeping a day she doesn't show up T.T

#

I usually keep about 3-4 projects going at a time (I am currently overhauling a config for one and updating sprites for another)

urban patrol
#

(technically debug where takes a fuzzy match but better safe than sorry)

opaque field
#

I’ll give it a go 🙂

#

Bus stop 4,5

#

Hm. Interesting

#

Oh holy shit

#

Ok so I moved her positions and she’s there now

#

But cannot interact with her whatsoever

urban patrol
#

make sure you have all the necessary parts (dialogue, gift tastes, etc)

opaque field
#

I’ve got them but my content.json is probably a nightmare so I’ll check those and see.

#

Ty!

urban patrol
#

np! if you need a second set of eyes feel free to upload every relevant file to smapi.io and share in here

opaque field
#

If it doesn’t work between now and pie I’ll do that 😄

brave fable
#

in that case you should use SMAPI 2 (Send Me A Pie Too)

sleek igloo
#

(happy turkey genocide/alt history/family feud day!)

Coming back with my strawberry cow edit, I finally built the barn and couldn't find the alternate type, I changed the purchase price from -1 to 1 to see if the animal would load on its own and it did, but when I go back to -1 there's no option in the cow menu https://smapi.io/json/none/24d80f9ce6c1454d8d36c9f2b388ccca

#

probably a dumb oversight, but if anyone can see the issue please lmk it's killing my ocd brain

#

(I didn't add a chance because I was using livestock bazaar specifically, and its a personal edit)

brittle pasture
#

your animal id in the alt purchase field of the white cow is wrong

#

note the missing modid

sleek igloo
#

ahhh

#

like this? "AnimalIds": [ "{{ModId}}_Strawberry Cow"

#

thank you!

elfin kindle
#

I finally published my first mod SDVpufferparty I can't post it here cus it's not within guidelines (which is totally fair and once again, something I'd agree with) but I'm still very happy! From the first seeds of the mod idea happening 3 years ago to now actually publishing it after like 4-6 months of work feels really weird but in a good way

dusk terrace
#

I'm intrigued

elfin kindle
#

It's not one thats appropriate for everyone (I wouldn't recommend anyone under 16 playing it, so nothing crazy but not kid friendly) so i'll keep it very vague on here, i just wanted to celebrate a little since so many people on here helped me make it ^^

lucid iron
#

good job regardless wew

dusk terrace
#

after looking it up, it's (probably) definitely not as bad as it sounds, but yes congrats on the release

elfin kindle
#

Cus of the yandere rule, I don't want to make any mod have to ask themselves if it's appropriate and I hate talking around issues so thats why lololol I def don't think it's anything totally out there weird

drowsy pewter
#

great job on your first mod!

exotic token
#

there was a mod that had negative hearts for villagers

#

how was that possible?

latent mauve
#

That could maybe be done with trigger actions that add a very high negative value at the end of every day?

#

Well, the value. Displaying them would be different.

brittle pasture
#

are you referring to the WIP mod by barley

#

it's not out yet I believe

dreamy owl
#

Does anyone have any brush packs for procreate that are low size/low pixel SDVpufferwaaah

brittle pasture
#

anyway the answer is "through C# anything is possible"

exotic token
#

its an old outdated mod actually

brittle pasture
#

ah interesting, didnt know there was prior art

#

but yeah see my answer above

brittle pasture
uncut viper
#

(it does)

latent mauve
#

Yeah, I was more thinking of how you can add negative friendship points and drive it to 0.

#

So I likely just got a bit mixed up there. 🙂

dreamy owl
#

Ok. Looking for resources here. Who has used procreate for a high res portrait pack and still has the brushes they used?

exotic token
#

i wonder if negative heart events are possible with that mod

dusk terrace
#

another mod for ddfc to support 🧐

brittle pasture
#

idk about that mod specifically but barley's thing explicitly adds "nemesis" events

dreamy owl
#

POV me making an enemy of Harvey

dusky sail
#

is there a resource anywhere that shows which default dialogue lines go with the manner, social anxiety, and optimism values? i tried looking but i couldnt find anything that told me which were which

brittle pasture
#

i know "read the source code" is unhelpful advice but it's also the only one i have

#

though last I checked I recall it mattering less than I expect

dusky sail
#

that's true if im providing enough of my own dialogue i guess it doesnt matter

#

thank you though!

uncut viper
#

however much you think it matters it very likely matters even less, and thats accounting for how much you might think it matters after selph already told you it doesnt matter much

#

as far as i know the exact dialogues for each exact value in every situation where it comes up arent documented, probably because they dont really matter and it comes up so rarely in the game

ornate locust
#

I think it matters mainly for saying "Hi" when NPCs pass each other

#

that's the one identifiable thing I can remember

uncut viper
#

that, drinking mayonnaise, and commenting on items you sold to a shop are the ones i know

ornate locust
#

Oh yeah, commenting on items sold to shop. But you can also turn that off (I did, which is why I forgot it)

uncut viper
#

socially anxious characters react less to you drinking mayonnaise

dusky sail
#

they're just flavor text for people digging into the json i guess then, like the love interest field

uncut viper
#

well the love interest field literally does nothing

dusky sail
#

but its funny to look at

uncut viper
#

the social mannerisms do things

drowsy pewter
#

I have a full list of what we discovered last time i asked about this

#

do you want me to dm

ornate locust
#

Yeah you will notice it if you have your character set to go "hi" when they walk by people or talk about stuff they bought at the store

ornate locust
#

speaking of which, is there no way to customize those generic hellos? Just double checking

drowsy pewter
#

It's not a list its more like a collection of screenshots of discord messages that I intended to put on the wiki and then gave up

#

But I'll send it to you

stray hemlock
#

The love interest field is so interesting. Like, I really don't approve of Lewis keeping the relationship with Marnie a secret, but apparently he doesn't even love her.

finite ginkgo
brittle pasture
#

we can only guess if mr ape wanted to do a rival hearts thing

ornate locust
#

because I'd like to be able to make that random greeting a Howdy, but I never saw a way to do it, so I figured it's one of those things the game just does

uncut viper
#

you can change it, but not per-NPC

brittle ledge
ornate locust
#

yeah that's what I was afraid of

uncut viper
#

this is the logic for choosing which Hello to use

dusk terrace
#

I thought that was a 2 y/o npc until I remembered age is an enum

uncut viper
#

well 2 is Child so, close

#

0 => Adult
1 => Teen
2 => Child

drowsy pewter
uncut viper
#

for anxiety, its:
0 => Outgoing
1 => Shy
2 => Neutral

ornate locust
#

no regional dialog involved in greetings, I guess shakes fist

latent mauve
#

Does the game respect NPC.cs.<number> dialogue keys added to a character's dialogue JSON or no?

uncut viper
#

no, because thats not the whole asset key

latent mauve
#

I mean, I imagine in the screenshot case it won't because that looks like a direct path

uncut viper
#

its not loading NPC.cs.### its loading Strings\StringsFromCSFiles:NPC.cs.####

latent mauve
#

But speaking more generally for any of those variants, does it EVER work?

uncut viper
#

no

latent mauve
#

Okay, so every reference to NPC.cs.#### in the code includes the StringsFromCS portion?

uncut viper
#

yes, because the reason theyre called "NPC.cs" is because they were originally hardcoded

#

in the C# file called "NPC.cs"

latent mauve
#

Gotcha, just trying to be sure I understand

uncut viper
#

(.cs is the file extension for C# code)

#

the same will be true for anything with a .cs extension in its key in that StringsFromCSFiles asset, thats just where it was originally hardcoded

latent mauve
#

There are some keys that will be checked first in the Character Dialogue file, just was unclear where the line was

uncut viper
#

before being unhardcoded so it could be translated

#

those will have dedicated keys documented for the dialogue line, but they wont be in the form NPC.cs.###

latent mauve
#

But that's mostly the location stuff I am thinking of probably

#

Ah, I see. Thanks for explaining!

uncut viper
#

theres actually less from GameLocation.cs than I expected tbh

#

only 7

#

i wonder if the DiaryEvent.cs keys were removed from the 1.6.16 alpha since the DiaryEvent class was removed SDVpufferthinkblob

latent mauve
#

In a related query, if one wanted to change the npc.cs.#### lines across the board when a player is say, in the Desert, would an EditData for those lines with a When condition checking for player location allow that?

uncut viper
#

yep

#

along with the LocationChange update rate ofc

#

they can be edited like any other asset

latent mauve
#

(I may want to rewire all my Gerudo greetings)

#

Excellent

uncut viper
#

you could also probably nerdsnipe a C#er into making the most niche framework of all, the Randomly Appearing Greetings Framework

#

sole purpose is to allow per-NPC customizability of those random greetings that a player has like a 10% chance of saying IF they happen to walk by an NPC and IF that NPC is a friend or family and IF they are not too socially anxious to say hello

#

IF the farmer is nearby

#

load bearing framework

ornate locust
#

I'd use it instantly, let my boy Howdy

latent mauve
#

Framework to make an NPC say "Excuuuuuse me, princess!" when another specific NPC walks by.SDVkrobusgiggle

sleek igloo
ocean sailBOT
#

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

#

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

sleek igloo
#

the second one is valid, first one is just a copy paste of the error because I wasn't able to find it anywhere

latent mauve
#

not the full log but also AVE error

ornate locust
#

You could even do a test mod with Willy going "Ahoy" instead of whatever he says

brittle pasture
#

ah the ol AVE
try randomly disabling and reenabling mods

uncut viper
#

(tbh, itd also just be the most ridiculously easy harmony patch in a C# portion, assuming you already have a C# portion)

sleek igloo
#

whats ave

uncut viper
#

access violation exception

brittle pasture
#

it's just a thing SMAPI does sometimes, no known cure

uncut viper
#

no real rhyme or reason for them

latent mauve
#

!ave

#

Oh wait, is it harmonybug? I forget

#

But this: Fatal error. System.AccessViolationException

uncut viper
#

it can happen with and/or plausibly because of Harmony but not because of an error with Harmony itself really as far as anyone really knows

sleek igloo
#

the weirdest thing is i tried to run smapi from the exe instead of stardrop or steam and it loaded

uncut viper
#

sometimes the computer just says "no you cant do that" even though yes i can thank you very much

sleek igloo
#

should i restart the pc lol

uncut viper
#

selph's suggestion of randomly toggling mods wasnt a joke

latent mauve
#

Yep, something about your C# mods loading via Harmony went wonky, restarting client or changing the number of C# mods can make it try again

#

It is actually random

#

You did nothing wrong, Harmony had a derpy moment.

sleek igloo
#

I restarted and it worked fjfhf

#

Thanks, I was going nuts

ornate locust
#

"have you tried turning it off and on again" is sometimes the actual right question to ask

latent mauve
#

We apparently do not have a command related to Harmony/AVE errors, even though my brain remembers one existing

#

I guess I just saw a copy pasta about it too many times in modded tech support and my brain decided it was a command

obtuse wigeon
#

I get AVE often for some reason after my computer upgrade, restarting the computer is always the surefire way I fix it, it's happened atleast 20 times so far and 20 times a comp restart fixes it

inner harbor
#

What part of this is the "FarmType"? "FlashShifter.FrontierFarm/FrontierFarm": { "ID": "FrontierFarm", "TooltipStringPath": "Strings/UI:FrontierFarm", "MapName": "Farm_FrontierFarm", "IconTexture": "Mods/FlashShifter.FrontierFarm/Icon", "WorldMapTexture": "Mods/FlashShifter.FrontierFarm/WorldMap" }

#

FrontierFarm? I want to use the Content Patcher "When": {"FarmType":"name"}

uncut viper
#

the whole thing is the farm type

#

so the key

#

and ID

lucid iron
#

hm if they dont match does id win

uncut viper
#

i dont remember which one wins

#

id assume ID

inner harbor
#

welp, I'll try that and we can hope!

lucid iron
#

A custom farm type, using the ID value from the mod's farm data.

#

yea does sound like ID wins

brittle pasture
#

when in doubt patch export i suppose

#

oh wait nvm

inner harbor
#
            "Name": "SpousePatioExit",
            "Value": "128 16",
            "When": {
                "FarmType": "FrontierFarm"
            }
        },```
uncut viper
#

i mean that still doesnt really say for sure one way or the other

lucid iron
#

u can patch parse "{{FarmType}}"

inner harbor
#

(I"m trying to add compatibility without actually installing the farm mod and marrying the NPC in question, lol)

uncut viper
#

id assume ID just bc its a List and not a Dictionary asset but i think id assume the opposite if it was a Dictionary asset instead

lucid iron
#

@ivory plume hello pathos how are you, i made a new searching menu for chests anywhere:
i will open the PR for reals in a few days

inner harbor
#

Welp, the person that lodged the bug report can tell me if it works or not, I guess!

#

(they can also enter their own coordinates)

uncut viper
#

itd be an easy enough thing to test

inner harbor
#

I suppose I can literally just install the farm mod, choose it and do a patch summary

uncut viper
#

the patch parse thing chu said is probably quicker

inner harbor
#

HAha yeah definitely. I've never used Patch parser before

uncut viper
#

it'll evaluate the token in your console and just tell you what the token is

lucid iron
#

you have to have frontierfarm selected

uncut viper
#

if you did like patch parse "{{ModId}}_MyFarm" itd show Lemurkat.Whatever_MyFarm

lucid iron
#

to know what it'll resolve to

uncut viper
#

you also dont need the quotes so long as you dont put spaces in the token

#

i only mention that bc i get annoyed having to escape quotes in my console in rider

lucid iron
inner harbor
#

so im typing "patch parse" into the smapi console?

#

Frontier Farm is so BIG!

#

(I havent played SVE since 1.6, so I've not seen it)

lucid iron
#

yea it is a command

#

but man i wonder if we could just

#

add a token for spouse patio location

#

it would be extremely helpful...

inner harbor
#

Its cos I add a warp from it, and I need to add an exit warp

#

currently in Frontier Farm you can enter fine, but you exit in front of the farm cave

sleek igloo
inner harbor
#

Ugh I need to test Flower Dance with SVE installed now.

sleek igloo
#

Not in the mood to track down the culprit in detail rn

lucid mulch
obtuse wigeon
lucid iron
sleek igloo
#

The recent stuff I added was mostly event/character things, a couple had c# components

inner harbor
#

I need someone to convince me to do the Expanded Flower Dance compat, or I will play Mistria instead.

lucid iron
#

play mistria instead sleep

sleek igloo
#

Do thing

lucid iron
#

slacc is always correct

sleek igloo
#

Or dont

inner harbor
#

I'm at a somewhat grindy stage in Mistria atm... Also my farm is lagging badly due to poor optimization or weak laptop. It's a pain.

dusk terrace
#

my gf has been selling mistria to her siblings over call for the past 30 minutes and I tab here to see more mistria SDVpufferfear

inner harbor
#

(I actually checked to see if there was a mod to improve this, lol. There wasn't. Mistria doesn't have a lot of mods yet, being in EA and all)

#

(Hayden my beloved)

brittle pasture
#

also isnt it written in a real game engine in C++, not sure how much code crimes are allowed

#

it's gamemaker

inner harbor
#

I have no idea, I'm no code expert, I just wanted to see if anyone had fixed my issue! It does look like someone made a Mod loader though.

#

(hopefully they'll fix it in their next update)

dusk terrace
#

gamemaker engine makes it terribly unoptimized afaik

#

it gets really laggy at times and sometimes full crash... although that could just be because it's still early access

inner harbor
#

I haven't had it crash yet, just lag a bit on the actual farm map - which I presume is due to my buildings and grass and crops and livestock

#

honestly, temptation to merge Stardew and Mistria in a mod is rising.

dusk terrace
#

mistria-style portraits when SDVpuffersquee

inner harbor
#

Anyhow, I've talked myself into Flwoer Dance compat.

#

(I'm only testing with SVE though)

tight rivet
lucid iron
#

ai yggy

tight rivet
#

ah..

#

i kinda expect that sort of thing. I do find it weird that posts aer disabled ther though

lucid iron
#

this seems like someone put grep in winforms lol

tiny zealot
#

"rewrites" smapi error messages to add em dashes, lol

tight rivet
#

it feels vaguely like an offline smapi.io parser

lucid iron
#

oh cus this person spammed a bunch of chinese ai translations

#

and riled up a bunch of other chinese translators

uncut viper
#

they have a couple other weird ai-seeming mods as well

lucid iron
#

minor drama i was witness to Dokkan

uncut viper
#

like one for fixing json, such as removing trailing commas that break parsing... even though they dont break parsing

dusk terrace
#

is the crypto miner a built-in feature?

tight rivet
#

dunno, I'd have to download it and find out

dusk terrace
#

-> 138 mods
-> 9,5k unique downloads
that's how you know they're legit lol

tight rivet
#

I think I had one of his mods at one point..

brittle pasture
#

they translated cloths and colors SDVpuffersweats

tight rivet
#

checks load order

tiny zealot
#

this is a cheap shot at the ai-gen mod art but i can't stop laughing at CLEAB

uncut viper
#

CLEAB

lucid iron
#

CLEABED

tight rivet
#

ah, no

uncut viper
#

it doesnt make sense even if you fix the typo

tight rivet
#

Joja voice "You aren't clean.. until you're cleab!"

uncut viper
#

Recommendations clean? what does that mean?

tiny zealot
#

clean and clear, and then get cleab

brittle pasture
#

surprised the bigger word isn't messed up

dusk terrace
#

why does their raw smapi log look like that

uncut viper
#

"Highlights risky & “heavy” mods
• Save-serializer changers, direct game patchers, console access"

console access...

tiny zealot
#

just the standard things that the smapi log already warns you about

uncut viper
#

what console access warning

#

console access came free with my fucking xbox ModEntry

tiny zealot
#

there's one for direct console access. let me pull it up, i'm sure i've trained myself to ignore it

uncut viper
#

ive used direct console access before but not gotten a warning i thought

tiny zealot
#
[21:31:21 TRACE SMAPI]    --------------------------------------------------
[21:31:21 TRACE SMAPI]       These mods access the SMAPI console window directly. This is more fragile, and their output may not
[21:31:21 TRACE SMAPI]       be logged by SMAPI.

[21:31:21 TRACE SMAPI]       - Generic Mod Config Menu```
tight rivet
#

we all know console access is super risky

tiny zealot
#

i don't know what triggers it

uncut viper
#

i have gmcm and dont get that warning, is that snippet very old

tiny zealot
#

no, i just booted my game with latest gmcm to get it

uncut viper
#

is it a dev smapi config toggle?

tiny zealot
#

could be

uncut viper
#

ParanoidWarnings maybe?

#

shrugs

tiny zealot
#

i don't have that one on (or verbose), but i do have developer mode set

dusk terrace
#

what's the point of using the original mod's picture but then throw in some AI images that look nothing like the game??

urban patrol
#

i've always wanted to drive a pig with a cancerous growth on its head in the shape of a duck

dusky sail
#

I already didn't like this person because they uploaded a translation of one of my mods without permission but the more they post the more justified i feel about being upset in a way

dusk terrace
#

there's "open source code" in the optional files for the smapi doctor thing
but the zip includes really weird files that have nothing to do with code, including some with local paths, and even a zip inside the zip

#

I'm not much of a python developer, though

obtuse wigeon
#

seems they used a python compiler (which often give false anti virus alerts), there is honestly no need to compile this kinda python, it's plenty fast enough as is, my best guess is obfuscation? not entirely sure why theres a html file in there though? what an odd little ecosystem of chaos theyve made

inner harbor
#

how do I stop music playing in the rain?

uncut viper
#

rain should already override music in most situations because rain uses the music channel/priority

inner harbor
#

huh weird, cos it doesn't in one of my maps

#

maybe I coded it wrong

#

(I cannot even find where I coded the custom music, sigh) Found it and fixed it

ornate locust
#

on a translation even

glossy cargo
#

Did it work?

#

It did! I'm orange now! dance_monke

#

After about 3 years of being a mod maker, I'm finally allowed to say it publicly

obtuse wigeon
#

Congrats on being coated in a thin layer of cheeto dust!

glossy cargo
#

I'd gladly post in #mod-showcase but at this point I just don't feel the hype anymore lmao KEKMask

obtuse wigeon
#

What were you going to showcase? the archipelago mod?

glossy cargo
#

Yeah, I tried to showcase it here on initial release in early 2023

#

I was stopped by the "need Farmer role" system, and it took me about 2.5 years to finally earn it

#

At this point I have my big community and all, I don't really need the marketing anymore kek

obtuse wigeon
#

A big creator just posted a video 12 hours ago with a 7 person randomiser using archipelago so I would say it's the perfect time as some people here may watch the video and see the showcase

glossy cargo
#

who? did it include stardew?

obtuse wigeon
#

it didn't include stardew but people would be able to see it's for the same system if they check it out, creator was Cjya on youtube, along with 6 other people

glossy cargo
#

I think I'll wait until AP core decides to finally release our version 7. That will probably bring about a bunch of new hype for both myself and existing players, so as good a time as any to market it

obtuse wigeon
#

sounds good!

inner harbor
#

why won't Keanu use his Flwoer Dance portrait?

#

the sprites work fine...

#

I tried exporting it and that is working fine... how can I figure out why he's broken?

urban patrol
#

you can use debug gq to test the Conditions in the Appearances section

inner harbor
#

Oh FFS I forgot to give him Flower Dance dialogue. I forgot that was a thing.

fierce vault
#

Hi. I was wondering if there is an easy way to see how many times a vanilla portrait is used in the game’s dialogue. I don’t have a big need to get this done, but I am curious.

tiny zealot
#

another job for grep or your favorite find-in-files implementation

fierce vault
#

Hmm?

tiny zealot
#

(point your search tool at your content folder, search for the text, and count the results (frequently the tool will count them for you))

fierce vault
#

Oh, I've never heard of that one

#

wait

#

It's not something that comes with the OS, right 😅

#

I think it's not

tiny zealot
#

macos and linux both ship grep. windows has a search function (or used to) but last i checked it was glacially slow and isn't suitable for this specific use

obtuse wigeon
#

It can do, but programs also are able to provide it or similar, vscodes find in files (hover over workspace and press ctrl + F I think) also works

uncut viper
#

i just open notepad++ and point its search at a folder

fierce vault
#

ok, thanks. I think I might have an easier time just testing the dialogue I'm curious about in game to see which portraits are used. I keep getting distracted from the important things my update needs to be finished.

inland rain
#

I know this should never return getStandingPosition, but doesn't getStandingPosition return a pixel value, not a tile?

        public Vector2 GetGrabTile()
        {
            Microsoft.Xna.Framework.Rectangle boundingBox = this.GetBoundingBox();
            switch (this.FacingDirection)
            {
            case 0:
                return new Vector2((float)((boundingBox.X + boundingBox.Width / 2) / 64), (float)((boundingBox.Y - 5) / 64));
            case 1:
                return new Vector2((float)((boundingBox.X + boundingBox.Width + 5) / 64), (float)((boundingBox.Y + boundingBox.Height / 2) / 64));
            case 2:
                return new Vector2((float)((boundingBox.X + boundingBox.Width / 2) / 64), (float)((boundingBox.Y + boundingBox.Height + 5) / 64));
            case 3:
                return new Vector2((float)((boundingBox.X - 5) / 64), (float)((boundingBox.Y + boundingBox.Height / 2) / 64));
            default:
                return this.getStandingPosition();
            }
        }
rocky anchor
#

Hello, helpful folks! Is it still possible to add items to a shop inventory if they're added through Fashion Sense? I was following the example here: https://github.com/Floogen/FashionSense/wiki/Item-Properties but my hat keeps defaulting to a spriteless Cowboy Hat

GitHub

Stardew Valley framework which allows for bigger accessories, hairstyles and other appearances. Includes animation support and more. - Floogen/FashionSense

obtuse wigeon
#

Fashion Sense doesn't actually add clothing items, only the mirror, if you want the clothes in item form, you'll have to use Content Patcher

#

or another framework

brittle pasture
#

FS actually does have some functionality to make its items "physical"

#

I have never used it, but can you post your code

obtuse wigeon
#

Oh does it? I must've missed that, cool!

brittle pasture
#

pathos posted an example mod using that functionality some time ago

#

damned if I can find it though

rocky anchor
#

Omg Pathos shared that for me, while I was still trying to fix my mod 🫣 Hahaha

#

Thank you!

obtuse wigeon
#

How to I see what mods patch a specific area again? I tried patch summary but that says it filters with content pack ID and not asset name

#

found it, needed the asset arg

next helm
#

Hiii! I have a question - I'm making 2 NPCs BUT one of those 2 is tied to another NPC's heart event
Basically when you trigger NPC A 6 heart event, then NPC B will arrive in the town and become a regular townsfolk there. I've managed to spawn B in A's cutscene and make him talk. However, once the event is over, B still isn't in the town. His name and portrait is listed under the relationship tab, though.

I'm basically just setting up his definition :
Spawnifmissing to false
And lock his schedule to
HasSeenEvent: (event code)

At a cursory glance can anyone let me know what I'm doing wrong? Otherwise I can send more detail. Thank you 😭😭

uncut viper
#

you shouldnt change his SpawnIfMissing, leave it unset/true. dont lock his schedule behind anything either. Set his UnlockConditions in his character data instead. it takes a GSQ, so you can use a GSQ to check if the host farmer has seen the event in question

next helm
#

Ohhhh! Okay okat I will give that a go. Bless 🙌🙌🙌

uncut viper
#

the "host farmer" bit is important too, you can get very weird and buggy messes if two different players have different unlock states

lucid iron
#

You also gotta sleep

next helm
#

Ohh the host thing. Didn't consider that.

lucid iron
#

Npc spawning is overnight or save load thing

next helm
#

You gotta sleep even after I warp the npc in?

#

Ohh I see OK ok noted

rocky anchor
brittle pasture
#

can you also post the FS code

rocky anchor
#

The hat.json?

brittle pasture
#

also oh yeah, if they're hats/pants/etc. they need the qualifier (ie. (H))

rocky anchor
#

Oh yeah, in the ItemId?

brittle pasture
#

yes

#

right now your item ID is unqualified so the game tries to find an object ((O)) with that ID instead of a hat or pants or etc.

gray bear
#

does the top Id need to match the item id?

brittle pasture
#

that's the entry ID which doesn't really matter (though you should also set it)

rocky anchor
#

I will!

#

Okay, we're back to Cowboy Hat haha

brittle pasture
#

time to check your FS code then

frank pewter
#

guys i only played vanilla do u recommend stardev expanded

rocky anchor
#

conditions.json:

  "HoodDown":[{"Name":"IsOutdoors","Value":false},{"GroupName":"RainOrSnow","Value":true}],
  "HoodUp":[{"Name":"IsOutdoors","Value":true},{"GroupName":"RainOrSnow","Value":true}],
  "RainOrSnow":[{"Name":"IsRaining","Value":true,"Independent":true},{"Name":"IsSnowing","Value":true,"Independent":true}]
}```
#

hat.json:

  "Id": "RainHood",
  "Name": "Rain Hood",
  "Format": "7.0.1",
  "FrontHat": {
    "HideHair": false,
    "StartingPosition": {"X":0,"Y":0},
    "HeadPosition": {"X":0,"Y":-2},
    "HatSize": {"Width":20,"Length":20},
    "AllowRecolor": false,
    "UniformAnimation": [
      {"Frame":0,"Duration":100,"Conditions":[{"GroupName":"HoodUp","Value":true}]},
      {"Frame":1,"Duration":100,"Conditions":[{"GroupName":"HoodDown","Value":true}]}
    ]
  },
  "BackHat": {
    "HideHair": false,
    "StartingPosition": {"X":0,"Y":40},
    "HeadPosition": {"X":0,"Y":-2},
    "HatSize": {"Width":20,"Length":20},
    "AllowRecolor": false,
    "UniformAnimation": [
      {"Frame":4,"Duration":100,"Conditions":[{"GroupName":"HoodUp","Value":true}]},
      {"Frame":5,"Duration":100,"Conditions":[{"GroupName":"HoodDown","Value":true}]}
    ]
  },
  "LeftHat": {
    "HideHair": false,
    "Flipped": true,
    "StartingPosition": {"X":0,"Y":40},
    "HeadPosition": {"X":0,"Y":-2},
    "HatSize": {"Width":20,"Length":20},
    "AllowRecolor": false,
    "UniformAnimation": [
      {"Frame":2,"Duration":100,"Conditions":[{"GroupName":"HoodUp","Value":true}]},
      {"Frame":3,"Duration":100,"Conditions":[{"GroupName":"HoodDown","Value":true}]}
    ]
  },
  "RightHat": {
    "HideHair": false,
    "StartingPosition": {"X":0,"Y":60},
    "HeadPosition": {"X":0,"Y":-2},
    "HatSize": {"Width":20,"Length":20},
    "AllowRecolor": false,
    "UniformAnimation": [
      {"Frame":2,"Duration":100,"Conditions":[{"GroupName":"HoodUp","Value":true}]},
      {"Frame":3,"Duration":100,"Conditions":[{"GroupName":"HoodDown","Value":true}]}
    ]
  }
}```
#

🥺
👉 👈

vernal crest
inland rain
#

Building Shift, lets you shift buildings in any direction (for e.g. half tile placement)

vernal crest
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.

brittle pasture
#

try (H)RainHood

#

though I recommend making it more unique of course

vernal crest
#

I am finding these docs extremely confusing, but I think there needs to be more data than just a hat.json and a CP shop patch for this to work 🤔 Like the Item Properties need to actually be added to the FS side, I think?

brittle pasture
#

yeah it's fs side data
the fields seem to match

#

(also I'm sleeping in 5 min so i wont reply)

vernal crest
#

The docs say it has to be in an "Item" field though which theirs isn't?

heavy pewter
obtuse wigeon
#

that is truly phenomenal, nice one!

rocky anchor
vernal crest
#

Yeah there's a bunch of information there but not a lot of links between it all to provide context for how and when to use it lol

heavy pewter
#

Registered trigger type for Data/Triggers: DopeFlamingo_UpdateTicked.

Kinda proud ngl

vernal crest
rocky anchor
#

The hood appears in the Hand Mirror, so it's in there somewhere

#

Just not in the shop

#

So I think that's the missing link

vernal crest
rocky anchor
#

Oh, sorry for not acknowledging earlier! I'll try that - mind sending an example of what you mean?

vernal crest
#

(Please bear in mind I have never made an FS mod. Never even edited one. I'm just going off what I can interpret from the docs.)

rocky anchor
rocky anchor
vernal crest
#

Hmm. Is IMS.FS.RainGear your FS unique ID?

rocky anchor
#

It is!

vernal crest
#

Drat

rocky anchor
#

You're telling me

#

Hahaha

vernal crest
rocky anchor
#

I thiiiiink it was about items in FS being "real" items now, like findable in Item Spawner? It was back in Jan so it's a bit hazy now

#

From Pathos, back then: "The whole idea of the new Fashion Sense feature is that they're still regular Content Patcher items, but they have metadata which lets Fashion Sense hook into them."

#

And I'm pretty sure that's where I lost the trail

vernal crest
#

If I am understanding correctly, where you are going wrong is that you don't have the CP item.

rocky anchor
#

That's sounding right, now that I've found another github manual 😂

vernal crest
#

Yeah

#

I've been going back and forth between that page and the item properties

#

I think they are supposed to be connected but Peaceful doesn't actually make that connection anywhere in the docs

rocky anchor
#

You're actually my new best friend

vernal crest
#

If you copy what Pathos made I think that will help (excluding all the dynamic and local token stuff, that is just unnecessarily complicated for what you need).

rocky anchor
#

I really only need FS for the indoors/outdoors trigger too! Do you think Pathos is sick of people asking for that condition yet?

vernal crest
#

(By the way, may I recommend that you add the {{ModId}} token more consistently to your mod. You have some things unique but then others are not.)

rocky anchor
#

I only just managed to get it working with the boots! 😅

#

If I get the mod working tomorrow, I'll replace everything with dynamic tokens

#

Promise

vernal crest
#

No need for dynamic tokens!

rocky anchor
#

Oh... well, the double-curly-brackets-names

#

Y'know

vernal crest
#

Haha they are all tokens but ModId is a built-in Content Patcher token, while Dynamic Tokens are ones that modmakers create themselves inside their own mod.

rocky anchor
#

Of course, that makes sense! Thank you!

vernal crest
# rocky anchor Of course, that makes sense! Thank you!

I have annotated your json to point out where to add {{ModId}}_ in front. I've also pointed out places where you should remove any spaces from the ID, and one spot where you can remove the update field because it's negatively affecting performance for no benefit.

rocky anchor
#

Quick question: In the Seasonal Hats mod, the TextureName dynamic token value is: "Mods/{{ModId}}/Seasonal_Hats" but I can't see the underscore asset 'Seasonal_Hats' anywhere? Is it automatically parsed?

vernal crest
#

Let me just open it up

#

I'm not quite sure what you're asking, sorry. (I also really don't know why Pathos bothered with that dynamic token when he only used it twice.)

#

He's used that dynamic token only twice, in these two patches. The second screenshot is what those patches would look like if he'd just put the value directly into them instead of using the dynamic token.

(I don't think that's answering your question, but I'm just explaining the token in the meantime lol)