#making-mods-general

1 messages ยท Page 516 of 1

brittle pasture
#

your first block is wrong; it'd just add a new tree called CustomFields into Data/WildTrees

#

to answer your question, CustomFields is a dictionary of string to string that holds custom data that can be used by mods

nimble karma
#

Huh, well I'm glad I'm not imagining things. I knew something was weird about that

#

For the record, this isn't "my" code. It's an example code that I plopped into a wild tree mod I'm looking at just to see if the tree would naturally spawn with it

#

So I haven't cleaned it up or played with it or anything

#
"Priority": "Early",
"Action": "EditData",
"Target": "Data/WildTrees",
"Fields":
    {
    "9": {"CustomFields": {}}
    }
},
{
"Priority": "Default +10",
"Action": "EditData",
"Target": "Data/WildTrees",
"TargetField": ["9", "CustomFields"],
"Entries":
    {
    "MoorTarPetal.WildTreeFramework.WildSpawnIds": "SpawnId_Forest", //This allows the palm tree to spawn in the forest
    "MoorTarPetal.WildTreeFramework.SpawnChance": "1.0" //There is a 100% chance of this tree spawning when picked.
    }
},```
#

So, this is what the example version looked like. The reason why the version I showed was so odd was because I was experimenting with it to see how to get a custom tree to spawn

brittle pasture
#

the code you made is missing the outer block on the first block
also it's unnecessary if you already defined your custom tree somewhere else

nimble karma
#

So what you're saying is that the first block is unnecessary if the mod I'm experimenting with already defined that tree?

brittle pasture
#

it's unnecessary in general because CP can initialize CustomFields into an empty dict if it is null

dusk mulch
#

the horrors of directory climbing tilesets are coming back to me

nimble karma
#

Alright, got that

#

So I guess I'm still wondering why there's just an empty set of brackets after custom fields in the first block. What did they mean to put between those

brittle pasture
#

they probably thought it was necessary to initialize CustomFields

#

since it's null by default

#

as said, CP already does that as part of the second block

nimble karma
#

So what you're saying is cut out the middle man and just keep the second block lol

vernal crest
dusk mulch
#

is there a way to transfer the tiles used on one tileset onto another? i've already made the map but now i need to delete the tileset i was using so the fixed one can take over

vernal crest
#

By "fixed" do you mean "without directory climbing"?

vernal crest
# dusk mulch yeah

Instead of adding a second copy of the same tilesheet, just open your map in a text editor and fix the image sources to remove the directory climbing

dusk mulch
#

oh i didnt think of that lol, ty!

#

it finally works SDVpufferchickpaint

inland rain
#

I'm looking at adding a Games menu to the Title Menu

late pewter
#

More minigames!

dusk mulch
#

how can i add light?

#

do i use the paths tileset?

vernal crest
#

Yes, or map properties if you want different types

dusk mulch
#

alright, ty! i wasnt sure how it worked in caves

vernal crest
#

AmbientLight map property if you want to change the overall light levels

tender agate
#

alternatively, vanilla sometimes likes to place torches down I think

royal stump
#

if you're using FTM in there anyway, it can spawn placed torches in the forage lists

dusk mulch
#

turns out i dont need spacecore or FTM since those wooden plank tiles on the floor are hardcoded to spawn barrels on

#

only took me an entire day of trial and error but i finally got 1/23 mine floors done

dusk mulch
#

Can I do a mapedit patch into an area outside the map?

vernal crest
#

Maybe. It might extend the map. Or it might break. Very easy to check though.

dusk mulch
#

I guess there is only one way to know if it extends or breaks.

proven spindle
#

Do things like conversation topics and acceptgift dialogue work for an npc while you're married to them? Can I just editdata them into an npc's marriage dialogue entry the same way I would their regular dialogue entry, or do different rules apply?

Edit: I've tested and confirmed both the acceptgift and conversationtopic dialogue options work when married to the npc. They're only loaded to the npc's regular dialogue data in my case (for example "Characters/Dialogue/Penny") so it looks like you don't need to load them to the marriage dialogue. Just updating this post in case anyone else goes looking for the same answers I did :)

dusk mulch
vernal crest
ornate locust
#

never left or up

dusk mulch
#

That is a problem since I am replacing all these fake hallways with actual rooms, this is in the top left.

ornate locust
#

Make it a door you can use to go there or something

vernal crest
#

Yup, even if you were doing a Load you still couldn't extend an existing map up or left unless you wanted to break absolutely everything.

ornate locust
#

Left/up extensions is a no in map changing in general, messes up the coordinates of things

dusk mulch
#

That could work, would I need a separate location or just the map?

vernal crest
#

You could make it an intra-map warp so you wouldn't need a new location.

dusk mulch
#

I'll look into that, ty!

#

I can't find anything on the wiki about an "intra-map warp", Is it using the "Warp" map property?

uncut viper
#

i mean mineshaft maps are probably the ones where you can most get away with extending up and to the left

dusk mulch
#

I tried to and it didn't let me.

uncut viper
#

you would have to Load a new map completely, not a map patch

#

but Loading a mineshaft map where you just took the existing mineshaft map and moved everything down and to the right, and then filled in the now empty top left space, would work

dusk mulch
#

ohhhh

uncut viper
#

so long as you account for some of the hardcoded coordinates. its not free of hardcoded assumptions, but its not nearly as breaking as it would be to do that to, say, Town

#

e.g. it seems you will always enter at x6, y6

#

or well, something puts you at x6 y6

#

from the code im reading

#

there might be other things that adjust your position on a per map basis i guess?

#

would be simple to test for though

dusk mulch
#

ill just do a warp i think since that sounds a bit much for my skill level ๐Ÿ˜…

uncut viper
#

oh actually the ladder position just goes based on the tile you painted on the map, the 6, 6 is just a fallback ig

#

ezpz then

dusk mulch
#

So you spawn in on the ladder tile position no matter what? (as long as the tile has been put down on the map)

uncut viper
#

or the elevator tile, if you took the elevator

dusk mulch
#

This is floor 12/layout 12 which I dont think uses the elevator

uncut viper
#

it can if a mod allows the elevator there

#

but i wouldnt worr yabout that

dusk mulch
#

So would I just resize the map, move it, put in my new room thing and load it?

uncut viper
#

it would work

#

to explain a bit, the reason you never want to extend left and up in general is because for most maps, that will break things pretty horribly

#

if you moved the entire Town to the bottom right for instance and then filled in the now empty top left space, then for example that means the Daily Quest board is now like, 10 tiles away from its original position maybe

dusk mulch
#

npc pathing, warps, events... the more i think about it the more i realize how catastrophic it would be

uncut viper
#

but the game is still hardcoded to put the "!" at the old coordinates

#

and every mod that patches Town with their own map patches are going to be using old coordinates

#

and if a player placed a chest down in the map? its placed at the old coordinates

#

so now everything is out of place

#

schedules too, yup, and events

#

Mineshaft levels though dont have to worry about schedules or events or chests or map patches generally

#

there are some that you would need to be more careful about, like the ones with the chests and the ones with water/lava to fish from

#

but i dont see any reason why floor 12 would be an issue

#

unless someone else is patching floor 12

dusk mulch
#

I looked through every mod with "Mine" in its title and they are all mostly just ore changes

uncut viper
#

which is unlikely

dusk mulch
#

im doing floors 8, 12, 17, 18, 19, 26, 28, 34, 40, 43, 44, 45 ,46, 47, 48, 50, 51, 54, 56, 57, 58, 59, 60, 120

uncut viper
#

i wouldnt do it for 120

dusk mulch
#

no no im not moving the map

#

i meant im editing the map for all those floors

#

ill only move it if needed

uncut viper
#

any of them can be edited, just dont extend up and left for floor 120

dusk mulch
#

120 im planning to put a ladder that leads to a dwarven village of sorts

uncut viper
#

obv ofc test every floor that you do extend up and left for

formal crown
dusk mulch
woeful lintel
#

I'm using the StorageFurniture to make custom storage with FF, but someone just reported a bug when storing fishing rods and slingshots: taking them out of the storage clears their inventory. I found that this is caused by neither Tool nor FishingRod nor Slingshot implementing specific logic to carry over slot content in GetOneCopyFrom.

Should I ask for this to be fixed in the next game update?

dusk mulch
#

Now how will I do this one? The area is too tight to put walls to go to the right.

#

Unless I just remove that and open up another area.

leaden cave
leaden cave
#

Yes thank a lot, I really appreciate it SDVpufferheart

#

Also I wanted to add a dialog line in my mod (it is my first mod for practice)
thought the line does not seem to be working could I send my code here in order to get help?

#

"Action": "EditData",
"Target": "Characters/Dialogue/Lewis",

    "Entries": {
        "spring_4": "Hello @! I see you made a mod successfully!$h",

        "summer_Sat": null,

        "fall_Fri": "Modding is a crazy rabbit hole, isn't it?",
    }

This is the code and the spring_4 line doesn't work

#

(I am following a tutorial from the wiki)

vernal crest
leaden cave
#

Yes

vernal crest
#

Does the fall_Fri line work?

leaden cave
#

Yes it does

vernal crest
#

Are you testing this with any other mods installed?

leaden cave
#

Though based on the tutorial we are suppose to be editing the fall line and adding the spring line because it doens't exist

#

I am using content patcher and CJB hacks (sorry I am not sure about the full name

#

A CJB cheat menu that

vernal crest
#

CJB Cheats, yeah

#

That's fine

#

Let's try this: in your SMAPI console, write patch summary full <mod id>, replacing <mod id> with your mod's unique ID from the manifest

#

It will spit out a bunch of text, including info about what patches in your mod are applied. Yours should have an X in all three columns.

#

You're not talking to him the first time per save on spring 4, are you?

leaden cave
#

Actually I kind of am I just set the day to be spring 4 though the console (though the file is new yes)

#

Are these the columns?

vernal crest
#

Yes, that's showing your patch is applied (which we pretty much knew anyway, given that the fall_Fri dialogue you were seeing was correct - but it's good to confirm).

#

If the first time you're talking to him is on spring 4, you're going to see his introduction line instead. Try setting the day to spring 3, then typing debug sleep in the console to sleep to the next day (means you don't have to go back to the farm) and then talk to him on the 4th again.

leaden cave
#

OO it worked

#

Thanks a lot SDVpufferheart

vernal crest
#

You're doing well SDVpufferthumbsup

leaden cave
#

Also could I ask you how you get the command ("debug sleep") to look like that in the discord

leaden cave
vernal crest
leaden cave
#

O nice
Code block

#

Also is the a way to send a big chunk of code nicely (not by just coping and pasting it whole)

vernal crest
#

You can even do syntax highlighting if you write the language name after the first set of three backticks

```json
{
"Action": "EditData",
// And so on
}
```

{
  "Action": "EditData",
  // And so on
}
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.

vernal crest
#

You can also use it just for yourself to help you identify syntax errors in your files (though be aware that you can have correct syntax and still have an incorrect patch, because the validator can't tell what you're trying to achieve and therefore can't help you know whether you're doing that).

leaden cave
#

O sorry I didn't phase it correctly, I meant in the discord

For JSON I use the schemas in VS Code that I got from the GitHub

vernal crest
#

I'm not sure what you mean. Schemas don't have anything to do with sending code anywhere

leaden cave
#

Yes yes I know the last part is unrelated just a reply to your message

vernal crest
#

Oh I see instead of using the validator for checking

#

In that case, yes, I meant when sharing on discord we ask people to send links to the json they've uploaded

vernal crest
#

That's okay, a lot of people don't haha

weary sail
#

is this a good place to ask for help with smapi/c# modding ?

#

or is it mainly content patcher

leaden cave
#

I believe that is is for all types of modding so yes

#

Though sadly I can't help because I am new here (I mean new to modding)

weary sail
#

i seee ty ty

vernal crest
#

Yes this is the right place for C# modding help

leaden cave
#

What day is the Thu10 supposed to be

#

I know the Thu stands for Thursday though I can't understand the 10

vernal crest
leaden cave
#

I have though I got a little lost in the documentation

#

Thank you

vernal crest
#

That's understandable, it's a big page

leaden cave
#

So does this mean Sun_28 at a random Sunday after year 1 or at the 28 of the month (last day)

rich talon
#

i need help oh my godSDVpufferwaaah Portrait test 4 (tired)$4#$b#Portrait test 5 (angry)$5#$b#Portrait test 6 (magic)$6# why does this show $0 neutral instead of $4๐Ÿ˜ญ $0 to $3 work just fine

woeful lintel
#

I'm doing Content Patcher Crimes again, I need some help figuring out how to do something: I have a config token "MyToken" with "AllowValues": "A, B, both" (names simplified) and I'm using a template with local tokens, and I want to define a local token "MyLocalToken" based on "MyToken" in a funky way:

  • if MyToken is "A", then MyLocalToken is "1"
  • if MyToken is "B", then MyLocalToken is "2"
  • if MyToken is "both", then MyLocalToken is "1, 2"
    I want to do this because the actual values of "MyToken" are not actually A and B and can be any string for clarity in the config menu.
    Is this possible without defining extra dynamic tokens?
vernal crest
leaden cave
#

Not really (I am doing this one my own), it is a dialog key of Abigail

"Sun_28": "Of course that's what you'd say.$u",

rich talon
#

from memory i thinks thats the dialogue abi has when you tell her about liking her hair color so its more a response to your choice "fall_Sun": "Hmm... what should I do tonight?#$q 27/28 fall_Sun_old#I was thinking about dyeing my hair again... what do you think?#$r 27 10 Sun_27#Dye it black.#$r 27 10 Sun_27#Why not blonde?#$r 27 20 Sun_WildColor#How about bubblegum pink?#$r 28 0 Sun_28#I like your hair just the way it is!",

vernal crest
# leaden cave Not really (I am doing this one my own), it is a dialog key of Abigail ```"Sun_...

Ooooh that's confusing of CA to do haha. Those are dialogue keys that are defined in the $q question that's in the fall_Sun line.

"fall_Sun": "Hmm... what should I do tonight?#$q 27/28 fall_Sun_old#I was thinking about dyeing my hair again... what do you think?#$r 27 10 Sun_27#Dye it black.#$r 27 10 Sun_27#Why not blonde?#$r 27 20 Sun_WildColor#How about bubblegum pink?#$r 28 0 Sun_28#I like your hair just the way it is!",

rich talon
#

great minds think alike

hard fern
#

oh i was just about to say i think that's part of a question dialogue haha

vernal crest
#

When you're making one of your own, it'd ideally have your mod id in it to avoid the risk of incompatibility with other mods. So you might have {{ModId}}_HairBlack, {{ModId}}_HairBlonde, {{ModId}}_HairPink, {{ModId}}_HairSame or something.

leaden cave
vernal crest
vernal crest
vernal crest
vernal crest
woeful lintel
leaden cave
vernal crest
woeful lintel
#

ooooh, didn't think about i18n

#

didn't even know it could be used that way

vernal crest
#

The downside with that approach is that Stardew Access doesn't read the i18n so if it's important that it's accessible for blind players then you'd need to do the dynamic tokens route, at least until I can learn how to fix the SA issue so I can PR a fix to Shoaib.

rich talon
vernal crest
woeful lintel
#

I think i18n doesn't solve the whole issue at first glance, but it is an interesting option

hard fern
#

hm... i wonder if it's something with the framework you're using? like this is a child mod right?

#

since you say 0-3 works fine

rich talon
#

hdp i havnt changed my code just a new portrait

hard fern
#

the only thing i can possibly think of is that the mod itself doesn't account for more than 4 portraits.. but i honestly can't say anything for sure, and this is just a guess im throwing out there

#

and im not even sure how it would work

vernal crest
lucid mulch
# leaden cave Are these the columns?

To describe the columns.
There are four states the patch can realistically be in.

  1. All unticked which would be a disabled patch (Mostly not a thing anymore but illegal tokens or legacy "enabled = false" functionality would do it)
  2. Loaded ticked but the others unticked, which is a patch that simply has its conditions being false.
  3. Loaded and enabled ticked, but hasn't been applied, which is either an incorrect target, or some other logic reason why nothing has tried to actually access the asset in question. (This is the most common state that patch summary saves people)
  4. all ticked, where the patch is in effect and something has requested the asset so the patch ran as intended.
woeful lintel
vernal crest
rich talon
hard fern
#

fun

woeful lintel
#

oh yeah, value, brain fart

vernal crest
#

Oh unless by "config option name" you meant a value, in which case yes lol

woeful lintel
#

do you think it's possible to have a value with a comma so that MyLocalToken can be a list of values directly?

vernal crest
#

Maybe if you escaped it?

lucid iron
#

Do u intend to have commas in the value?

weary sail
#

i'm having trouble figuring out whether or not i should use harmony. or, really, i'm having trouble figuring out how to do the thing i want to do without using it.

i want to create an object that appears in a random tile in a specific map depending on how many of this object already exists, grows, produces something, dies, then disappears over time. i also want to remove a specific feature already present, and change how a specific area works.

looking at this, and the game code, it makes sense to me that i should just .. replace things. with harmony. if i can't or shouldn't do that, where do i even begin?

sorry if this seems silly

woeful lintel
vernal crest
#

Although if you can't use a comma in the value then you have to find another method anyway

woeful lintel
lucid mulch
#

It would mainly be a case of whether your lifecycle events can align neatly with smapi events, or if you need to change state in very specific timing

woeful lintel
weary sail
lucid iron
vernal crest
woeful lintel
#

ok, I'm reading the config doc again then

lucid mulch
#

if everything works in UpdateTicked for example then you probably get away with no harmony, but if you need to be before some part of the update loop and after some other part of the update loop in the same tick, you need harmony or be even more precise.

if you just need DayStarted thats trivial

vernal crest
#

Otherwise you couldn't translate the config name

woeful lintel
#

ooooooh

lucid iron
#

These do happen to be same value as the token in english but now that i set it up i can put other languages without changing the value

weary sail
#

how should i approach suppressing an existing event?

lucid iron
#

Is it a event like a cutscene or a event like a C# event handler

weary sail
#

dayupdate event

#

i want to replace it with my own

lucid iron
#

You generally can't afaik

lucid mulch
#

Not too hard but you probably break every other mod

weary sail
#

oh!

#

ah.

lucid iron
#

But maybe your usecase can be done in another way

weary sail
#

maybe .. i want to replace the farm cave dayupdate stuff

lucid iron
#

Oh that's different thing

#

You can use harmony for that

weary sail
#

sorry, i dont know the terminology

weary sail
lucid iron
#

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

lucid iron
weary sail
#

that's why i thought it was right to use it, but everywhere online starts with "dont use it unless its a last resort"

woeful lintel
#

are you trying to add another option for the farmcave? that's a really cool idea!

lucid iron
#

Sometimes there no harmony ways to do things and sometimes u have 50 harmony patches in 1 mod

weary sail
tiny zealot
weary sail
weary sail
woeful lintel
#

imo adding a new option would be cooler, but I see how a replacement would be more manageable (no need to start a new save, no need to edit the cave choice logic, ...)

vernal crest
tiny zealot
#

i appreciate the sentiment but i feel obligated to tell you that i am just a strange guy

lucid iron
woeful lintel
#

anyway, not a subject I know anything about code wise, so I won't be able to help much...

woeful lintel
vernal crest
#

For me it should've said "watch out, you will have no idea what you're doing with this" :D

weary sail
vernal crest
#

If it's not NSFW or AI-gen, go crazy

tiny zealot
#

in general we love to hear about what other people are working on

lucid iron
#

what if u ujst

#

Game1.MasterPlayer.caveChoice.Value = 3

#

would that skip both vanilla cave logic lol

weary sail
woeful lintel
lucid iron
#

no if u put MyConfig it'll say MyConfig until u put the matching special i18n and put "My Config" inside

woeful lintel
weary sail
#

in stardew terms:
take too much guano, less is produced
leave it be, produces large mushrooms
use it on a crop, makes crop "large"

woeful lintel
weary sail
lucid iron
#

u also have to do something about the SDVdemetriums๐Ÿ„๐Ÿฆ‡โ“

lucid mulch
#

That's just a regular farm event I think, if it's already marked as seen you are good right

weary sail
woeful lintel
fossil osprey
tiny zealot
weary sail
fossil osprey
#

Hm, maybe you could make it boost giant crop chance?

weary sail
woeful lintel
#

oh you meant use it on a crop you're adding to the cave? ok, yeah, that makes sense

fossil osprey
#

Like, put it on a melon/pumpkin/cabbage field, and there is a higher chance it'll turn giant

woeful lintel
#

nvm

weary sail
#

oh, leroy said that

#

oop

fossil osprey
#

It mostly means you'll need to create these assets

weary sail
#

like big versions of popular modded crops? i like making pixel art, i don't mind :p

woeful lintel
#

won't you need to make a large version of every vanilla crop?

weary sail
fossil osprey
#

If you don't mind making these compat, then go on, but be warned it's a lot of work still ^^'

woeful lintel
#

how would your mod handle a crop that doesn't have any asset for a large version?

weary sail
#

so they would just share the same sprite in case of no compat

woeful lintel
weary sail
#

thats a later rue problem

woeful lintel
#

fair enough

weary sail
#

but yeah i just .. dont want big flowers

#

i dont know why

weary sail
lucid iron
#

dont need to change the base one for that

woeful lintel
#

wasn't talking about giant crops. rue mentioned that it would be like large milk/eggs

tender agate
#

I always spy the cool mods minutes after upload and before showcase despite only opening nexus like 3-4 times a day. nice mod, chu

woeful lintel
#

so it would require assets for all vanilla crops, but it would be sad for it to just do nothing for any modded crops

lucid iron
#

Ah in that case it's like an alternate drop

weary sail
weary sail
lucid iron
#

But i think that's ok, just provide clear ways for others to add their big crop (and then get mega popular)

woeful lintel
lucid iron
weary sail
#

obviously the mega popular part is not included

#

but the clear ways

woeful lintel
#

my main point is: think about the fact that your mod will probably be run along a few hundred others

#

(but don't think about that too much)

weary sail
#

oh it definitely will, even for me

hard fern
lucid iron
#

Yeah even if u end up doing custom logic as long as you read the data from content people can editdata that with content patcher

#

I thought ur suffering is the drawing part not the json lol

vernal crest
#

Forsy suffers with every part lol

hard fern
#

๐Ÿ˜” indeed

vernal crest
#

Oooh will this make AT conversions less tedious, I wonder

#

I just try not to even look at AT furniture mods but sometimes they slip through and entice me

lucid iron
#

Yeah u can put all the AT into a sub folder

woeful lintel
lucid iron
#

It has auto spritesheet merge feature

hard fern
#

i dont like the furniture data lol... especially if there's a ton of furniture. i dont mind doing one or two but yeah, trying to convert old non-functional furniture mods/at mods makes me give up

lucid iron
#

...which I didn't explain at all on the mod page lmao

hard fern
#

(so in this case im not suffering with drawing!)

lucid iron
#

Hold on

vernal crest
#

I usually use spreadsheets for faster data entry when converting

#

But doing the sprite indexes is painful

woeful lintel
#

I'm going to do so many crimes for this to work with FF

lucid iron
vernal crest
#

Sold

merry river
#

hello und sorry for jumping into the conversation like that
is it somehow possible to use a dynamic token in a when condition? i am trying to make a map patch compatible with NPC Lunna after someone notified me of incompatibilities and I was trying to make something like


    "Name": "HasLunna",
    "Value": "\"HasMod: |contains=Rafseazz.LunnaCP\": true ",
    "When":
    {
        "HasMod: |contains=Rafseazz.LunnaCP": true 
        }
},```
hard fern
#

do you even need a dynamic token for this

#

can you not just use the hasmod condition as is? ๐Ÿค”

merry river
#

and then

     "LogName": "Warp from alternate location to forest  for mod compat",
     "Action": "EditMap",
    "Target": "Maps/{{ModID}}_PeiMingNewOutdoors",
    "When": { "House Location": "Alternate",
"HasMod: |contains=FlashShifter.StardewValleyExpandedCP": false,
 "{{HasLunna}}" },
    "AddWarps": [
        "{{AlternateToForestWarp}}"
            ]
        },```
vernal crest
#

Why are you trying to make a DT when you could just use the HasMod token directly?

merry river
woeful lintel
#

pretty sure you just need "HasMod": "<modID>"

vernal crest
#

I think just copying and pasting that When patch is going to be easier

#

Or if that feels too hard, make a VSCode snippet

woeful lintel
#

I'd do an include with this condition that contains everything requiring this mod

merry river
#

remind me to never make a mod that just barely touches anything SVE changes ever again

vernal crest
#

I'm also curious why you want to DT the Lunna check but not the SVE one?

merry river
woeful lintel
#

like:

{
  "Action": "Include",
  "Target": "SVE_Luna_content.json",
  "When": {
    "HasMod: |contains=FlashShifter.StardewValleyExpandedCP": false,
    "HasMod": "Rafseazz.LunnaCP"
  }
}

fixed?

vernal crest
#

No Leroy they need SVE to not be present

#

So they can't use that

merry river
#

I need to make patches for both SVE and Vanilla as my mod can add a little warp that leads to my NPCs house. And since SVE changes the forest map a lot (where the map patch happens), I thought I'd make my life easier using a DT. But maybe I'll just copypaste haha

vernal crest
#

To answer your question, I tentatively think it'd be possible because it should evaluate the token before trying to check the condition

#

I am personally against cluttering up one's mod with DTs that only exist to save a little typing or copying and pasting

#

Especially since VSC snippets exist and don't add any performance cost or additional complexity to the mod

#

But better people than I do do it

merry river
vernal crest
#

Well, they're adding additional steps so although the performance cost is small it must surely be there (I wait for SinZ to tell me I am wrong lol)

merry river
vernal crest
#

I use them (when I remember) for my NPC names so instead of typing {{ModId}}_Hiria I can press Shift+H

lucid mulch
vernal crest
#

Hooray I wasn't wrong!

lucid mulch
#

Honestly dynamic tokens are likely going to be my next target for performance improvements when I next get around to getting annoyed by it being slow

weary sail
#

this might be a silly question but .. how do i unpack a .dll file ..?

lucid iron
#

!decompile

ocean sailBOT
weary sail
#

not the game code , or does it not matter

lucid iron
#

It's the same for game dll or other mod dll

weary sail
#

can i use the same tools?

weary sail
lucid iron
#

The tool is a C# decompiler and works for any C# dll

#

But some mods are already open source so

#

Check here with advanced options ticked

weary sail
#

do i need to be worried about what would happen to a save file's farm cave upon removing the mod if i use Game1.MasterPlayer.caveChoice.Value = 3; ?

#

would it be best to add a config option to revert to one of the default choices?

woeful lintel
#

not sure how you would revert the choice upon removing the mod...

weary sail
woeful lintel
#

oh I see

#

yeah, that would make sense

weary sail
#

ty

woeful lintel
#

I guess the solution would be to have a GMCM tab named "Uninstalling" containing a dropdown to choose the type to revert to, and a button to apply with text to explain how it works

blissful panther
#

It... actually doesn't look like that value's used at all outside of checking if it's a fruit bat cave.

#
Search target
    StardewValley.Farmer.caveChoice : NetInt
Found usages  (8 usages found)
    <Stardew Valley>  (8 usages found)
        StardewValley  (8 usages found)
            Locations  (3 usages found)
                FarmCave.cs  (3 usages found)
                    (20: 36)  if (Game1.MasterPlayer.caveChoice.Value == 1)
                    (167: 36)  if (Game1.MasterPlayer.caveChoice.Value != 1)
                    (218: 36)  if (Game1.MasterPlayer.caveChoice.Value == 1)
            Event.cs  (2 usages found)
                (13060: 36)  Game1.MasterPlayer.caveChoice.Value = 2;
                (13065: 36)  Game1.MasterPlayer.caveChoice.Value = 1;
            Farmer.cs  (2 usages found)
                (578: 32)  public readonly NetInt caveChoice = new NetInt();
                (2121: 32)  โ€ฆthis.bobberStyle, "bobberStyle") โ†ต .AddField(this.caveChoice, "caveChoice")
            GameStateQuery.cs  (1 usage found)
                (512: 44)  switch (Game1.MasterPlayer.caveChoice.Value)
#

Or directly in the event for choosing the cave type.

#
internal static void hostActionChooseCave(Farmer who, BinaryReader reader)
{
    if (reader.ReadInt32() == 0)
    {
        Game1.MasterPlayer.caveChoice.Value = 2;
        Game1.RequireLocation<FarmCave>("FarmCave").setUpMushroomHouse();
    }
    else
    {
        Game1.MasterPlayer.caveChoice.Value = 1;
    }
}
woeful lintel
#

welp, the mod would have to apply the cave "creation" logic when going through the uninstallation process

#

or even setting some flags back so that the game automatically triggers the choice event again?

blissful panther
#

I... think it would just act as a nothing cave in absence of the mod. Which isn't exactly optimal if someone wants to use the cave, but otherwise shouldn't break anything from what I'm seeing.

#

But yeah, I would definitely want to opt for an uninstall type option.

woeful lintel
#

how can I use a SYNCED_CHOICE GSQ (in npc appearance condition) based on a token? for now I have SYNCED_CHOICE day my_key 1 {{Count:MyToken}} x with x either 1 or 2 for the 2 options that MyToken can contain, but I know I have a case later with 3 options, which wouldn't work: if I hardcode it with x=3, it will never trigger if on of the first 2 options is turned off ({{Count:MyToken}} would be 2, so the SYNCED CHOICE would never take the value 3), I think i need something like the inverse of valueAt, if that even means something since tokens are not ordered

weary sail
#

would there be some way to make the game think the choice has not yet been made? so that when the mod is removed, the next day he will ask again?

woeful lintel
#

probably a mail flag, not sure how that works

woeful lintel
#

and each appearance is in a separate patch with "When": {"MyToken": "A/B/C"} (A, B or C depending on the variant)

valid folio
#

Hello! What should I use for a quest that is completed by sending items through the shipping bin?
For hand delivery I know itโ€™s ItemDelivery, but I want my quest to require the player to ship two items via the shipping bin.

I checked the wiki in the Quest section and didnโ€™t really see anything related to this. Is this supposed to be done with Trigger Actions?

Up to now, Iโ€™ve been doing it like this:

Mail with quest โ†’ quest gets activated โ†’ in parallel I have a Trigger Action that references the same quest โ†’ the quest completes and the trigger, which has the same completion condition, also fires โ†’ then a mail for the next quest is sent.

Everything was working fine until one of the quests simply wonโ€™t complete, no matter how many times I ship the required items. I donโ€™t know if I made a mistake due to exhaustion, but I canโ€™t see anything obviously wrong, and Iโ€™m not sure this is even the most efficient way to do it.

Iโ€™ll leave the code below.
mail.json + trigger actions
https://smapi.io/json/none/6152b9b687714d2bb05e5d448e6f6217

quest.json
https://smapi.io/json/none/6fe677d380e245fcaf96d64c6621b668

#

The quests I canโ€™t complete are {{ModId}}_Quest_DairySamples and {{ModId}}_Quest_NanoSamples, which correspond to these trigger actions: {{ModId}}_Trigger_DairyComplete and {{ModId}}_Trigger_NanoComplete.

tiny zealot
#

i don't see anything obviously wrong but the DayEnding trigger probably fires before that day's items actually get shipped, so you might have a one-day-late problem

gaunt orbit
tiny zealot
woeful lintel
valid folio
tiny zealot
#

alternately, if you removed the items from the shipping collections summary (i.e. excluding them from perfection requirements), the PLAYER_SHIPPED_BASIC_ITEM query won't work (wiki says it only works for stuff tracked in the shipping collection page)

valid folio
tiny zealot
#

i don't know i'm just spitballing

woeful lintel
#

if "MyToken": "A, B, C", would {{Random:{{MyToken}}}} choose between A, B and C?

valid folio
tiny zealot
#

this may not be related to your problem, but you probably don't need to include the IF conditions checking whether the player has the mail already. unless you make them repeatable, trigger actions only run once per save, so if nothing else can send the mail you don't need to guard the AddMail action

tiny zealot
valid folio
tiny zealot
#

any time SDVpufferthumbsup

valid folio
# tiny zealot any time <:SDVpufferthumbsup:604817082064044062>

Is it possible to set the item to be any of its type? For example, any kind of milk? So itโ€™s not limited to cow milk, goat milk, or milk from a specific mod, and the player can deliver whatever milk they have on hand.

Because I tried using the category number or the context tag, but it doesnโ€™t accept it.

tiny zealot
#

for ItemDelivery? i don't think so

#

but i defer to others who know more about quests than i do. i've only done a few and i think i had C# code to manually complete them when appropriate in every case ๐Ÿ˜…

valid folio
tiny zealot
#

that particular query only seems to check an item id, so i doubt it

valid folio
gaunt orbit
#

@lucid iron How does the catalogue thing from Smithy work? I see it adding a context tag, but the context tag is hardcoded and it doesn't modify shop data. Is there some kind of MMAP magic happening?

lucid iron
#

Oh it's very very dumb

#

The context tag is entirely internal for smithy to track when mod reloaded

#

The actual catalogue is just one of those furniture tile action -> open shop deals

#

I tagged it with hhd and everything

#

The design is that once you create your mod smithy doesn't have to be installed at all

gaunt orbit
#

okay great!

nimble karma
#

Speaking of the smithy, I'm gonna play around with that rn

lucid iron
#

I was gonna do spacecore and calcifer options too cus it's all the same logic

#

But i got eepy so 1.1 feature mayhaps

#

Big anonymous object abuse in there SMCPufferjail

gaunt orbit
#

I just asked bc I'm looking into catalogue auto-detection and want to cover the most common cases. I already have something for calcifer, but I haven't added anything for mmap or spacecore yet bc I didn't see anyone using those for catalogues yet

lucid iron
#

Oh yeah i use it when i write jsons for people

#

But only if im also planning on using mmap for lights and draw layers

gaunt orbit
#

or connected textures

lucid iron
#

If u do want to do auto detection here's what it's like on mmap side

gaunt orbit
#

I figured it out from the edits smithy was doing

#

it's not too different from calcifer

lucid iron
#

The nice bit is that this is just vanilla BuildingData so u don't need any dynamic to load it

#

mmap doesn't support the other 2 building action fields so you only need to inspect TileProperties

weary sail
#

i cant seem to find the sdv code that actually triggers the cave choice event ... i'm trying to figure out what it checks for (besides 25000g and yes, i tried to just search "25000" in vs and got nothing lol)

#

would anyone happen to know how i can find it?

gaunt orbit
#

I think it's in event data actually

#

not hardcoded

#

I could be wrong about that

calm nebula
#

Event 65

tiny zealot
#

Data/Events/Farm

weary sail
#

oh !

#

thank u sm ๐Ÿ˜ญ

tender agate
lucid iron
#

Potential fixes might hint you the right namespace to use

tender agate
#

don't think that's right...?

lucid iron
#

If u right click and try go to source on some smapi class does it work

#

Essentially we just gotta check if u got the reference to SMAPI working

tender agate
#

might be partially working idk.
hmmm, I'll re-setup the project since it's just started

#

well its working now, still no idea what went wrong last time lmao ยฏ_(ใƒ„)_/ยฏ

calm nebula
tender agate
#

guess I did? but changing it now doesn't break it either

scarlet warren
#

Whats the string that I can put into Content to replace the "map_island" Image?

weary sail
#

i know it took me forever but i finally found Game1.player.eventsSeen.------(); by navigating thru the games code and i feel very happy about it lol

#

im sure there was a faster way to find this but the experience gave me some understanding

umbral edge
autumn tide
#

30 MB-

tender agate
#

of text

#

probably something repeated

formal crown
#

Whatever's happening, it also repeats with Deep Woods

iron perch
#

Hello everyone
I am looking for modder for xenia game
Dm me for more info

ocean sailBOT
formal crown
#

Do errors start occuring immediately after the second player joins?

umbral edge
hoary mesa
#

Hi! this is a really silly and obvious question i think but Ive been looking for like 10 minutes and can't find it. Does anyone know where the overnight witch sprites are stored after being unpacked w/ StardewXnbHack? I'm trying to find the Golden Egg witch but I' just... can't find it or any of the witch sprites ;_;

ornate trellis
autumn tide
#

when in doubt, cursors

ornate trellis
#

right next to the lovely grandpa sprite

formal crown
umbral edge
hoary mesa
ornate trellis
autumn tide
#

or springobjects if you're looking for an inventory item!

rocky copper
#

I got a weird problem. I'm trying to add a little shop that trades one item that only opens if you have the trade item in your inventory; my issue is that the Conditions under "Owners" are not working, like, at all. I'm making sure the first entry is the one that triggers in the event that the player does not have the item on them and this has an accompanying "ClosedMessage" and there's a second entry that allows the shop to open if you do have it. I've tried a dozen different variations on these. Then I started trying simple ones, like "!SEASON Summer" (it's spring, so this should trigger the ClosedMessage), no luck. I fully copied and pasted conditional shops from the vanilla game, like the Ice Cream stand, and the are opening regardless of the conditions applied, even while the vanilla shops themselves are still closed.
Has, uh, has anyone had a problem like this?

hallow prism
#

i remember order matters a lot for closed message to show properly

#

so you may want to post example of what you did with season

#

the condition to have trade item deciding about shop opening is something i'm unsure how you would happen in pure CP

tiny zealot
#

i remember the closedmessage thing is a bit weird and behaves unintuitively, and involves the operating hours specifically (if memory serves)

#

that's all i've got though and i have to go, please don't ask me for clarification

covert wren
#

question, what you guys use to make maps and locations for the mods?

ornate trellis
#

Tiled

#

!Tiled

ocean sailBOT
#

If you want to make mods that add or edit maps:

  1. Use Tiled to edit .tmx or .tbin files.

  2. Refer to the Maps wiki page for details on how maps work in Stardew Valley.

  3. Content Patcher allows you to create custom locations through editing Data/Locations

  4. Vanilla Maps can be edited via Content Patcher as well: EditMap

covert wren
#

kinda wanted to make something so will need it, thanks

#

also do i have to make every variant depending on season?

ornate trellis
#

you use the spring tilesheets and then the rest should automatically change seasons ingame if you set it up right

covert wren
#

well the setting it up right may be the problem but okay

ornate trellis
#

ok so, you can work around this if you unpack the game and use an existing outdoor map with the tilesheets you ned but you need to make sure that you change all the map properties etc too

#

you can also export tilesheets with their animations etc intact via turning them into tsx files and then opening and enbbing them into your map

#

it explains in the maps wiki page that is linked above

covert wren
#

...make your own mod they said...
...it be easy as codeing in batch files they said...

rocky copper
#

So this is the last version I had; it currently is Spring, so as I understand it, that should give the "Closed For Repairs" message but the shop is just opening

ornate trellis
#

its probably best to show the whole json and in the validator

#

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

weary sail
#

should i use MasterPlayer to edit/remove eventsSeen data, or should i just do an if (!Game1.IsMasterGame) {return;} then just use player

lucid egret
#

Is there a way to i18n the title of a config option? i know we can i18n the description but the actual option itself, is that possible?

autumn tide
#

mhm!

#

one sec there's a whole lil system for it..

lucid egret
#

Thank you sm SDVpufferheart

autumn tide
#

ofc!

#

i always set up fancy lil formatting stuffs for myself, lemme see if I have something you can yoink..

#

oh forgot to summon you @lucid egret

weary sail
#

how might i go about removing an entry in StardewValleyXNB\Data\Events\default.json ?

autumn tide
#

do you know the basics of CP?

lucid egret
weary sail
autumn tide
autumn tide
urban patrol
#

claude theyโ€™re in C#

autumn tide
#

oh?

urban patrol
#

theyโ€™re making a C# mod to overhaul the farm cave

autumn tide
#

couldn't you just change the key to be null?

#

ohhh

weary sail
autumn tide
#

..I'm confused rn tbh SDVpufferwaaah

weary sail
#

but thats a start, ill look into it, tysm

autumn tide
#

what are you trying to do?

#

oh yay pathos is here he can help

weary sail
#

stop event 65 from triggering

autumn tide
#

gotchaaaa one sec

weary sail
#

(without changing it to seen)

ivory plume
autumn tide
#

ohhh I think that might be a C# related event, as content ones are in unique files per location name

weary sail
#

tysm!! i knew i shouldve looked through that apis page more thoroughly ...

autumn tide
#

sorry for misleading aah SDVpufferwaaah

weary sail
#

(is pathoschild ... the one that made smapi ...?)

#

(or was it content patcher?)

autumn tide
#

mhm

#

...both i think? Pathos?

weary sail
#

BOTH. OKAY. THank you, pathoschild

ivory plume
#

(Technically I didn't make SMAPI. Someone else created the first version in a couple of weeks, it was mostly abandoned, then they transferred the project to me when I started submitting pull requests.)

autumn tide
#

still that counts imo SDVpufferthumbsup

weary sail
#

yeah .. i mean havent u been maintaining it for .. years?

autumn tide
#

you have the fancy name thingy for a reason haha

ivory plume
#

(November will be my ten-year anniversary as the SMAPI maintainer.)

autumn tide
#

ooh that's awesome!

weary sail
#

wow ... that is insane

#

ur incredible

hard fern
#

10 years of smapi

autumn tide
gentle rose
#

in three years, smapi will be old enough to use discord!

gentle rose
autumn tide
#

HOW

#

okay damn

ornate locust
#

Honestly maintaining SMAPI is even more impressive than making it

#

that's the ol CONTINUOUS work

urban patrol
#

i wonder how much of old SMAPI survives vs how much has been ship of theseus-ed

autumn tide
ivory plume
#

(I'm not sure any of the original code still exists at this point. Even low-level files like the solution file have been replaced over time.)

autumn tide
#

i mean, name ig?

urban patrol
#

yeah iโ€™m not surprised haha itโ€™s bound to have evolved a lot over a decade

ivory plume
hallow prism
#

smapi of theseus

weary sail
#

one line!

#

wow

gentle rose
#

c# question, what exception type would you use if a type you expect to exist isn't accessible via reflection? SDVpufferthinkblob

uncut viper
#

TypeLoadException?

leaden cave
#

Hello everyone. So I just got into modding and I wanted to ask what type of mod should I try to create and practice.

I have been following the tutorials of the modding wiki but now I feel a little lost

I had asked for help in the past and the two recommendations I got was to change some NPC dialog (which I did and played around with) and to add purchases to a shop (which I don't know how to do, or find the documentation for)

Could I have some help please.

gentle rose
#

ah, ReflectionTypeLoadException looks okay-- yup

autumn tide
hallow prism
#

if you want to make an expansion, shop is something you want to know more about. If you want to add npcs, not necessarily

leaden cave
hard fern
autumn tide
#

okay! you're gonna wanna start out by checking out the CP documentation and the wiki mod page for shops

#

one sec..

leaden cave
hard fern
autumn tide
leaden cave
#

Is there a certain place I should look at? (In the links)

urban patrol
autumn tide
leaden cave
leaden cave
autumn tide
#

I'd reccomend starteing out with button's site, then the CP docs, then the wiki link! also, if there's something that you want further explanation for, just ask :)

autumn tide
#

well if you wanna help out I'm kinda stuck on my mod rn-

leaden cave
autumn tide
#

ALSO there's a lil battery mod team that you can join!

#

krobus and dwarf expansion/overhaul :)

leaden cave
urban patrol
# leaden cave That sounds nice. Is there like a thread for it?

not as far as i know. i know someone was in mma a couple days ago maybe looking for someone. you could also put out your own sort of "resume" like "hey if anyone wants xyz and can provide abc, i'm open to a collab, [optionally here's past examples of my work]". there's also the modding ideas github repo, but i wanna say most of the ideas in there require C# and/or a lot of work

autumn tide
#

...i'm going a lil overboard and may be adding a custom museum and maybe new npcs-

leaden cave
autumn tide
urban patrol
#

yeah i glanced in there a few times and went oh that's beyond me lol

#

if you like writing or making OCs, you could dip a toe into making an NPC. i'd say that's what we have the most tutorials and resources for, and it will teach you a little bit of everything--but it requires a good amount of work (not overly difficult, but you should have determination)

#

if you like pixel art you could try some recolors or retextures

leaden cave
#

I love pixel art but my best piece yes is just and overcolored mug SDVpufferwaaah

#

(With a flower on it)

urban patrol
#

sounds like this would be a good way to practice and improve it lol

leaden cave
#

You are right

#

Do you have any recommendations on how I can improve on my art?

Any documents with the basics or anything else?

autumn tide
#

!pixelart

ocean sailBOT
#

Where to Start With SDV-Style Pixel Art
If you've never done pixel art before, don't stress! It's easy to pick up the basics - the key is to start small, ask for feedback, and incorporate that into your work.

To start, you'll want an art program. See a list of recommended programs in the !software command.

Here's some good beginner tutorials!
http://pixeljoint.com/forum/forum_posts.asp?TID=11299&PID=139322
https://medium.com/pixel-grimoire/how-to-start-making-pixel-art-2d1e31a5ceab

To start off, try opening an existing portrait and changing the outfit. Start small: edit a shirt pattern, change a jacket collar, or remove a scarf and draw the clothes underneath. Ask for feedback too! The best way to improve is learning how to identify what's wrong and why, so then you can work out how to fix it.

Here's more good tips from the artist of "Celeste":
General pixel art 1: https://www.patreon.com/posts/pixel-art-1-6971422
General pixel art 2: https://www.patreon.com/posts/pixel-art-part-2-11225146
Outlines: https://www.patreon.com/posts/outlines-14106192
Shading: https://www.patreon.com/posts/shading-13869731
Portraits: https://www.patreon.com/posts/portraits-8693396

SDV has a few quirks to remember too:

  • Colour limits: Limit the number of shades you use - stick to six including the outline.
  • Hue shifts: Rather than making shadows and highlights lighter or darker versions of the base tone, SDV shifts the hue too. Eg. a base orange will have yellow highlights and red shadows. This goes for skintones too!
  • Light source: SDV uses a top-right & slightly forward light source - check the vanilla art for reference.
    Most importantly, don't hesitate to ask questions and get advice from people. Have fun!
urban patrol
#

there are a lot of guides! hang on

autumn tide
#

YES i remembered the command!

urban patrol
#

!pixelartinfo

ocean sailBOT
autumn tide
#

THERE'S ANOTHER?!

#

i am in shock /ex

nimble karma
#

That's so funny that we're talking about pixel art right now

leaden cave
#

Watch all of this info I will probably start with the beginner courses mentioned

nimble karma
#

I can pretty easily write up the code for the mod I have in mind, but I really have no artistic talent when it comes to pixel art. I have Aseprite and it feels like a dark magic. I'm into the idea of maybe commissioning someone though

autumn tide
#

just remember that this all takes a while to learn, and be patient with yourself SDVpufferheart

leaden cave
#

Thank you for your kind words

autumn tide
#

it's good but damn why so complex SDVpufferwaaah

urban patrol
#

maybe you both could collaborate!

leaden cave
#

I really like the style of asprite though it looks amazing

autumn tide
#

mayhaps! what are you working on?

nimble karma
#

It's not just that, I can barely draw anyways! My wife is an artist, but she draws tattoos and stuff not pixel art. Maaaaaaaaaybe I could trick her into learning the program lol

fossil osprey
#

Aseprite is definitely a good beginner friendly program
Like you can do anythings with no knowledge of the program, yet you can learn to do so way more effectively in it

autumn tide
#

well idk about beginner friendly- but then again i am infamous for taking forever to learn stuff

fossil osprey
#

Since it's just pixel, you only need the brush and colors to start ^^

#

And tbh most of the time I only use that

#

Some exceptions of line and fill tool, but I'm definitely not using the program to its full potential

nimble karma
#

The one good thing is I just realized that Aseprite is probably on iPad, which is the only shot I have getting her to learn how to draw pixel art lol

#

Without her apple pencil I'd be met with a fuuuuuuck no

autumn tide
#

oh it can be-

#

i got it on laptop so

nimble karma
#

I have it on Steam lol

autumn tide
#

aah, and that can be on iPad?

nimble karma
#

nvm, it's macos not ios

#

siiiiiiiiiiiiiigh

autumn tide
#

ahh :(

nimble karma
#

Anyways, does anyone know how commissioning someone usually works? I found an article held up by a fandom wiki with a list of available artists, but I'm unsure if they actually keep that up to date

#

Err, I should say finding artists open for commission.

urban patrol
#

!comms

ocean sailBOT
weary sail
# ivory plume You can use the [SMAPI content API](<https://stardewvalleywiki.com/Modding:Modde...

sorry to bother you but .. im getting this error and not seeing any editor.Remove documentation. am i missing something?

'IAssetDataForDictionary<string, string>' does not contain a definition for 'Remove' and the best extension method overload 'CollectionExtensions.Remove<string, string>(IDictionary<string, string>, string, out string)' requires a receiver of type 'System.Collections.Generic.IDictionary<string, string>'

uncut viper
#

editor.Data.Remove() if following the wiki example

weary sail
#

thank you !

uncut viper
#

or change to var editor = asset.AsDictionary<string, string>().Data

#

the editor wraps around the dictionary itself stored in Data

#

so the wrapper itself doesnt have the dict methods

weary sail
#

ohhh then i could keep it as is ?

#

that is really nice

dusk mulch
#

where is mine layout 40 used? is it just a skull cavern exclusive layout?

hallow prism
#

it may be used by the randomization of layout that was added in 1.6, if memory serves me right

dusk mulch
#

oh alright, ty!

low marlin
#

If I wanna make a custom NPC with HMK functionality (to adopt as a child once specific conditions are met like Dolphin's Adopt Leo HMK expansion), should the HMK content pack be within the same directory as the main mod itself?

#

I am having plans to make such an NPC (actually a crossover one from the rather obscure sister series to Touhou, Seihou Project) that can be adopted once all these conditions are met:

  • The player is at ||10 Hearts|| with her
  • The player has to witness her ||10-Heart events (a multi-parter that spans through several days)||
  • The player must have at least ||7 Hearts|| with ||the Wizard||
  • The player should ||have their Farmhouse at least level 2 (the upgrade that allows children)||
brittle pasture
#

an HMK content pack is just a CP pack

#

so it can just be one mod

low marlin
brittle pasture
#

you can organize your patches however you like

#

as long as it's either in content.json, or a file imported by it

lucid iron
#

Then put that include within a When HasMod: me.HMK

#

These are just general tips applicable to any kind of cp add on framework

dusk mulch
#

Why is this happening? Each layer on mine layout 46 has a different brightness/transparency but it onlt appears when I select the layer.

#

It happens on any map actually

#

oh it was a weird setting i turned on by mistake

rotund elm
#

Heyo, I have a quick question about portrait commands in dialogue, for quest dialogue specifically. So here is the first part of my i18n string "CarolineQ1_reaction": "Oh!$h# Is this really a Deep Sea Halibut? and when it shows in-game it only shows "Oh!๐Ÿช™h" and then it doesn't show the rest of the dialogue. I'm looking at the wiki, specifically the example given and I am really thrown off. It looks the exact same. I was under the impression you could use portrait commands in i18n strings, but the only thing I can think of causing the issue is that I used portrait commands in i18n strings ๐Ÿ’€ I am really perplexed. I also looked at a few other mods for reference and they do the exact same thing in their i18n files. I tried using the numerical id but that did the same. I removed the # at the end of $h and $1 and got the same issue.

tiny zealot
#

are these lines supposed to be in separate dialogue boxes, or the same one?

#

i.e. are you expecting "Oh!" (pause for input, new text) "Is this really a deep sea halibut?"

low marlin
rotund elm
#

Not really, it should just be one, so interestingly enough I switched to the $s for sad portrait and it then showed the rest of the dialogue but still with the ๐Ÿช™s showing, and it still showed the nuetral portrait

#

so it only cuts off when using the $h or $1

tiny zealot
#

the # is the problem. that's the separator for dialogue strings

gentle rose
#

pretty sure portrait commands need to go at the end of the line?

uncut viper
#

portrait commands can go anywhere

tiny zealot
#

i think they can come earlier but in olden days end was required so it's customary by now

rotund elm
#

Ok so it is the placement of them I see

tiny zealot
#

or at least i think that's how it was

gentle rose
rotund elm
#

No that makes sense now as to why it was cutting off weird

gentle rose
#

but no, ichor says it's the # not the placement

uncut viper
#

its Dialogue.checkEmotions() and all it does is do text.contains and then text.replace

dusk mulch
#

alot of my maps are using a load action instead of a mapedit because they need to be resized, so im putting the map with my bit attached to it into the mod, that isn't the same as just putting the vanilla map into the mod right? like ill be fine?

tiny zealot
#

EditMap can resize a map (to the right and down) if you go past the normal boundaries

dusk mulch
#

it is to the up and left

uncut viper
#

(placement didnt seem to matter in 1.5 either, judging by my old gift taste portrait command mod)

tiny zealot
#

are you sure you want to extend a vanilla map up and left /lh

dusk mulch
#

its in the mines

gentle rose
uncut viper
#

They are replacing mineshaft maps

#

They are more okay to go up and left in with a complete replace

tiny zealot
#

oh okay go for it then lol

rotund elm
#

So this should be correct to end with a pause "CarolineQ1_reaction": "Oh! Is this really a Deep Sea Halibut? It's perfect!$h#$b#

dusk mulch
#

im just making sure that its not too similar to the vanilla map and im just throwing game files into my mod

gentle rose
#

I think fighting controller support took away all my thinking capabilities for today tbh

brave fable
#

yep, no hardcoded coordinates to worry about for non-chest maps. elevators, ladders, forage, rocks, breakable containers, and monsters are all dynamically placed

uncut viper
rotund elm
#

There is, I am restarting my instance rn to double check the dialogue for that quest cause I used reload_i18n and still was running into issues, which I assume were because I needed a restart

uncut viper
#

to actually answer though Person you're fine tbh

dusk mulch
#

cool, ty!

uncut viper
#

dw about it

uncut viper
rotund elm
#

Ok so with this setup the ๐Ÿช™h still shows "CarolineQ1_reaction": "Oh! Is this really a Deep Sea Halibut? It's perfect!$h#$b#Pierre won't try new foods very often, but I bet he'll love this. I'll make my special halibut roll tonight!$b#Thank you so much, @. As soon as I write the recipe down, I'll send it to you in the mail!$h#",

gentle rose
#

you don't need the #, like ichor said

#

(the last one)

rotund elm
#

Oh my bad, I thought that was only for the way I had it setup

uncut viper
#

well that dialogue shown in the picture isnt the last line anyway

gentle rose
#

yeah unrelated

ivory plume
gentle rose
#

-# is there a way for splitscreen player 2 to use console commands

uncut viper
#

yes but i forget

#

debug commands might all take in a last arg of screen index?

#

(im not sure why the emotion thing is doing that Aztec, sorry)

ivory plume
gentle rose
#

ah, ty both

rotund elm
#

it's all good I will keep playing with it, I appreciate everyones help tho! I was able to get a little further understanding it so thats great :]

gentle rose
#

...huh. idk if this counts as a bug or not, but debug child screen=1 resulted in the child having different skin colours on each screen SDVpuffersquee

tender agate
#

think its an entirely different baby, different eye colors too (blue v brow)

opaque cobalt
#

For appearance modding, lower precedence number takes priority correct? So if two mods make appearances for the same character, the one with the lower number wins correct?

lucid iron
#

If the other conditions are true yep

tranquil hamlet
#

Am I somehow missing it, or are planted powdermelon seeds missing from the save file somehow? I've written a parser for the save file and the powdermelons on my farm aren't in it. I'm checking manually and indeed can't find it. Are they stored differently?

jaunty shuttle
lucid iron
#

Are you assuming number itemid

tranquil hamlet
#

No, I know the 1.6 crops have their own name as the ID. I searched that way, and by looking at farm coordinates

#

False alarm. I think my IDE was showing an outdated save file despite reloading earlier shadeembarassed

#

It didn't make any sense because it was completely false! ๐Ÿ˜‚

lucid iron
#

There is actually one possibility but it's pretty unlike for a vanilla crop

#

Anything using spacecore save serializer stuff would go in that separate json than the main safe

tranquil hamlet
#

Oh interesting, I wasn't aware of that framework. None of my installed mods must be using it because they save their data in my save file without any extra files, which I absolutely love because I'm constantly switching between two different computers.
CA is the ๐Ÿ for writing save data as plaintext XML to make mod features like that easier.

uncut viper
#

its the 7th most downloaded mod on nexus

#

but a mod using spacecore doesnt necessarily mean it uses the serializer portions of spacecore

#

but spacecore is required if any mod wants to save a custom C# type alongside the save file

lucid iron
#

Yeah but how it works is basically the problematic xml bits are in a json besides the actual save

brave fable
#

i forget, is there a stardewxnbhack param to ignore language-coded files (e.g. springTown.ja-JA.png)?

uncut viper
#

no ๐Ÿ˜Œ

#

the only arg, afaik, is the one to omit default fields

lucid egret
#

If i want to convert tbin files to tmx, is it as easy as choosing to export them in tmx format in Tiles?

#

cause when i tried that the whole game crashed when trying to draw the map

opaque cobalt
#

is this valid formatting or do I need to write it differently? Been a while since I've edited Json files

"When": {
"Penny Hair Colour and Elf Ear": "Auburn and Elf Ear" or "Auburn"
}

tiny zealot
#

not valid

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

opaque cobalt
#

okay, thank you.

brave fable
#

(key-value pairs can only have one key and one value. you can't have two strings as a value, unless they're included within a list used as the value. 'or' is not valid json in any case)

ocean sailBOT
#

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

latent mauve
#

Ooh, DivideByZero

latent mauve
lucid egret
vernal crest
#

!tilesheetinator

ocean sailBOT
#

You can use the Tilesheetinator tiled extension to create Stardew Valley maps that work in-game without having to copy vanilla and modded tilesheets back-and-forth, rename files with a . in front of their name, edit maps only in the unpacked content folder or make symlink workarounds.

See the mod page for full installation and use instructions.

vernal crest
#

Tilesheetinator makes it much easier to handle tilesheets because you can add them to the map without having to move them into the map folder (or move the map to the tilesheets folder).

vernal crest
lucid egret
#

Ah okay, thank you for confirming that its a problem on my end and for the extension link! I tried to avoid getting too much into learning how to map edit but I suppose it was inevitable.

lucid egret
#

yay i did it

ornate locust
#

I guess I'm already doing another mod... one I'll need compatibility patches for MY OWN mod with, no less

#

be free, George

vernal crest
ornate locust
#

The rail's the only non-vanilla tile, so it'll be generally recolor compatible. the only compatibility fight is gonna be with other mods... but I've already been through that song and dance with Pelican Town Municipal, so I know where to look anyway

weary sail
#

where should i start looking to figure out how to remove specific object types? or maybe an array of coordinates within a specific location?

weary sail
#

i actually did it, it did what i wanted it to

#

(yes i forgot my breaks before)

urban patrol
#

can you escape square brackets? i'm trying to do
"Spiderbuttons.BETAS_RandomAction [ \"spacechase0.SpaceCore_TriggerSpawnGroup {{ModId}}_SingleMiseryWraithSpawnGroup Here [Spiderbuttons.BETAS_NumberOffset [Spiderbuttons.BETAS_CharacterCoordinate Farmer X] -1],[Spiderbuttons.BETAS_NumberOffset [Spiderbuttons.BETAS_CharacterCoordinate Farmer Y] -6]],1,1\" ]" but it doesn't like the first ]

vernal crest
#

You can escape anything (edit: I say this tentatively because I've been able to escape various things but I don't actually know the programming behind it)

#

Whether it'll parse it in the order you want it to ๐Ÿคท

urban patrol
#

it didn't like it ๐Ÿ˜… i don't blame it i don't like it either lol

#

if content patcher could just get and store current player coordinates, or coordinates of tile data in a location, all my woes would be solved

spice nacelle
#

Hello I am learning to use Harmony transpiler
How do I codematcher for this
If I can match I can move around with .Advance() right?

#

I thought maybe like this But it's just error because not matching

#

I copy these from wiki and then edit some of them

gentle rose
#

not strictly related but if you give variables descriptive names rather than AS1 etc it will be easier for both others and your future self to read (I still kick myself for every time I go to old js code and find three letter variables I have no idea the meaning of)

#

you also arenโ€™t doing anything with modifyInfo (nor do I know why you would need to use AccessTools to get a method from your own mod tbh)

#

youโ€™re using PropertyGetter, are you sure all of those are properties and not fields? the fact theyโ€™re loaded via an Ldsfld opcode implies field to me

spice nacelle
#

this mod is not complete yet I will remove unnessessary things later

weary sail
#

i specifically want to create an unbreakable world object

gentle rose
#

like the bushes?

#

Iโ€™d imagine that would be an Item, not an Object

weary sail
gentle rose
#

an Object is a type of Item but not all Items are Objects, yeah SDVpuffersquee objects are mostly โ€œregularโ€ things you can have in your inventory

#

(but also not sometimes)

vernal crest
#

@whole raptor I just used your i18nifier for my config (excellent, thank you) and noticed that you don't include the description field for config options, only for sections. I'm curious why that is?

slow bough
#

Hi all, trying to make a mod to programmatically replace the fireplace "fire animation" sprites using SMAPI. The replacement has to be on a per-object basis (so no Content Patcher). Do I have any other options that are less heavy-handed than replacing the entire Furniture.draw method with Harmony, or is this maybe the only way?

#

I don't even think I can replace the texture with a drop in on a per-object basis because the texture is Game1.mouseCursors which I assume is shared by all objects globally

woeful lintel
#

You can use FF if you're willing to read some docs, but yeah, otherwise you'd have to harmony patch Furniture.draw

#

as you've probably seen, all torches and fireplace furniture are hardcoded to grab the fire sprites from cursor

#

I guess you could make a non-fireplace furniture and harmony postfix Furniture.draw to manually draw the fire yourself, but you'll also have to manually add the light source I think?

#

If I remember correctly, only torches and fireplaces have a hardcoded toggleable light

#

Looking at the fire draw code, it might be realistic to transpile it to replace the reference to cursors and the source rectangle but that would be quite the undertaking

sleek flint
#

how?

vernal crest
#

It also has crutches with the intent of adding more mobility aids in future

merry river
#

Is CC required to make an antisocial NPC or is there another option that doesn't require me to add another dependency? I remember reading something somewhere but I could be wrong

vernal crest
#

No, all you need for an antisocial NPC is to set their CanSocialise field to false

#

Otherwise they're basically normal NPCs (with fewer requirements, like no need for gift tastes if you don't intend to use CTs or location dialogue for them)

merry river
#

Do they need gift tastes regardless to exist - oh

#

so if I want them to be able to have CTs I could simply add 1 gift taste and it'd work?

vernal crest
#

Yep

merry river
#

cool! thank you SDVpufferheart

vernal crest
#

Or even just give them an entry with the gift sections empty and they'll just use the universal likes

leaden cave
#

Hello everyone

leaden cave
#

Is there a page in the wiki or a site in general that has all of the item ids?

ocean sailBOT
leaden cave
#

Thank you, I really appreciate it SDVpufferheart

spice nacelle
sleek flint
spice nacelle
hard fern
spice nacelle
#

I use .RemoveInstruction() and insert new instruction and got the problem

#

Help?

lucid iron
#

Did you make sure your stack is the same

spice nacelle
#

What is stack

lucid iron
#

When instructions are moving the args get pushing onto stack and popped off to be used for function call

#

Hm if you just want to zero it you don't have to remove instructions you can just find the right operation and change it to 0

#

*change operand to 0

spice nacelle
#

like this? Still got error.

lucid iron
#

No on a different line

#

Though hm i suppose that doesn't matter cus matcher is returned

#

Is your error at patch time still?

spice nacelle
lucid iron
#

I feel like it threw at the matching part then

spice nacelle
#

What should I do now. I'm lost. Rewrite CodeMatch?

#

If I have some examples It would be great

lucid iron
#

Well I don't have the bit of IL you want match open on hand

#

But I'd double check if you wrote the instructions correctly there

#

There's not much point in using a throwifnotmatch if you aren't going to surround it in a try catch block

#

If you do that then you can know for sure what except is thrown and not crash game

whole raptor
vernal crest
whole raptor
#

Ah, you mean that it doesn't create the empty description for regular config if it does not exist, while for sections it does?

vernal crest
#

Yep

whole raptor
#

Hmm... iirc I made it like this cause I don't think you can even add descriptions to sections in config schema? SDVpufferthink So it either has to be there always or not be there at all.

#

While regular descriptions can be manually added, which then it just converts what already exists

vernal crest
#

Fair enough

#

I don't see the point in using the Description field in the ConfigSchema because it's just extra steps to achieve the same goal

#

But I don't mind doing my i18n keys by hand for the description. It's what I usually do.

whole raptor
#

I agree, but it is a converter after all ๐Ÿ˜…

#

And I don't think descriptions are always needed, so it'd be a pain if people had to delete them either way

#

Maybe I should add some kind of settings to some of the pages... but it sounds like work SDVpuffersquint

vernal crest
#

I always give all of my config options descriptions lol

#

But not always the sections

vernal crest
whole raptor
#

Maybe someday hah

weary sail
#

anyone know why this (butchered) line might be running be showing no errors but not causing any effect in game?

Game1.getLocationFromName("Farm").setObject(new Vector2(Game1.getFarm().getWarpPointTo("FarmCave")), ItemRegistry.Create<StardewValley.Object>("(O)128"));
mighty quest
#

I would break it down doing one thing per line, then breakpoint into it

#

not sure why you use getLocationFromName then getFarm

weary sail
#

got it working, ty

merry river
#

PSA: Updated my mods, Pei Ming is now compatible with Lunna, yippie! And there's a new event as well. (I have no idea where to put update announcements, so, uh. Yeah.)
https://www.nexusmods.com/stardewvalley/mods/39402
https://www.nexusmods.com/stardewvalley/mods/40998

Nexus Mods :: Stardew Valley

Adds the ancient, overly cocky, and flirtatious deity Pei Ming (who happens to never shut up) to Stardew Valley! Includes two different types of roommate behavior, randomized dialogue, adjusted schedu

Nexus Mods :: Stardew Valley

This mod adds the new custom crop Northern Heart Melon, including new recipes and artisan goods.

pine elbow
#

For some reason despite my Texture files being named EXACTLY as they are, and named properly they still refuse to load and gives me the "asset doesn't exist" error

#

Like even though I set the sprites up perfectly, like COPIED AND PASTED the lines that DID WORK the two error sprites still show themselves

#

maybe one of you can see what I am failing to see

pine elbow
#

one sec

#
[game] Failed loading texture Mods/JBGrasshopper.HumaneHusbandry/Chevon for item (O)JBGrasshopper_Chevon: asset doesn't exist.
[game] Failed loading texture Mods/JBGrasshopper.HumaneHusbandry/Mutton for item (O)JBGrasshopper_Mutton: asset doesn't exist```
#

this is the log

lucid iron
#

Did you load 2 textures to the same name perhaps

#

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

lucid iron
#

Pls send full log either way

pine elbow
#

like the ENITRE SMAPI log for the playthrough?

#

What do you mean by "Full Log?"

gentle rose
#

yeah, the entire smapi log

#

in the log validator linked above

woeful lintel
#

having a patch summary in there would also be nice

pine elbow
ocean sailBOT
latent mauve
#

You mentioned naming your files exactly, did you Load them, or are you trying to use them from the mod folder without using a Load action?

woeful lintel
latent mauve
#

I only ask because Textures require a game asset, not just the file in the folder, so they have to be Loaded to the desired texture path or use {{InternalAssetKey}}

#

Ah, apologies, I missed that post

#

(I'm on mobile so my finger probably hit the same file link twice)

woeful lintel
pine elbow
woeful lintel
#

just type this in your console

pine elbow
#

type patch summary in the SMAPI Console in game?

latent mauve
#

The Load has /r /n markdown in it for those assets, so they might not be loading correctly

#

Target": "Mods/JBGrasshopper.HumaneHusbandry/chicken,\r\n Mods/JBGrasshopper.HumaneHusbandry/pork,\r\n Mods/JBGrasshopper.HumaneHusbandry/beef,\r\n Mods/JBGrasshopper.HumaneHusbandry/mutton\r\n Mods/JBGrasshopper.HumaneHusbandry/chevon,\r\n Mods/JBGrasshopper.HumaneHusbandry/duck,\r\n Mods/JBGrasshopper.HumaneHusbandry/rabbit",

pine elbow
woeful lintel
#

the others are working though, so that would be weird

latent mauve
#

Yeah, it is weird that it's only a partial failure

woeful lintel
pine elbow
#

where is the log praser?

latent mauve
#

Mutton is missing the comma after it

pine elbow
gentle rose
latent mauve
#

Mutton and chevon would both be broken because of the missing comma

pine elbow
#

the woes of being a programmer

latent mauve
#

I only looked because of the unexpected /r and /n, but it was definitely a comma error xD

#

The commas get us all, eventually

subtle condor
#

I got my custom totem to work perfectly fine as well as changing the vanilla's totem's coordinates. However, there is only one problem. I am basically running my code, whenever I am holding my item in my hand and I press the Action Button. The problem is, this also triggers when I press rightclick while in my inventory or even when I hold my totem and rightclick the TV or the mailbox. Does anyone have any idea, how to prevent that? XD (I found a solution)

#

Currently, I basically copied all the code for the animation and stuff. I could mayyybe put my totem into the game's performUseAction function via harmony patches? That's the only idea I have rn. But I suck at harmony patches XD

pine elbow
#

This is what I want my Meat Quality system to be like is there a way I can do this while having it remain optimised Code wise?

small kindle
#

I have a bit of an odd one. I made working on a sprite mod to genderbend Shane and I want to load their sprite I made them during the "Success" cutscene whenyou finish the JojaMart path. I cant find anything on that, I am pretty new to this but I am pretty sure the event id is 502261, do I just load the sprite similar to like when he is passed out? Thats my first thought but I am not sure what the target path is or how to find it

autumn tide
#

the sprite can be found in cursors :)

#

OH misread-

#

hehhh

ornate locust
#

municipal ramp compatibility, part 1 of the RAMP COMPATIBILITY SAGA

#

more mods do little things to this one staircase, I swear

#

I think I'll separate each staircase's map patch into its own JSON for sorting purposes. And if Pelican Town Municipal is installed, it'll shut off the JSON for this one staircase since I have to do so much compat for it on the other end. I'll just handle it over there.

#

otherwise I'm gonna have a bunch of my own patches dueling

deep cypress
#

Hai!!! Sorry for the delay. The fixes are on the Github. (I left the old prefix in place, in case you are seeing it and wondering, it is just not referenced. I leave those in case either I want the code later for some unknown reason, or else, so one of us Aprylls knows what is going on).

lucid iron
#

Since it is git remember you can always check out previous commit Dokkan

deep cypress
#

Yes, that is true, but that layer of abstraction whirls me when I get into a frenzy!

small kindle
#

Actually update to my question I think I figured it out, I would need to make a seperate thing as it is in the courer file. Is there an easy way to figure out the position, the x, y, width, height, I need to load it properly? Because If not I dont think im going to bother lol

ornate locust
#

and it looks like I can just turn off patch 4 for SVE because it already ramps there, nice

deep cypress
ornate locust
#

But I'm also gonna have to do Joja Town Versions of some of them because they pave stuff. SDVpufferflat

brittle pasture
#

each modifier can be "if input quality is x set quality to y"

vale stream
#

https://www.nexusmods.com/stardewvalley/mods/41274

Finally ported A Rotten Constellation to 1.6. Some new features included!
In this mod, you must travel through two realms to stop the world from collapsing.

(Originally made for SDV server's 2023 mod jam)

Nexus Mods :: Stardew Valley

Remake of 'A rotten constellation' for 1.6. You must travel through two realms to stop the world from collapsing.

#

Now that this is done, all that's left is... bugfixing ItemExtensions, bugfixing Start in Ginger Island, and releasing a little project i've been working on for years SDVpuffersmile

(but that last one might take me another month SDVpufferchicksweatsip)

leaden cave
#

Looks amazing! SDVpufferheart

vale stream
#

Thank you! SDVpuffersmile

leaden cave
vale stream
leaden cave
vale stream
ornate locust
#

You can do a lot with Content Patcher. NPCs, buildings, all kinds of stuff

leaden cave
#

Nice!

vale stream
#

(For context: This is an event like any other you'd make in CP. It uses a data model to get the objects, and the timer is optional SDVpuffersmile. I also made it so the core lets you add custom hoe dirt texures, custom backgrounds (like in the north of the island), add critters to locations, fishing overides/conditions, and other stuff)

upper forum
#

So quick question, I'm trying to playtest a mod and was wondering if there's any console command or way to find the name of a given location? Trying to get custom sprites for an event to work and I think I might have the location name wrong

lucid iron
#

A 2nd cake to backgrounds yay ukimasu

upper forum
#

like can I find out the location name of the place where my character is standing at the moment?

lucid iron
#

I did always think the mmap one is 3complicated

upper forum
#

what command should I use for that? I've used debug commands before but not familiar with all of them

plain breach
#

Hellooo!

lucid iron
#

As in the mod named that

#

You install it and press tilde key

upper forum
#

ohh, not the debug commands in SMAPI lol

#

awesome, thanks! I'll try it out and see if that's what I'm getting wrong lol

lucid iron
#

There's a few other ways too

plain breach
#

I don't know if you can help me (not by doing it for me, just giving me an idea or some guidance), but I want to modify Robin's construction menu.
My mod puts two farms in the same game. The idea is that player 2 only modifies the second farm and the main player modifies the first one, but when I go to Robin, I get the option to choose which farm to use, and I want it to be individual with no option to edit the other player's farm. I really don't know how to do it, because the SMAPI documentation is sometimes unclear about certain things.

lucid iron
#

For example you can do debug where npc to find where they be

#

But i like debug mode cus it's easy toggle

upper forum
#

ooh I wonder if that works during events?

lucid iron
#

Also does a few other nice things like detect current dialogue key

upper forum
#

trying to see if this custom event has a location name that isn't just "temp" lol and that's why my custom portrait isn't working

#

hrm, the debug command doesn't seem to work for events, rip

#

i'll try debug mode

brittle pasture
#

we don't really have documentation on the code other than reading it, since we're all illegally digging around in mr ape's backyard here

#

if i were to do it i'd probably harmony patch GameLocation.isBuildableLocation to return false if it's a farm that doesnt belong to the current player, though I'm not 100% sure that would not have other side effects

#

it's probably fine but still

#

you can also probably detect that the current menu is a paged menu asking where you want to build and remove entries after the fact

upper forum
#

Ok so I'm kinda stumped here, and wondering if anyone could possible point out what I'm doing wrong. I'm trying to create a custom HD portrait for a modded NPC, and I'm using HDPortrait's framework (which Portraiture supports) because that seems to be the only way to use HD portraits with custom tags, which most custom NPCs use. Everything's working fine for the seasons and indoor/outdoor stuff, as well as the vanilla events like the egg hunt or spirit's eve. my issue is in custom events that the mod creates. This is the event, and I'm seeing the Event ID:

#

And this is what I have in my content.json:

#

I have the Lake_Swim portrait loaded in a portraits.json file as well, and all other portraits are working fine with this setup:

#

(This is a custom portrait for Jakk's Quinn)

#

Am I missing something obvious?

tiny zealot
upper forum
#

ohhh. Hrm. I see, that definitely explains it, thank you!

#

Is there another token I can use for custom events like this?

tiny zealot
#

i don't know how quinn is doing the sprite and portrait changes, but if it's using Appearance it may be better to target any alternate assets instead (i'll defer to someone who knows either this mod or how HD Portraits/Portraiture work, since i don't know and i have to go)

upper forum
#

Quinn does indeed use Appearance, which is tricky for me because I don't think HD Portraits uses that framework. It's all old code that is supported by Portraiture

plain breach
#

@brittle pasture Thank you, I'll check everything you tell me.

lucid iron
#

(context is that iro is making new portrait framework)

upper forum
#

ooh, entirely new framework? :O

uncut viper
#

(Appearance isn't a framework btw, that's just vanilla data)

upper forum
#

Oh right haha

lucid iron
#

Yeah iro thing should handle appearances more gracefully than portraiture

upper forum
#

Also, figured out a workaround lol. Just removed the dayevent token and am entirely relying on time, location and date tokens. It's not perfect but is... functional for these specific events

lucid iron
#

I am also working on a spacecore PR that can deal with HD textures easier

upper forum
#

I think I can make it so there's basically no edge cases where the portraits would appear outside the events, but hard to say for sure

lucid iron
#

It would mean u don't think about the conditions at all

upper forum
#

ooh that'd be amazing lol

#

I'm really an artist who is desperately banging rocks together whenever I need to write code, even though I know this is baby-level stuff ๐Ÿ˜…

lucid iron
#

It is in a state that u can try but the risk is ofc I don't control the release of spacecore

upper forum
#

is it published on nexusmods? :o

lucid iron
#

No it's a pull request

upper forum
#

ahh

lucid iron
#

So a new feature to spacecore

upper forum
#

so not yet useable for general users who might download my mods from nexusmods then

lucid iron
#

Yep hence why the warning

upper forum
#

still cool! can't wait for it to come out

lucid iron
#

It is possible to do it now but you have to write more json

#

Current sc hd textures require you to specify exactly where each portrait is on the texture

#

Either way i think iro's thing is more fit for the portrait usecase