#making-mods-general

1 messages · Page 346 of 1

gloomy bane
#

Hi guys! for some reason I'm trying to change the location inside George and Evelyn's house...

#

/changeLocation JoshHouse/warp farmer 16 16/faceDirection farmer 2/fade unfade viewport 64 15/ But I always ended up with black screen

vernal crest
gloomy bane
#

Thanks! It worked but farmer didn't warp to the place I want her to be for some reason. T.T

past knot
ocean sailBOT
#

Log Info: SMAPI 4.2.1 with SDV 1.6.15 build 24356 on Microsoft Windows 11 Home, with 4 C# mods and 6 content packs.

vernal crest
#

Tilesheet climbing

#

Your tilesheets have to be in the same folder as your map while you're editing the map in Tiled

#

We have a command about it but I can never remember it

finite ginkgo
#

!tilesheetclimbing

ocean sailBOT
#

When creating or editing maps in Tiled, one common error is tilesheet climbing, marked by red text containing "invalid tilesheet path '../../..'. This is caused by SMAPI not being able to find the tilesheets needed by the map file. To prevent this error, make sure that you have a copy of all necessary tilesheets in the folder containing your WIP tmx file. Copies of vanilla tilesheets can later be deleted, but must be present while working on your map.

If you get this error with a completed map, an easy way to fix it is to open your tmx file in VS Code or a similar text editor, find all of the places with <image source=, and remove the filepaths to so that only the tilesheet names remain. For example, if the code says <image source="Content (unpacked)/Maps/townInterior_2" width="512" height="64"/>, change it to just <image source="townInterior_2" width="512" height="64"/>.

timber plover
#

ITS WORKS AGAIN THANKS TO LILY <3......i actually broke it myself with a tiledata on the map...(which i forgot i did )

#

Q.Q

gloomy bane
#

Can you recommend me some tool that checks the tiles of the game? Before, I'm using debug mode but it seems that it's not accurate anymore

gentle rose
vernal crest
#

Debug Mode is affected by zoom, iirc

#

You can also always open the map and check in Tiled

blissful panther
unique sigil
#

quick question, why are you adding PetBowlLocation via CP? (that is why the latter format is correct, because you are trying to, i assume, adding that map property via Action EditMap, and that format is the correct format for a nested key/value i.e. using curly brackets. the [] brackets are for arrays)

you can just put PetBowlLocation as a map property in the .tmx file like so. the wiki format listed is for this method, you only type the numbers without the brackets.

#

then again even in CP it should still be

"MapProperties": {
    "PetBowlLocation": "60 14"
)```
past knot
vernal crest
vernal crest
past knot
#

Heres the full updated log and i am actually going to LOSE IT

ocean sailBOT
#

Log Info: SMAPI 4.2.1 with SDV 1.6.15 build 24356 on Microsoft Windows 11 Home, with 4 C# mods and 6 content packs.

pine elbow
#

ty!!! Super appreciate you and Button
not sure if she's okay with getting @'d soSDVemoteheart

vernal crest
past knot
#

OH im so sorry i didn't know

vernal crest
#

It says there's a tilesheet called Walls.png used in the map but it can't find it. Is that a custom tilesheet of yours?

past knot
#

It WAS but that entire tilesheet was replaced

vernal crest
#

Oh, you actually have three different errors for three different maps here.

#

Oh no, two.

#

I suggest you set one aside and just try to fix one at a time.

#

It looks like your Custom_Hallway.tmx still has the Walls.png tilesheet in it.

past knot
#

Thats so odd, let me see if i can fix those then lol

gloomy bane
#

Is it possible to add more actors in cutscene instead of 2 characters? in events?

vernal crest
#

Yup you can have as many characters as you want. Just add them in the third event command the same way you add the first two.

sand wigeon
#

Is it possible to make an item in a shop a once-per-save purchase? I'm looking through the modding shops page on the wiki, but all I can find is the AvailableStock value which it says is per day.

vernal crest
calm nebula
#

I would be careful with once per save purchases

#

If thr player could possibly lose the itdm

lucid iron
#

lost item shop DokkanStare

vernal crest
#

That's where you put the console command to cheat for it in your mod page and then ignore everyone forever

lucid iron
#

yea use some kinda mailflag is the rec

sand wigeon
#

Thanks, i'll try that

lucid iron
#

what is the item tho?

sand wigeon
#

One thing I want to do with it is make the Joja vending machine buyable on the CC route, but only once

calm nebula
#

Oh that's fine. I was more thinking quest items

lucid iron
#

hm i have idea what if u just conditionally edit the entry for (BC)117

#

in Data/LostItemsShop.json

#

just changing RequireEventSeen from 502261 to 191393 should let you buy soda machine from crow as if u did joja route?

sand wigeon
#

That could work too, thanks

dusky marsh
lucid iron
#

yea sure, give mod link + blurb

sand wigeon
#

While i'm here I also want to ask, can a shop item have multiple conditions or is it just one? I'd been meaning to test that myself but I think asking here would be quicker.

dusky marsh
#

thank you 🙏

#

Have you ever regretted using the wrong item on a machine?
This mod allows you to cancel a machine's production and retrieve the item you put inside. (By right clicking, or breaking it)
Works with any vanilla or modded machine.
Optionally, you can choose when you should be able to get the items back, only before 30 or 50% of the production is done
https://www.nexusmods.com/stardewvalley/mods/35013

Nexus Mods :: Stardew Valley

Allows you to cancel a machine's production and retrieve the item you put inside. (By right clicking, or breaking the machine)

vernal crest
sand wigeon
#

Alright, thanks again

past knot
#

AUGH FINALLY I MGOT IT THANK YOU ABAGAIANYE the only issue im having now is trying to get the tiles to work with recolors

vernal crest
gloomy bane
past knot
vernal crest
past knot
#

Yes

vernal crest
#

That's why they aren't recolouring. Tilesheets in the map folder get used first and only if they can't be found does SMAPI go looking in the game's contents for them. Remove them.

(Alternatively, you can keep the tilesheets in the folder in a way that they work for Tiled and for the game if you put a dot in front of their names and then add them to the .tmx. SMAPI will ignore the tilesheets in the folder and use the ones in the game contents instead.)

past knot
#

OH

#

THANK YOU SDVpufferheart

vernal crest
#

You're welcome!

past knot
#

iM SO SORRY i am clueless but the other issue aND THANKFULLY LAST is that in every interior it is dark. Did I need to set the map properties for Indoors T on the,?

#

Them*

vernal crest
#

No, maps are treated as indoors by default I'm pretty sure. I think vanilla interior maps just use a truckload of light map properties and/or light tiles on the Paths layer. Sometimes I use the AmbientLight map property to adjust the lighting too.

gloomy bane
#

Is textAboveHead is only available for NPC?

vernal crest
gloomy bane
#

Yeah, I actually tried it doing it for my Farmer but [game] Event '777714' has command 'textAboveHead farmer It's okay' which couldn't be parsed: no NPC found with name 'farmer'.

hard fern
#

Yeah im pretty sure the farmer isnt allowed to talk

royal stump
#

yeah, textAboveHead as a mechanic is implemented on NPC, which Farmer isn't (and which is also what the event command looks for, so it won't grab the farmer)

gloomy bane
#

Huhu too bad! anyways. Thanks! It's been a while since I've messed with content patcher

left nova
#

Since the actor is invisible, it'd look like the farmer are actually speaking that text.

gloomy bane
#

ohhh I see.. Thanks. There's a lot of new Alias I just noticed

#

The dating is now D instead of o am I right?

vernal crest
#

Nope

#

Use the full words now

#

Shortform aliases are deprecated and should be avoided

gloomy bane
#

Ohhh Wait... where do I need to add them? Like smoonlightJellies/7 9/farmer 64 15 2 Sebastian 64 14 0/Dating Sebastian Or "77777/f Sebastian 2250/w Sunny/e 77771/Dating Sebastian/t 600 1000"

vernal crest
#

In the preconditions - and fix all of them and the event IDs (if they're entirely your events rather than you editing existing events from vanilla or another mod). It should be:
"{{ModID}}_GiveThisEventAProperStringID/Friendship Sebastian 2250/Weather Sunny/SawEvent {{ModID}}_TheEventBeforeThisOne/Dating Sebastian/Time 600 1000"

gloomy bane
#

Ohhh so they are all full instead of just 1 letter?

vernal crest
#

Yes. You should not be using any of the single letter ones anymore.

#

(And change your event IDs! Please!)

sand timber
#

I'm making a custom floor type, but when I remove the mod, any save that had used this floor crashes back to the title screen. However, I’ve tried other people's custom floor mods and their floors can be safely removed without breaking the save. Does anyone know what might be causing this?

vernal crest
#

Is your custom floor done exactly the same way as the other ones that aren't crashing?

sand timber
#

I actually followed their structure when writing mine, but I’m not sure which part specifically prevents the crash. I might be missing something subtle.

stark spindle
#

do you have a log for the crash?

lucid iron
#

oh im pretty sure that is just how custom floors be like

#

if they are entirely new floors

#

u will have to add mod back and then remove all placed floor then u can safely uninstall

sand timber
#

oh I see

lucid iron
#

its unfortunate really, i hope to bring it up for 1.6.16 eventually

stark spindle
#

thats a pain

sand timber
#

Thanks for the explanation! That's really helpful—though yeah, it's definitely not very convenient.

lucid iron
#

hrm i wonder if i can at least fix crash

vernal crest
#

Shouldn't the other ones be crashing if they're also adding new floors?

lucid iron
#

if they r AT then its fine i think yggy

#

or if they r just never placed

#

i dont have full knowledge to say

vernal crest
#

But they said they're copying the other mods.

lucid iron
#

iirc the problem specifically arise when you have placed floors

vernal crest
#

That's why I didn't say it was the floors crash thing that you mentioned in your channel in SMC.

#

I assumed they were placing the floors from the other mods as part of their comparison, but I may be assuming incorrectly.

lucid iron
#

but yea i know for sure that Flooring.GetTexture is not very safe here

#

so perhaps ill just patch that until 1.6.16 3sSmolMiku

stark spindle
#

If I wanted to add a single shirt item to my mod, what's the best way to go about that? I keep seeing people changing the sprite sheet but that doesn't seem great for mod compatibility.

lucid iron
#

u can add new shirts now psure

#

this one's cp but u can do same thing in c# if you want

stark spindle
#

o great thanks ill take a look

vernal crest
#

(Not saying you are wrong, just confused about how it could affect one mod but not another without there being differences between the two mods. Which leads me to think that there may be differences and that perhaps monday could use that to find a workaround for their mod before 1.6.16 arrives.)

lucid iron
#

well im skeptical of the premise that "it didn't happen with other mods"

vernal crest
#

(And that difference may be that they didn't test them the same way lol)

lucid iron
#

but shrug its a fairly easy to repro thing Dokkan

dusky marsh
#
configFilePath = Path.Combine(folderPath, "Mods", "RangedTools", "config.json");
jsonString = File.ReadAllText(configFilePath);
using JsonDocument doc = JsonDocument.Parse(jsonString);
JsonElement root = doc.RootElement;
if (root.TryGetProperty("AxeRange", out JsonElement toolRangeElement))
{
    toolRange = toolRangeElement.GetInt32();
}

is there a better way to get another mod's config? this way if someone rename the folder, it wont work

sand timber
#

That makes sense. I tested both mods myself, but it’s possible I accidentally placed one of my floors and forgot about it.

vernal crest
#

By the way, by custom floor do you mean like in the farmhouse or paths?

lucid iron
sand timber
vernal crest
#

Okay that's the type that chu says explodes upon removal

#

And which my game decidedly did NOT just explode upon removing

ivory plume
#

Thanks! For custom chests, one option could be:

  1. In SMAPI's helper.Content.AssetRequested event, have Automate add a context tag like automate_storage to the vanilla items listed in the PR.
  2. In GenericModConfigMenuIntegrationForAutomate.cs, list every item which has that context tag.
  3. In the automation factory for chests, check for the context tag.

That way mods which add a custom chest can just add the context tag, and it'll work with Automate.

vernal crest
#

Now I will try with this Moar Paths mod

lucid iron
#

oh yay is it fixed at some point

#

oh hm

#

aba can u go into my mod and then try deleting the Load for all the textures

#

so that the path itself is a valid item, but the texture of the path is invalid

vernal crest
#

Sure

#

(This Moar Paths one has number IDs SDVpufferpensive)

#

(chu why is your content.json just an include of floor.json???)

#

Oh nooooo it exploded my whole computer and I hadn't saved my aseprite session!!!

sand timber
#

That might be the reason? I only followed the ObjectsData structure in my content.json.

lucid iron
#

oh thats not good i thought it would only explode game...

vernal crest
#

I'm gonna be like one of the kids and send a photo of my computer screen because computer ded.

lucid iron
vernal crest
lucid iron
#

@ivory plume hi pathos can we get handling for bad textures on an already placed Flooring whose data otherwise exist

vernal crest
#

False alarm, ctrl+alt+del and then task manager actually worked for once

uncut viper
vernal crest
ocean sailBOT
#

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

vernal crest
#

ANd json!

#

Ok I learned my lesson and saved my aseprite session

ivory plume
vernal crest
#

So does that mean that アデリー is probably doing some funky texture thing for theirs to be crashing, since just removing chu's path didn't cause crashing?

lucid iron
#

i guess so, perhaps their texture field is incorrect

vernal crest
#

Or conditional in some way that goes funky, for it to be able to be placed originally but then to explode after removal?

brisk wedge
#

How can a mod save its own state? Like say I want to added a new field to an object or just have some piece of information for later use

lucid iron
#

there's a few ways but for adding new field to object modData is best

vernal crest
#

Ok I confirm that Moar Paths didn't explode upon removal either

lucid iron
#

so like obj.modData["cat.ExquisiteMod/SpecialField"] = "1"

royal stump
sand timber
ocean sailBOT
#

Log Info: SMAPI 4.2.1 with SDV 1.6.15 build 24356 on Microsoft Windows 10 家庭中文版, with 95 C# mods and 23 content packs.
Suggested fixes: One or more mods are out of date, consider updating them

lucid iron
#

oh your problem looks different NotteThink

#

AT incompat of some sort

uncut viper
lucid iron
#

did you apply AT on the deleted flooring somehow?

sand timber
#

That’s weird, I gave it a new item ID and didn’t use anything related to AT at all.

#

Could it be related to the "Category" field? I was following the Adventurous Paths mod, which used "Category": -8, but I’m not sure what that means.
Now I noticed that Moar Paths changed it to -24. Could that be affecting compatibility?

lucid iron
#

i dont think that part matters

#

-24 what wood path used so i also just copied that lol

#

since you have no AT packs anyways, try disabling it?

vernal crest
sand timber
#

Yes, I followed the wiki when writing the properties for each new floor.

pine elbow
#

Hi again...does you guys know the max # of values Merge can take? I tried putting in more than 4 and the syntax highlighting immediately turned off🫠 the examples in the doc only have 2 or 3 at most
there's around roughly 8 different outfits I would need to merge
(does query have a max...?)

vernal crest
#

Syntax highlighting in your text editor is not an indicator of whether it'd be acceptable to CP or in game, it's just whether your text editor is able to understand what part of json you're writing.

#

But even then, as long as you're keeping the syntax correct I don't know why your text editor would have an issue with it.

#

Or even how syntax highlighting can spontaneously turn off SDVpufferthinkblob

lucid iron
#

if ur using linkoid's stardew syntax, it could be that the rule didn't account for too many merge

pine elbow
#

oof okay, I'm just using notepad++ because I don't have vscode on this computer rn

vernal crest
#

If the syntax highlighting changed at a certain point, double check that you didn't accidentally do something incorrect at that point. Otherwise...well...as I suggested before you should be checking this with patch parse in game before writing it in your json anyway so you should already know it works xD

pine elbow
#

yeah, I was kind of like ? when this happened lol and just wanted to make sure
I'll be sure to check with patch parse
Ty~

past knot
#

One more thing! Is it possible to add ConditionalDoor or LockedDoorWarp to a tile that..really has no door. Say a tile that the player isnt allowed to passs until set times

vernal crest
#

Yup. LockedDoorWarp will warp you rather than just letting you pass and uses the door sound though so it will be odd without a door. It also has to be on a Buildings tile which would be impassable anyway (unless you set it to be passable, in which case the player could just walk through it even if they couldn't use it to warp).

uncut viper
#

anecdotally, ive also noticed my N++ syntax highlighting just breaks with event preconditions that are too long, so... i think it just breaks with extra long json keys

#

¯_(ツ)_/¯

gaunt orbit
#

Yeah, there's an optional CollisionMask parameter that you can use to adjust what gets checked

woeful lintel
woeful lintel
gaunt orbit
#

FF lets you have furniture with multiple item placement slots, right? How does that work?

woeful lintel
#

Everything is put into a Chest into Furniture.heldItem. Where stuff in slot is drawn is entirely computed from the slot data in the FF Furniture definition (and the Furniture instance position). Placing/removing and interacting with stuff in slots is handled by configurable keybinds, which makes the whole custom slot system separate from the Furniture.checkAction method (where the heldItem stuff is handled in vanilla)

gaunt orbit
#

Awesome, I already am handling chest dumping I think

woeful lintel
#

nice

gloomy bane
#

Hello I'm actually having this [game] WARNING: Mismatched UI Mode Push/Pop counts. Correcting. This error...

lucid iron
#

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

gloomy bane
#

Nope in my Content.json...

lucid iron
#

That's unlikely, but perhaps you put in some data that's invalid

#

Send log and also your json pls

#

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

gloomy bane
#

There is no log appearing. I think there is a problem on fork Coz When I click the answer I want... I'm getting that Error

round timber
#

send the json anyway, and go to this page for the log

#

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

gloomy bane
#

https://smapi.io/json/content-patcher/581574035d8d48d6bb6516a10b3a5581

#

This one?

lucid iron
#

This is your content.json yes, but you should also send log which shows the error

spiral lion
#

hello!
Can anyone spot any error which might explain why my mod item-icon does not work in game?

final arch
#

change the Target in the Load to Mods/{{ModId}}/Objects

uncut viper
#

Target is not automatically namespacewd to anything

#

the Mods/{{ModId}} convention is entirely made up and your Target can be whatever you want it to be

spiral lion
#

ohh thank you!!!

#

It works now thanx ❤️

rapid spire
#

Hi! Does anyone have any experience with converting hairstyles to fashion sense? I have something that should be dyeable but isn’t showing up that way unless I edit every single hair json file. Which I can do, but if there’s an easier way I’d love to know.

dire kestrel
#

it's determined in the json, how many hairs are we talking

rapid spire
#

132

dire kestrel
#

wowie

rapid spire
#

You see my problem

dire kestrel
#

yerp

#

can you send the json

#

and the asset

sand timber
#

You could write a script to batch edit all the JSON files

fossil osprey
#

When you say "converting", do you mean they already exist with another framework?

#

If so, there is a list of converters that may help you

rapid spire
#

It’s just a hairstyle png. I’m using the fashion sense converter on github

visual dirge
#

im trying to patch all occurrences of

animal.friendshipTowardFarmer.Value = Math.Min(1000, animal.friendshipTowardFarmer.Value + n);
```and
```cs
animal.friendshipTowardFarmer.Set(Math.Min(1000, animal.friendshipTowardFarmer.Get() + n));
```to determine how much the friendship overflows (and i want it to work even if another mod adds code that does this)
the `friendshipTowardsFarmer` field is a `NetInt`, so i can put an event handler on it when it changes, but afaik that will fire even if the above code ran on someone else's computer, which isn't what i want
so my plan is:
- postfix `NetInt.Get` & `NetInt.Value get` to record the most recently accessed `NetInt` and clear all other state
- postfix `Math.Min(int, int)` to check when it's used with `1000` and record the other argument and the value it returned (only if we already recorded a most recently accessed netint)
- postfix `NetInt.Set` & `NetInt.Value set` to record the overflow value stored by our math.min patch, if the value being set is the result of the last math.min call and the current netint is the same one that was most recently accessed
this would *hopefully* prevent random math.min calls from triggering this system, because they'd only be counted if they happen between a get and set call on the same netint?
the only problem i can see is that (unlike with the netint events) there's no easy way to know which animal the netint is attached to!
the netint fields are readonly, so i could just have a dictionary from netints to animals, but i'd have to garbage-collect that somehow or it'd keep those animal objects in memory forever
#

so my question is basically: is there a better way to do this? if not, is there a best practice for keeping something like a static Dictionary<NetInt, FarmAnimal> without it being (technically or practically) a memory leak?

#

i'm thinking i should have some code that iterates over the dictionary at regular intervals and removes any animals that don't exist anymore?

rapid spire
spiral lion
#

is it possible to add many conditions to something? Like I want the crispy cookies to be sold wed, sat, sun :-))

dense tangle
#

Can I make a mod that like reskins the town, characters and buildings, and maybe changes dialogue? Not adding stuff, just changing it

calm nebula
#

Day_of_week Wednesday Saturday Sunday

calm nebula
#

But....maybe make those three separate mods

dense tangle
#

Yeah definitely

spiral lion
#

pre-view :)))

toxic gazelle
#

Yo, how do y'all's npc mod folder look like?

flat sluice
toxic gazelle
#

Just want to make sure I didn't miss anything. I have manifest.json, content.json, assets= dialogue.json, marriage, portraits.png. sprites, schedule

flat sluice
#

This is an example, it 100% depends on you.

toxic gazelle
floral stratus
sand timber
#

I haven't started making my own NPC yet, but I’m curious is it okay to reference or include dialogue with characters from other mods? can I freely have my NPC talk to or about someone from another mod?

ornate trellis
ornate trellis
lucid iron
#

It's courtesy to ask the creator of the other npc

#

Especially if it's something involved like crossover event

ornate trellis
#

yeah

lucid iron
#

A simple shout-out not that serious but I'm sure ppl want to hear about it anyways

sand timber
#

Got it, that makes sense

floral stratus
tiny zealot
ornate trellis
tiny zealot
#

so if you're looking for a particular shout-out, many of those are free to use

calm nebula
#

It's also fun to do completely off topic stuff for a CT

#

One of my pet peeves is CT oversaturation

#

Ie. Mod event X happens and then every npc you talk to is talking about it

royal stump
# visual dirge so my question is basically: is there a better way to do this? if not, is there ...

You could try to remove entries for farm animals that no longer exist, but in practice, there are so few animals in the game that I don't think the dictionary could ever eat much memory.
That said, patching NetInt seems excessive, in that your code will run constantly on unrelated fields. I'd lean toward transpiling or postfixing the methods that edit friendship in FarmAnimal and tools, or maybe adding fieldChangeEvents for the specific NetInts. (Never tried using those events myself, but I've seen them recommended...)

visual dirge
#

unfortunately using events won't do what i'm looking for, since afaik they run when the field is changed from network sync stuff too

lucid iron
visual dirge
#

and transpiling the methods in question would be a huge maintainence burden and wouldn't work if another mod implements farm animal friendship changes

visual dirge
lucid iron
#

Gotta be flipped cus FarmAnimal is the weak ref

visual dirge
#

yea

gaunt orbit
#

CWTs are the goat

uncut viper
#

(i still have no idea what a CWT is or how to use them)

lucid iron
#

Well u know what a WeakRef is right

royal stump
#

I've yet to touch them, but I gather they're collections that discard anything that gets disposed of

uncut viper
#

no

#

i dont know what a WeakRef is

gaunt orbit
#

it's like a dictionary but the keys are weak references, so they don't block garbage collection and are automatically removed when the key gets collected

visual dirge
#

adding an extra branch on a static variable to netint.get will probably not be a performance issue, right?

calm nebula
#

My guess is ..... yes

lucid iron
#

Esper did farm animals have an owner field

calm nebula
#

Tbh.

uncut viper
#

i mean that basically doubles the cost of every netint.get innit

lucid iron
#

Yeah can use net event but check that maybe? To only do anything if game1 player is owner

calm nebula
#

(Harmony patching can also add a lot of overhead.)

royal stump
#

net value sets already take non-trivial time in bulk, so I've avoided patching them in the past

uncut viper
#

friendshipTowardFarmer doesnt care about any ownership

lucid iron
#

Hm is the friendship shared then

visual dirge
#

yeah its friendship towards all the farmers collectively

uncut viper
#

yes

visual dirge
#

same as with pets afaik?

uncut viper
#

also yes

lucid iron
#

Ah i see

uncut viper
#

wait no

royal stump
#

yeah, pets share the same field, a single int w/o any farmer connections

uncut viper
#

but pet isnt a netfield

#

is it?

lucid iron
#

I guess u can just only do anything on primary player NotteThink

uncut viper
#

am i misremembering

lucid iron
#

Context.IsMainPlayer or something like that

uncut viper
#

ok yeah im misremembering oops

visual dirge
royal stump
#

yeah, thought so, I saw Pet calling the .Set and such SDVkrobusgiggle

visual dirge
uncut viper
#

i mean i still dont think transpiling methods that call friendshipTowardFarmer is bad

lucid iron
#

But that's netsync'd too by itself so it's fine right

#

I dunno im outside and vaguely recalling decompile over here

visual dirge
uncut viper
#

you can patch every mod in every loaded assembly automatically

uncut viper
#

itd be, yknow, costly, but itd be costly on startup

royal stump
#

patching each base game method is still the only "clean" route I can think of, and monitoring friendship + math.min isn't guaranteed to catch all mod logic either, it's kind of inherently imperfect

uncut viper
#

but also i thought the implication was with a CWT you wouldnt need all this

royal stump
#

(it's like 5 methods total for the base game stuff, and the same transpiler could be thrown on all of them, depending on detection logic)

visual dirge
uncut viper
#

the same transpiler can be thrown on all of them for sure if you just do instructions.MethodReplace or w/e it is to replace calls to the setter with your own

visual dirge
#

ideally it'd replace calls to math.min if the value produced is stored in friendshiptowardsfarmer and one of the arguments is 1000

uncut viper
#

or do the Manipulator extension instead to insert a call of your own right before or after the setter is called

lucid iron
#

It should just be a set property right

visual dirge
uncut viper
#

im not sure why itd be ideally math.min instead of ideally the setter for the friendship value

lucid iron
#

Netint.set_Value or whatever

uncut viper
#

it would be yeah

lucid iron
#

Just find that n swap in ur own it's fine probably

visual dirge
#

unless i also patch math.min yk

lucid iron
#

Yeah then u need to match the whole thing including math.min

#

Swap out math Min instead?

visual dirge
#

idk how to make a transpiler that tracks values on the eval stack

lucid iron
#

Well u don't really care about that cus u r just make ur own specialmin(int, int) to replace math.min with

uncut viper
#

well thats just any transpiler

#

you dont have to replace math.min either

#

you can simply hijack its arguments and then put them back on the stack

lucid iron
#

Let original il give u whatever the stuff on top of stack is

uncut viper
#

however you know there is nothing stopping a mod from just, not Math.mining it right

visual dirge
pine elbow
#

so how would i test my mod

lucid iron
#

Yeah that's the first part where u match for the right math.min by context

#

I feel it is fairly normal transpiler and there's several ways to achieve it

proud wyvern
#

@visual dirge you can't patch NetInt.Get

#

idk if you were told that yet

visual dirge
royal stump
#

(don't think so, I've only ever tried the setter)

visual dirge
proud wyvern
#

there's no NetInt.Get - it inherits NetFieldBase<T, TSelf>.Get

uncut viper
proud wyvern
#

and you can't patch generics

uncut viper
#

then that is wholly correct behaviour

visual dirge
lucid iron
#

That's just feature overlap right

uncut viper
#

they may even change the 1000 for a 2000

lucid iron
#

Gotta pick a cake

visual dirge
#

yeah

proud wyvern
#

generic patching is not supported at all by Harmony/MonoMod

uncut viper
#

i didnt say unlimited friendship, just increased

proud wyvern
#

you can try, but whether it will work? 50:50

visual dirge
proud wyvern
#

Harmony docs would not say that

#

they would say generic patching is not supported

uncut viper
#

one could Math.Min(1000, friendship + value) as easily as they could value = Math.min(1000, value), friendship = value or friendship = value, friendship = Math.min(1000, friendship)

#

i wouldnt say any of those is incorrect

#

maybe the third one depending on how syncing works

proud wyvern
#

if you really want to go this way, i'd first double-check if patching that method actually works at all

pine elbow
#

its okay to have notes on coding right

uncut viper
#

i dont see why not

visual dirge
proud wyvern
visual dirge
calm nebula
#

Or maybe not lol since you need to duplicate 2

proud wyvern
#

also for context

calm nebula
#

It might have once worked in framework

visual dirge
#

the harmony docs say this specific situation will usually work

proud wyvern
#

and also also, the Get method is so small, it very likely gets inlined anyway

calm nebula
#

It's incredibly unlikely to work in Core

uncut viper
calm nebula
#

Anyways

#

Do what you want

#

The general consensus of this thread seems to be "oh god no"

visual dirge
proud wyvern
#

the latter

#

more like

#

when a method gets JIT compiled, and the compiler decides to inline a method call, it will take its current impl and insert that into the result

#

if you patch the method after that happens, the calling method still contains the old impl, not the patched one

calm nebula
#

Yeah. Inlining is done by the jit, not roslyn

visual dirge
uncut viper
#

i mean my choice would be to not do it. id patch the base game methods manually with a reusable transpiler and handle mod compatibility as it crops up

visual dirge
proud wyvern
#

idk if you can

#

inlining is often proving to be the devil

#

i suggest you try patching it and see if it works

#

for both the generic and inlining reasons

visual dirge
#

yeah i will

proud wyvern
#

and yeah, i'd probably go with Button's way instead

#

patch the relevant game code, worry about mod compat later / add some API

visual dirge
#

terrible idea but is there a way to check which method called the one you're patching

proud wyvern
#

not without big performance hits (get the stack trace)

visual dirge
#

very unfortunate

proud wyvern
#

and inlined calls would also screw it up

toxic gazelle
#

Man content.json is pretty confusing

visual dirge
proud wyvern
#

getting a stack trace is expensive, and inlined method calls don't appear on the trace

#

and you'd have to parse the trace

#

very annoying

#

it's how Harmony's PatchAll() with no params works

#

and inlining was how it broke on Android back in 1.5 heh

visual dirge
#

maybe i could patch math.min to remember which method it was last called in (if one of the arguments is 1000) and then compare that against the next call to friendshiptowardfarmer's setter? that would avoid the problem of random calls to math.min triggering overflow stuff if they happen to line up with setting friendshiptowardfarmer

proud wyvern
#

you're really trying too hard imo

visual dirge
#

😖

proud wyvern
#

it's getting to the level of Slime Rancher modders patching Enum.GetValues to add their stuff

pine elbow
#

first mod is avocado mod does that sound simple

visual dirge
proud wyvern
#

i didn't mod Slime Rancher, but i do think they could at least try doing something else

visual dirge
#

loll

proud wyvern
#

patching system methods sounds scary

visual dirge
#

a subnautica mod i maintain patches array3<int> methods

#

to add support for negative indexing

#

bc otherwise the game gets confused if you expand the world bounds into negative batch indices

uncut viper
#

if you're hardcoding to look for an argument of 1000 anyway then you're already giving up some mod compat, so you might as well just worry about the vanilla game and take the easy way

visual dirge
#

i'll probably try and figure out how to detect math.min calls where the value is stored in friendshiptowardfarmer and make a transpiler that replaces those

#

well. ideally itd just look at the arguments, not replace the call. but there's two of them and that's a pain

visual dirge
lucid iron
#

this convo reminds me

#

is it better to transpiler all the spritebatch.draw from specific method

#

or conditionally skip prefix draw

royal stump
#

I'm guessing a prefix on something called a million times per frame is bad, but you can always test performance SDVkrobusgiggle

#

I still prefix-false a few things just to make monsters run faster

lucid iron
#

well the prefix does very little work and is already prefixed by spacecore kyuuchan_run

#

i wanna think im not adding that much overhead but idk how to profile this

royal stump
#

it's probably fine if the check is simple, I've just never personally messed with something used that often

lucid iron
#

the actual thing is that

  • i wanted to make building like draw layers work on furniture
  • to slacc i used a furniture.draw prefix to set "now in furniture draw" and then prefixed spritebatch draw so that i can just record the layerDepth value
  • do all the actual drawing work in furniture.draw finalizer
#

it turned into a skip prefix cus sometimes i dont want orig furniture

#

but yea doing this ofc adds overhead of harmony calling my prefix where i instantly return 99% of the time

#

i am consider switch to transpiler since i want to modify the layerdepth

spiral lion
#

I have made custom objects for my mod. Can i add them to universal dislikes? etc

lucid iron
#

yea

spiral lion
#

Okay nice! Is there anywhere where I can find a example of how to build the code? ehehhe

royal stump
spiral lion
#

Thank perfect! Thnx <33

pine elbow
#

what files do i put my mod in

serene dome
#

Hello! I'm looking for a sound mod where I can easily toggle the sound on or off, specially during cutscenes !

pine elbow
#

coding is addicting

gentle rose
#

if you're looking for mod recommendations, I'd try #modded-stardew, but doesn't your keyboard have a mute button in some sense?

serene dome
gentle rose
#

ah, I see

lucid iron
#

you'll want system level application sound off

serene dome
lucid iron
#

instead of sdv

serene dome
lucid iron
#

sell it \j (seriously though this aint channel to ask for mod rec)

gentle rose
serene dome
#

i know

#

i already went to the appropriate channel @lucid iron

warm parrot
#

Where do I get help with making Stardew Valley mods?

lucid iron
#

right here Dokkan

#

!startmodding

ocean sailBOT
#

Making mods can be broadly divided into two categories:

Usually it’s easier to start with making content packs, since you don't need to learn programming.

brisk wedge
#

Is there any general rule of thumb for how big a UI should be in terms of pixels so it'll fit on smaller screens on PC? I'm using stardewUI if that's relevant

warm parrot
lucid iron
#

the game's native resolution is 1280 720

#

since you are using stardewui u can do things to make the ui fit to size

brisk wedge
lucid iron
#

you can do 80% or 80vh

#

check the docs for syntax

#

my rec is that you should make the ui work in 1280 720, and make use of extra space from bigger screen when it makes sense

twin wadi
#

how do i make my npc mods (which has custom locations) compatible with the "npc icons on map" mod and also things like cjb hack which has warp locations? actually i just answered my own question its probably on some kind of docs

lucid iron
#

it just works

#

for custom locations what you need is not npc icon on map, but world map data

#

Data/WorldMap

brisk wedge
#

by make use of extra space, do you mean like set the height/width to be x% and then put scrollable for stuff?

twin wadi
#

does the cjb cheats menu usually warp the player in front of the building or in it? (e.g. if you choose to warp to pierre's, do you get warped in front of pierre's or directly in the shop)

#

sorry i cant test it rn

lucid iron
#

for cjb u need to do stuff to populate extra warps

#

i think ES does it

gentle rose
cold marsh
#

How do the last two temporaryanimatedsprite flags work? I want a sprite to fly like a rocket (shoots up at increasing speeds) but I can only get it to spawn at max speed no matter what.

twin wadi
gentle rose
#

the tile you specify

#

I don't think it even works without specifying a tile

#

yeah, it doesn't, non-optional. I recommend reading the docs in full if you haven't yet because the author's guide explains this

calm nebula
#

I would try smth small

cold marsh
#

Yeah, I figured it out. Do not use motion and acceleration_change, and use acceleration with tiny increments like -0.2

calm nebula
#

Yeah it's per frame adjustments so it adds up fast

#

Gravity is 0.5 😛

cold marsh
#

However, I have another problem: How do I use the TAS command inside a quickQuestion? It keeps erroring in the texture name part, regardless if I use double backslashes or a single forward slash

#

Is there some special way to escape it?

toxic gazelle
#

Why is it so freaking so hard to mod stardew valley in my android phone😭

urban patrol
cold marsh
#

temporaryAnimatedSprite Mods\\Sunsketchx\\TASmushroom 0 0 16 32 50 3 1000000 3 6 false false 999 0 1 0 0 0 acceleration 0 -0.2

#

It works perfectly fine when used outside of the quickQuestion

urban patrol
#

hmm i wonder if it's parsing the \\ as separating commands and thus thinking the TAS argument is incomplete

#

just to test, what happens if you instead load the texture to Sunsketchx_TASMushroom, and use that as your texture?

cold marsh
#

That worked, thank you!

#

Another TAS question. Let's say I have a single loaded .png with separate sprites for a rocket and its smoke, can I call the TAS command once for the rocket and then call it again for the smoke or is that a no-no and I have to make them two different loaded files instead?

urban patrol
#

i don't see why not, as long as you define the texture properly!

cold marsh
#

Perfect, thank you again

urban patrol
#

if it doesn't work let me know

tight gulch
#

hii, ok if i were to need to change the coordinates of the stardew baby, does anyone know how I would go about doing that? if there's a page that will help or something that would be great too. in all honesty, I'm trying to solve a bug by myself and it feels like an easy fix if I can just do that.

lucid iron
#

Wdym baby

#

Like the crib?

rough lintel
#

is there a token or something that keeps track of the date you married an npc? like an {{Anniversary}} token?

#

or is that like Not a thing

tight gulch
# lucid iron Like the crib?

well, the baby itself is displaced in game. It's like, y coordinate is different to the crib so its like on the floor somewhere haha.

tight gulch
lucid iron
#

The crib/baby position is fairly hardcoded you need some kinda mod to do it

#

I made a thing that let you move the crib, but I didn't decouple the baby from the crib in any way

tight gulch
#

mmm feared this lol

lucid iron
#

Depending on the ultimate goal you may want to just make your own C# mod?

tight gulch
#

i just dont know why my baby isnt in the crib fhuihfhf

lucid iron
#

Are you using any farmhouse mod?

tight gulch
#

yeah

lucid iron
#

Probably more of a mod help question then, if you aren't making your own farmhouse mod

#

!mh

ocean sailBOT
#

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

lucid iron
#

You can ping me after making thread

tight gulch
#

ty CE_ThumbUpKitty

gaunt orbit
#

is there an easy way to check if a given player is a splitscreen farmhand?

uncut viper
#

in C#?

#

Context.IsSplitScreen && !Context.IsMainPlayer

gaunt orbit
#

Context, thank you

#

I knew there was some utility class but couldn't remember what it was

pine elbow
#

Hi, I created a farm map in tiled, placed the houses where I want them to appear, and placed the blocks on the Path, where they should be created, but for some reason the game is only creating the first 2 houses, the other houses are not being created when creating a new farm.

#

Does anyone know what could cause this problem of multiplayer houses not being created?

gaunt orbit
#

did you add the order property to them?

pine elbow
#

yes

gaunt orbit
#

do they have the correct numbers?

pine elbow
#

There are two blocks for each type of house
2 - Order 1 (One for a nearby house and one for a far house)
And there are 7 houses

#

14 tiles

inner harbor
#

(anniversarySeason, AnniversaryDay)

rough lintel
#

hypothetical question: if i have 3 different versions of a dialogue line for different times of the day, and i want the character to like... queue up more dialogue after certain times, can that be done? like if i have morning, afternoon and night lines, and when u talk to her in the morning she says morning, talk to her again during the day she says the day one, etc etc

#

she does not move, its just based on the time change, and it'd most likely be in One Key. i don't think that's possible which is why i'm asking

rough lintel
#

oh thanks chu!

lucid iron
#

this one's a bit nicer to use cus u just get new dialogue keys

#

on a special asset

uncut viper
#

just have her schedule move her to the same tile she's on but with different dialogue

rough lintel
#

OOOOH thats big brained

#

thats big brained. thank you

somber hinge
#

hi ^_^ i have a StreamedVorbis question. the wiki recommends using it for things like background music & setting it to false for short sound effects, but all the mods I look through set it to true for short sounds like animal sfx, the horse flute song, etc. is there a good reason to do that?

latent mauve
uncut viper
#

streamed vorbis = ogg files. more CPU work to play it, but smaller file size usually

#

iirc

lucid iron
#

Also less memory

uncut viper
#

that too

lucid iron
#

But there some kinda bug with ogg and short sounds

#

That's why wiki has that rec

uncut viper
#

wav must be loaded into memory in entirety to play it but once it is it's smooth sailing

somber hinge
#

gotcha, thanks :)

uncut viper
#

hello lovely people, i have made a tool
https://stardew.button.gay/tools/mapfixer
drop one or more .tmx files into this thing, optionally select which fixes you wanna apply, hit "Fix" and it'll repair your .tmx if its broken in the most common ways we see (tilesheet climbing, invalid gids, unnamed tiledata, etc)
once it's done, any maps that needed fixing will be zipped up and downloaded for you. the zip will also include a folder of backups of said maps that are completely unmodified, just in case bc i know writing "make backups" wont make people do it
it'll log all the fixes it makes as well as any warnings or errors for things that you might need to note (like if its unable to fix something (.tsx's arent supported, for instance) or it detected an error that you said you didnt want fixed but you should be made aware of)
this isnt intended to be in like every mapmaker's standard toolbox to rely on or anything but more so just as a quick fix if you cant be bothered to do it yourself or, more commonly i expect, giving to newbie modders with a broken map who dont know how to do the fixes themselves
okay thanks back to my sdv modding break SDVpuffersalute

pine elbow
latent mauve
#

Same question

gaunt orbit
#

cabin tiles are not directional. they are just the upper-left tile of the cabin footprint, which is 5 x 3

pine elbow
#

I moved their position a little, and a house appeared, so I think it's the tiling that fails, if it's just a little bit out of place

uncut viper
#

is that something thats even allowed in the showcase

lucid iron
#

Yeah

#

It's like modding tools

#

Lina showcased the aseprite extension too so i think it's about the same

uncut viper
#

can the showcase do a video file attachment like that

lucid iron
#

Ik it can do gif

#

But y'know maybe i just @outer glacier so it can be deleted if it no work

uncut viper
#

well i dont see why not then i suppose if ya wanna do it for me
just maybe put < > around my website url to hide the embed for that just in case the showcase decides to use that embed instead of the video

#

which u will need to download from discord

lucid iron
#

Map modding tool by @uncut viper !

hello lovely people, i have made a tool
https://stardew.button.gay/tools/mapfixer
drop one or more .tmx files into this thing, optionally select which fixes you wanna apply, hit "Fix" and it'll repair your .tmx if its broken in the most common ways we see (tilesheet climbing, invalid gids, unnamed tiledata, etc)
once it's done, any maps that needed fixing will be zipped up and downloaded for you. the zip will also include a folder of backups of said maps that are completely unmodified, just in case bc i know writing "make backups" wont make people do it
it'll log all the fixes it makes as well as any warnings or errors for things that you might need to note (like if its unable to fix something (.tsx's arent supported, for instance) or it detected an error that you said you didnt want fixed but you should be made aware of)
this isnt intended to be in like every mapmaker's standard toolbox to rely on or anything but more so just as a quick fix if you cant be bothered to do it yourself or, more commonly i expect, giving to newbie modders with a broken map who dont know how to do the fixes themselves
okay thanks back to my sdv modding break SDVpuffersalute

#

nop didnt work

uncut viper
#

sad
ah well it's fine

#

the explanation is good enough hopefully

#

thank you chu SDVpufferheart

lucid iron
#

submit official complaint to aquova i guess

#

it might be good to include this in !tilesheetclimbing

#

idk how to edit commands tho

uncut viper
#

i can't edit em SDVpufferthumbsup

lucid iron
#

button dodging all responsibility with this one (1) neat trick

brave fable
#

but you still have perms to submit PRs to Leah SDVpufferchickmayor

lucid iron
#

ah yes i gotta remember to impose responsibility

brave fable
#

see if you can include a video in an embed

lucid iron
#

@ivory plume hello pathos it is I once again.
A while ago I asked if smapi can eat Arbitrary Tilesheet Access for loading tilesheets from outside of Maps/* by using Content/ as prefix. At the time the response was "todo.txt". If button or someone else were to PR smapi for this, how would you like it to be done?

pine elbow
#

@gaunt orbit It really was the tiled position, using code it worked

ivory plume
lucid iron
#

hm so i do want the actual path still resemble a file path, for tiled reasons

#

ATA's setup means i'd just make a Content folder next to my tmx and put say Buildings/Barn.png in there for usage

gentle rose
#

semi inspired by this, but is there a way to alias an asset / load an asset to another asset in content patcher right now

lucid iron
#

u can target multiple things iro

#

dont need to use Target or TargetWithoutPath

gentle rose
#

Target is the part I want to keep, it's FromFile that's the issue SDVpuffersquee

#

oh right I see what you mean, but what if it isn't my asset?

lucid iron
#

then perish

#

(yea theres no way atm)

rough lintel
gentle rose
#

I'll take that as a no SDVpuffersquee it would be a simple ish way for map makers to get around tilesheet access if it can be implemented with minimal overhead (so probably more like a symlink between two assets than copying the asset into another asset?)

lucid iron
#

i think u would have to get 2 copies of the asset

#

and also its time for Graph Theory

#

gotta cycle check

gentle rose
#

why would you have to have two copies of the asset

lucid iron
#

what if i copy A to B and then editimage B

gentle rose
#

and preventing cycles is easyish because patches are applied synchronously and you simply don't allow aliasing to an existing name (maybe?)

sour sleet
#

Is the author of Livestock Bazaar here?

gentle rose
#

that would be chu

lucid iron
#

hi yes what ailes thee

gentle rose
#

I'm in favour of you can't because that's not the point of aliases

lucid iron
sour sleet
#

So several people have asked for Lilybrook to be compatible with Livestock Bazaar and I'm not quite sure what this yellow smapi text means. "[Livestock Bazaar] Invalid Texture field on farm animal '8BitAlien.Lilybrook_MiniaturePony', this is a problem with one of your farm animal adding mods and should report to that mod's page."

lucid iron
#

it means your horse is broken

#

this message is for you, the mod author who added the farm animal

#

check the Texture field and see if you have a matching Load

sour sleet
#

Yep I know that but I can't see anything wrong with my json

lucid iron
#

!json

ocean sailBOT
#

JSON is a standard format for machine-readable text files that's used by Stardew Valley mods.

If you need help with a JSON file, you can upload it to smapi.io/json to see automatic validation and share the link here.

When making mods, it's recommended to edit your files in a text editor with JSON support, such as VS Code, Notepad++, or Sublime Text. These programs will check for syntax errors.

lucid iron
#

you loaded your texture to Animals/MiniaturePony1

#

field says Mods\8BitAlien.Lilybrook\Assets\Items\MiniaturePony1

#

i recommend loading your animals to Animals/8BitAlien.Lilybrook/<animal name> btw, so that you dont become incompatible with another miniature pony mod

sour sleet
#

Ahh ok I see. I will change that now!

lucid iron
gentle rose
lucid iron
#

as for further compat, u can make a shop to sell animals in lilybrook if you like

#

it'd be optional cus people will be able to buy from marnie unless you specifically go through livestock bazaar to ban the animal

gentle rose
#

button if you prove that my idea won't work I'm blocking you I swear /j

uncut viper
uncut viper
ivory plume
#

I just mean that a given tilesheet path must always be resolved the same way, regardless of the current player's folder structure or which files exist in their Content folder (i.e. the behaviour can't change from one player to another).

#

(That avoids hard-to-troubleshoot bugs where it works on the mod author's computer, but fails for some players or accesses an unintended asset.)

sour sleet
uncut viper
#

ahh. in ATA's case though it just checks whether the image source in question matches an asset name and doesnt actually look in any folders, just the content pipeline, to assign as the asset, which should count, id think

lucid iron
#

is it still talking about same animal?

sour sleet
#

Yep, but i think the problem is coming from the fact that the pony has skins

uncut viper
#

i suppose technically the behaviour would be different if two players had different mod lists but it would be the same kind of different if someone didnt install i.e. daisyniko's tilesheets for a mod that required em

ivory plume
#

Ideally it should be deterministic with different mod lists too.

lucid iron
#

this particular check is only for the base texture iirc, but you should fix any erroring skins too

sour sleet
#

The skins work fine with the base game I was just struggling to get compat with Livestock Bazaar

uncut viper
lucid iron
#

livestock bazaar has support for skins

#

what this warning actually does is prevent people from crashing my menu with invalid animal texture

#

it doesn't crash vanilla menu because livestock bazaar displays the actual animal for aesthetics

ivory plume
#

For example, a deterministic approach would be to support paths like ../LooseSprites/furniture relative to the Maps folder. That always resolves to the same asset name (i.e. LooseSprites/furniture) regardless of which assets exist or which mods are installed. The target asset may not exist, but the resolution will be the same regardless.

lucid mulch
#

Is the idea of allowing tilesheet climbing as long as its at most 1 layer (i.e. never escapes Content) deterministic enough

ivory plume
#

Yep, that's the tentative approach I have TODO'd.

lucid iron
#

incidentally i just noticed that the skins menu dont have a equiv check so i gotta fix that next version kyuuchan_run

sour sleet
#

So basically, I want to have Marnie selling the pony as usual but add Livestock Bazaar compat. I'm a little confused on how to do this. I've looked at the authors guide but a lot of that seems to be for custom shops

lucid iron
#

you do absolutely nothing if you just want marnie to sell the animal

uncut viper
#

in your theoretical implementation where ../LooseSprites/Furniture resolves to LooseSprites/furniture, would that also mean that something like ../../../LooseSprites/Furniture would resolve as well i.e. fixing tilesheet climbing at runtime?

#

or just allowing one .. max?

lucid iron
#

im checking to prevent mods with invalid data from exploding my menu, not for any compat purposes

lucid mulch
#

../../../ would be referring to the LooseSprites/Furniture file in another steam game if the filepath concept is respected

ivory plume
lucid iron
#

anyhow if u wanna get a log and open a thread i can help u in more detail there

uncut viper
#

or just someone has their sheets in a different location thanb usual

lucid mulch
#

tilesheet paths always assume the current location is (Content)/Maps/ right?

sour sleet
#

LB compat

uncut viper
#

i see though, i understand, so you want to actually follow the content folder's filepath and actually treat it like a filepath, not as a single asset name

#

that wouldnt work to allow people to use any modded image like ATA does currently then, i take it?

#

ATA for example would allow Mods/UniqueID/ImageName as a tilesheet source

ivory plume
#

Yep. I think the base game / xTile does technically support ../, there's just no validation on it; so we probably just need to adjust SMAPI's validation from "no directory climbing at all" to "no directory climing out of the Content folder".

lucid mulch
#

the entire asset pipeline can be projected as being a logical location in the content folder

ivory plume
#

If Mods/UniqueId/ImageName is loaded into the logical Content folder, it would work fine. You'd just need to do ../Mods/UniqueId/ImageName (i.e. relative to the maps folder).

pseudo vault
uncut viper
#

would it be easier to simply remove SMAPI auto-applying the "Maps/" prefix unless the image source has no directory at all (except Mines)?

#

(/gen bc im sure theres something about that that ruins backwards compat that im not thinking of)

ivory plume
#

(Applying the Maps/ prefix is base-game logic, not SMAPI.)

uncut viper
#

its what ModContentManager.GetContentKeyForTilesheetImageSource() does

#

if the top folder is not Maps it prepends Maps to it

lucid mulch
#

Ah I see what you mean by deterministic now.
if the path in the tmx is Mods/UniqueId/ImageName do you interpret it as forward directory climbing, or as an absolute path in the asset pipeline.
I'm in agreement something needs to be in the path to tell it to not do forward climbing, either relative path ../ or explicitly absolute / at the front

uncut viper
#

the vanilla game may also prepend Maps to it, but SMAPI doesnt strictly have to follow suit in its own implementation

dense tangle
#

What’s the order of operations for creating a mod? I have ideas, I know theres a how to make a mod rhing on the wiki, but like what else do I need to have in mind or need to look into to learn how to do it. I have no clue

uncut viper
lucid mulch
#

unless you actually did want forward climbing to a folder called Content

uncut viper
#

that is true and i did consider that when i made it need "Content" instead of ATA's uniqueid but considered it a worthwhile trade-off for convenience
for a mod i think thats acceptable, though i'd agree less so for SMAPI itself

lucid mulch
#

though I'd imagine tiled wouldn't be a big fan of /Mods/UniqueID/ImageName and might interpret that as C:\Mods\UniqueId\ImageName or something

uncut viper
#

yeah i just tested it and it wants to check my C: drive directly

#

making it easy for Tiled to understand without you needing to open up the .tmx itself at all was somethin i considered important for it

#

(which tbh is also why somethin abou the ../ requirement seems a bit less than ideal to me, since you'd have to have your working files outside of your mod folder (or outside of the folder with the tmx at least) for them to work)

#

(or if you are someone who makes your maps from inside your unpacked folder then you gotta keep stuff in your unpacked folder, though if youre doing that you're already used to that anyway so thats no biggie)

gaunt orbit
lucid mulch
#

Ah I think I see how vanilla/xTile/xna would causeMaps/ to be prefixed now

uncut viper
#

for SMAPI loaded content though its just the ModContentManager class that does it, since thats all i needed to skip prefix to get it to work

lucid mulch
#

during the xnb reading it would use TideReader to interpret the file, which will read the tbin from the memory stream, and then set assetPath to the asset name in the pipeline, and then call map.FlattenTileSheetPaths which iterates over the tilesheet references replacing \ with the system directory seperator char, and then setting the imagesource to be combined path of the assetPath (minus filename) and the path referenced in the file directly, and the MapDisplayDevice that is used to actually convert ImageSource to a file just passes it straight into the content manager
which would result in the map Maps/BathHouse_Entry having the tilesheet reference of bathhouse_tiles to use Maps/bathhouse_tiles

lucid iron
lucid mulch
#

the TMXLoader path (or even the direct tbin path) doesn't appear to call FlattenTileSheetPaths, so SMAPI's FixTilesheetPaths is needed

uncut viper
#

which as far as i could tell doesnt have much reason to imitate the same auto-Maps prefixing in all cases aside from "thats what vanilla does"

lucid mulch
#

other than being able to take an unpacked version of the vanilla maps, use them and still work

pseudo vault
#

Did I do it correctly this time?

uncut viper
#

thats why i said "in all cases" theres no exceptions to it, nothing is done before first tacking on the Maps/ part

#

you could always do that after doing some other checks

lucid mulch
#

though the vanilla logic technically isn't prefix everything Maps/ but prefix with the assets location, which by convention was the Maps/ folder anyway

#

but theres also backwards compatibility for all the maps made in the last however many years built with the understanding that tilesheets are relative to the Maps folder, and changing it is a breaking change

uncut viper
#

(semi-relatedly, i probably shoulda given FixTilesheetPaths a glance when working on my map fixer, theres more stuff i could warn about...)

lucid mulch
#

only thing not breaking is allowing directory climbing as it was always previously forbidden

uncut viper
#

if you checked "is [image source] an asset name" first before you checked "what about Maps/[image source]" that would still be backwards compatible i think. emphasis on "i think"

#

i know just using it as a straight up asset name wasnt the desired implementation, but just as an example

lucid mulch
#

then you get the deterministic errors where on one persons modlist it got interpreted as a direct asset name, and on someone elses modlist it was a Maps/[image source]

uncut viper
#

what about checking Maps/[image source] first and using it if found, and then checking the asset name if not?

#

ive been saying "before checking Maps/" but what i shouldve been saying is "before permanently attaching Maps/ to whatever the image source is"

hard fern
#

🤔 i have a weird npc question... How hard would it be for me to get 2 NPCs to both walk and hold hands? I feel like one will always end up behind the other somehow and it won't work

uncut viper
#

thatd stop working as soon as they needed to turn a corner

lucid iron
#

you can do what jorts and jean does

#

very carefully

uncut viper
#

even if you could get them lined up to start

hard fern
#

😔 yeah i figured corners would absolutely destroy my plans

lucid iron
#

just gotta fiddle with schedule until they sync

#

it is fairly straight forward to have em hold hands in a schedule anim tho

twin wadi
#

it would also stop working if there's like a slight delay, like if a player stands in front. but u shouldnt worry too much about the player intercepting though

#

also omg chu your mod is going to be a lifesaver SDVpufferheart

tiny zealot
#

if demetrius dancing alone at the saloon on friday because robin is building is good enough for vanilla, you can have a little "holding hands with no one" as a treat in case of player interference

twin wadi
#

*mod tool

twin wadi
#

oops sorry for the ping

lucid mulch
#

Ah, thats the other danger of allowing directory climbing.
before doing the Maps/ prefix and asking the asset pipeline for the asset, it does check first whether the file exists in the mod manager, which I think could directory climb to escape the mods folder and read a different mods folder directly

uncut viper
#

where does that happen?

#

oh, GetModFile

lucid mulch
#

TryGetTilesheetAssetName's call for GetModFile yeah

uncut viper
#

it was such a tiny function name i glossed right over it

#

i was expecting something more descriptive/longer

#

too used to CA's wordy function names

twin wadi
#

omg oops sorry! i only checked who posted it by accident SDVpufferangy

#

thank you button ❤️

light shore
#

hi, I prepared an event for the NPC I created, but it does not trigger in the game and does not give an error in the smapi log..

#

and I looked at previous messages and it was said that the z command was used for all seasons except that season, but in the wiki it is the opposite??

twin wadi
#

also i suggest using a unique id instead of a number id

#

like {{ModId}}_eventname

#

the z command is part of the deprecated preconditions in the wiki

#

the new syntax i believe is !winter, for "not winter"

tiny zealot
#

(you should definitely switch to the newer, human-readable preconditions and not use z et al)

#

to match just winter, use Season Winter. to match anything except winter, use !Season Winter

twin wadi
#

yeah sorry it's not !winter it's !Season winter like ichor said

tiny zealot
#

and just give two seasons to match those two, e.g. Season Summer Fall

uncut viper
# lucid mulch Ah, thats the other danger of allowing directory climbing. before doing the Maps...

assuming im reading and following the code correctly and am correctly identifying what all these variables and args would be, i think it should work out fine if, during FixTilesheetPaths, where it currently checks for PathUtilities.GetSegments(imageSource).Contains("..") to detect climbing in the first place, use that moment to check if its valid climbing and if so, modify what relativeMapFolder is, which is what gets passed into TryGetTilesheetAssetName

light shore
#

thank you ill try them now

twin wadi
#

hope it helps!

uncut viper
#

f

lucid mulch
uncut viper
#

asset pipeline asset, assuming my understanding of what pathos said he'd want for implementation

#

where its assumed you start in Maps/ and its all relative from there

#

assuming my understanding is correct*
(which it may not be)

lucid mulch
#

yeah just means extra logic needs to surround the GetModFile path to only attempt local files while still inside the mod's folder

#

as local files within the mod folder are stable, as it doesn't matter where the mod is installed or what other mods are (or aren't) loaded

uncut viper
#

i might be missing something again but it seems like you should just be able to skip that GetModFile if-statement entirely if the modRelativeMapFolder contains "../"

#

with the previous function, FixTilesheetPaths, replacing its check for "../" with a check for an invalid amount or invalid placement of the "../"

#

then you navigate up the content folder after the GetModFile stuff

lucid mulch
#

that is one solution, if you climb a directory you lose access to local files and become asset pipeline only files

uncut viper
#

right now, you arent allowed to climb a directory anyway

#

so no mod would be relying on that

lucid mulch
#

yup

uncut viper
#

and then you can replace the "../" with just "Content" after that, though im not sure what you'd do in GetContentKeyForTilesheetImageSource

#

dont know what to do about the current auto-prefixing of Maps/

#

since you cant just detect if the source starts with "Content" bc then we're just back to what ATA does, which isnt acceptable

#

maybe wait until you're in that function to replace the "../"?

lucid mulch
#

if it starts with ../ then you just don't prefix Maps/

uncut viper
#

sometimes ya just gotta type out loud enough until you see the "oh, duh" answer SDVpuffersquee

#

rubber duck debugging except im talking to air

lucid mulch
#

rubber duck debugging is a -

uncut viper
#

its a very legitimate debugging tool

calm nebula
#

I prefer talking to the dog. Thanks

balmy valve
#

What does nexus mod endorsement mean

uncut viper
#

thumbs up

calm nebula
#

It's a thumbs p

#

Someone liked your mod

#

Or many someones

balmy valve
#

i have been endorsed by vegetarian alex. and the person who made the mod tutorial!!

uncut viper
#

"bangin' mod my man"

balmy valve
#

YAY!

#

and lots of ppl are downloding it i am happy!

lucid iron
brittle pasture
balmy valve
#

what is the reference

uncut viper
#

(deltarune)

balmy valve
#

ohhh

#

uhhh something papyrus spagheti (under tale)

#

sans under tale

#

I am so gamer

#

He a little confused but he got the spirit

vernal crest
pseudo vault
#

I think I did almost everything necessary... How do warps work exactly? I did everything for going back to the farm, but how do warps work for going outside the farm?

vernal crest
#

Open a vanilla map and check the map properties to see how to do warps off the farm

pseudo vault
#

I think I may be blind...

#

I could not find that...

vernal crest
#

As in, you couldn't find it before but you did just now?

pseudo vault
#

No I can't still...

vernal crest
#

What vanilla map do you have open?

light shore
vernal crest
# light shore still doesnt trigger

So you want your event to trigger if you have 1250 friendship points with an NPC whose internal name is NPCAtsushi, NPCAtsushi is on the map, it's not winter, it's raining, and it's between 8:30pm and 11pm?

pseudo vault
light shore
#

no actually its winter i changed it like Season Winter

vernal crest
vernal crest
light shore
#

oh no never heard it

pseudo vault
light shore
#

could be my modid wrong or eventname idk

pseudo vault
#

There are so many numbers all over the place

vernal crest
vernal crest
pseudo vault
#

Modding:maps?

vernal crest
#

Yes

pseudo vault
#

I uh... I don't really understand what it's telling me.

#

Am I looking at the right thing?

#

Warps & map positions?

light shore
vernal crest
vernal crest
pseudo vault
#

It's confusing because...

#

"80 15 BusStop 11 23 80 18 BusStop 11 24 80 16 BusStop 11 23 80 17 BusStop"

#

The standard farm has so many for just Busstop

uncut viper
#

bc the path to the right of the farm is not a 1 tile tall hallway

#

its a wide path you can take, so every tile you could possibly cross the barrier with must be a warp

pseudo vault
#

Oh! So you can't make it a straight line?

uncut viper
#

each warp is a single, individual tile

ocean sailBOT
#

Log Info: SMAPI 4.2.1 with SDV 1.6.15 build 24356 on Microsoft Windows 11 Home Single Language, with 12 C# mods and 8 content packs.
Suggested fixes: One or more mods are out of date, consider updating them

vernal crest
pseudo vault
#

Oh no. I think I have always used the wrong coordinations...

#

I used the ones on the right...

vernal crest
#

Those are not tile coordinates

#

Can you go up to the Map menu and then click "Resize map" and then send a screenshot of the box that pops up?

pseudo vault
#

I used the Standard farm as an example of my mistake.

#

The custom map has them like this

uncut viper
#

the coordinates in the parenthesis are pixels and not tiles

pseudo vault
#

I am not smart...

vernal crest
#

Ok see how that is 64x44 tiles? That means a tile coordinate can't be any number bigger than that. Same for any other map. If it's a number over a hundred, it's probably wrong.

pseudo vault
#

what about the X and Y for tile properties? Those can be very big

vernal crest
#

Those are also pixels

pseudo vault
#

Oh...

latent mauve
#

A tile is a 16x16 pixel square, if that helps!

vernal crest
#

Either always divide them by 16 or just pretend they don't exist.

uncut viper
#

(some notable maps actually are quite large/over a hundred. Town is!)

latent mauve
#

Pixel coordinates and tile coordinates are different, if you look at the wiki, it will generally tell you which one you need to be using.

vernal crest
#

(Yes, but even the bigger maps are not much over 100.)

pseudo vault
#

I misunderstood that bit as well then.

vernal crest
#

(Certainly nowhere near 1,000)

pseudo vault
#

This is so frustrating. Urgh...

#

Okay uh... I will try and understand the difference...

#

"BusStopEntry [<int x> <int y>]" "PetBowlLocation <x> <y>" "EntryLocation <tile X> <tile Y>" i found these three different ones. Busstop entry uses "X int and Y int" which I don't know about, Pet Bowl uses just "XY" and EntryLocation uses "tile X and tile Y"

vernal crest
#

They are all the same thing, said three different ways

#

X = the tile position on the X axis, which is an integer

pseudo vault
#

So they all use the left numbers?

vernal crest
#

Yep

pseudo vault
#

Okay. time to fix this mess... Thanks for explaining it.

uncut viper
#

(is there anything that uses pixels for maps Aba? /gen)

vernal crest
#

The fact that I think the answer is no means it's almost certainly yes xD

pseudo vault
#

Wait so the warps are put out of bounds? I always thought it was the tile before oob.

vernal crest
#

Seriously, I can't think of any. I know there are event commands that use pixels for the map (like viewport or positionOffset) but nothing for map-making.

pseudo vault
#

I guess... it would explain why it takes so long to use the glitch...

uncut viper
#

time for chu to add pixel based map proprties

pseudo vault
#

I'm so frustrated at myself for not understanding it...

uncut viper
#

learning to mod is a skill no one starts off with

vernal crest
#

And we all have bits that we struggle more than others to understand

uncut viper
#

and sdv modding especially has like, a lot of different bifs of info to know

#

bits, even

vernal crest
#

(Like me and Fields vs Entries meow_sticks )

pseudo vault
#

Well, I did mod Hat in time in the past which used the lines for warps and such.

balmy valve
#

You'll get there eventually, it takes so much time

balmy valve
uncut viper
#

i would probably suck at AHIT modding and would need you to help me!

balmy valve
#

i've questioned why things aren't working before then realizsd i forgot to load the file

ocean sailBOT
#

Log Info: SMAPI 4.2.1 with SDV 1.6.15 build 24356 on Microsoft Windows 11 Home Single Language, with 12 C# mods and 8 content packs.
Suggested fixes: One or more mods are out of date, consider updating them

light shore
lucid mulch
#

Your event id is deadxl.atsushi_Town but your command is trying to run deadxl.atsushi_GraveVisit

light shore
#

oopsie i didnt notice that..

pseudo vault
#

Do I use the Left numbers for the entries or do I use the XY from tile properties?

vernal crest
#

Never use the XY from tile properties

light shore
#

okay now it worked when i tried debug ebi but my farmer doesnt follow the coordinates

vernal crest
#

Unless you find something explicitly saying it needs pixels rather than tile coordinates, never use the XY from the tile properties because those are in pixels.

pseudo vault
vernal crest
#

I think you've interpreted the move command as needing to put which tile coordinates the farmer should end up on, but that's not how the move command works.

light shore
#

aaaah- i thought when i give these coordinates it will just go there!!

vernal crest
#

Your first move command should be move farmer 0 -1 0 rather than move farmer 54 96 0.

light shore
#

i understand now.. thank u

pseudo vault
#

Do I need to do something for the Mailbox as well? or will it automatically spawn next to the House?

vernal crest
#

I don't know where the mailbox will spawn if you don't set its location so you probably should.

pseudo vault
#

I tried reading this but it just confused me because of the second sentence...

lucid iron
#

Mailbox part of the building now

uncut viper
#

MailboxLocation is not required if using a default sized farmhouse

ivory plume
pseudo vault
#

So I'm okay?

uncut viper
#

dehardcoded enchantments 👀 👀 👀

drowsy minnow
#

i think i might scrap my mystery bag idea, im struggling way to much to figure things out
૮꒰◞ ˕ ◟ ྀི꒱ა

lucid iron
#

Oo i can yeet the sc serializer from scythe mod finally

uncut viper
#

(why does the ClassName have to be in the SDV namespace tho SDVpufferpensive)

lucid iron
#

Ah wait darn I can't yeet it

ivory plume
lucid iron
#

Can it work like trinket effects u think

uncut viper
#

fair enough

lucid iron
#

Type never serialized as the type, instead just the string

#

Reflection to construct on load

ivory plume
#

Hmm, possibly the instance could be recreated when the save is loaded based on the data, so all enchantments are just Enchantment.

lucid iron
#

Having data model makes it viable i think

#

Now that there is unique key to save DokkanStare

brisk wedge
#

Is it possible to dynamically generate mail? Like I want to send a mail that randomly gives the player a seed, but it could be any seed from any mod? The docs I'm looking at for mod data only have examples where you know the item id

ivory plume
#

I don't think there's any way to do it with just a content pack. You could do it with a C# mod though.

sweet apex
#

i'm trying to make a content pack for fashion sense (just for personal use converting some stuff from bb's shirts mod, it won't ever be published without the og mod author's permission), but i don't understand how to use the color masks. i understand you set the values based off RGB, but do they sort automatically (ex. the first color applies to the darkest value, then the second to the second darkest, so on until the lightest color), or is there some other way you have to specify where the colors apply?

twin wadi
sweet apex
#

but i also might just be misunderstanding

twin wadi
#

when you make clothing, there's two big columns of the tilesheet; the left is the nondyeable masks and the right is the dyeable masks. so in the example it mightve been that the outline was in the dyeable part

#

im a bit sleepy rn tho i might be wrong

vernal crest
#

Are you talking about Fashion Sense clothing sugar or regular clothing? Because they work differently

twin wadi
#

oh nvm! i havent used fashoin sense

#

*fashion

#

im probably wrong then

left nova
#

@ivory plume Hey Pathos, since .16 focus on event update, can we have the event command emote use name instead of IDs, like emote happy instead of emote 4? I find it hard to remember the emotes ids.

#

(Just a suggestion, can we add our own custom emotes?)

sweet apex
#

oh okay. yeah ik they use diff systems, and my question is specifically abt how fashion sense does it

twin wadi
#

i just read through the fashion sense wiki article about colormasks, and since it was a quick skim, just take it with a grain of salt. but i think since you name the color masks, the player gets to set the color for each section?

vernal crest
sweet apex
ivory plume
# left nova <@226803198218731520> Hey Pathos, since .16 focus on event update, can we have t...

Hi! Emote aliases would be fairly low on the priority list, but you could create dynamic tokens to do things like /emote {{happy}} instead of remembering the IDs.

Custom emotes might a bit too specialized to support in the base game, unless it's something many mod authors would use. Unfortunately there's a performance/memory impact to data assets, and it might not be worth the cost for emotes.

steel plaza
#

wait how do i use the when conditions? like i'm currently re-coding my Decoratable Cabin mod, but i have 3 maps 2 of which i want to use as overlay to be used when the building is not yet upgraded, once it is upgraded once it will remove 1 overlay and last upgrade will all the overlay, im using the oasis greenhouse mod as a basis

#

main map(as you can see has the ladder and stair visible) basically when it is fully upgraded -> overlay 1 with no upgrade -> overlay 2 upgraded 1 time

spice inlet
#

mhm, nexus is giving out free backslashes for every apostroph SDVpufferthinkblob

vernal crest
sweet apex
tardy marsh
#

does anyone know which xnb file contains dialogues and strings for interactibles in desert club?

flat sluice
pseudo vault
#

I am not sure which channel to ask this in

tardy marsh
pseudo vault
light shore
#

so, i'll have a question dialogue in my event but when i response i dont know how to write my npc's reactions to them. i looked at dialogue guide so am i gonna just write like as it is?

flat sluice
#

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

pseudo vault
#

Okay thank you. I was unsure

flat sluice
#

I can have a look and try to help you

brittle pasture
light shore
#

like i just wanna have 2 different reactions yk

light shore
#

i looked at other npc's events but they just have questions

flat sluice
#

I recommend using debug ebi deadxl.atsushi_GraveVisit in-game to find out, and test both variants.

light shore
ocean sailBOT
#

Log Info: SMAPI 4.2.1 with SDV 1.6.15 build 24356 on Microsoft Windows 11 Home Single Language, with 12 C# mods and 8 content packs.
Suggested fixes: One or more mods are out of date, consider updating them

flat sluice
#

Well, you use speak and then try to divide the event in that command. I don't think that is possible.

light shore
#

like am i just gonna write speak NPC event_sorry?

flat sluice
#

I recommend - as I said - looking at the wiki link I sent you and reformate the
speak NPCAtsushi \"What the hell are you doing here?! Did you listen to me?!$8#$q 1001001/1001002 Mind your own business!$0#$r 1001001 0 event_sorry#I'm sorry..#$r 1001002 -10 event_yes#Um, yeah but.. who's grave are you talking to anyway?\"/
part to use quick question command instead.

vernal crest
vernal crest
sweet apex
vernal crest
sweet apex
pseudo vault
#

I am not sure I understand what this means.

#

How do I specify it?

vernal crest
#

It just means you have to write it in both places

#

And it has to be identical across the two.

pseudo vault
#

Do I need to change the MODId into moddername.HMGBAFARM?

#

That's currently what it looks in manifest

vernal crest
#

No, {{ModId}} is a token. Content Patcher will automatically fetch your mod's unique ID from the manifest and put it in there in place of {{ModId}} when you run the game.

#

So it will turn the ID of your farm into moddername.HMGBAFARM_HMGBAFarm

pseudo vault
#

Oh...

#

Should I write something else? I am not too good at coming up with stuff.

vernal crest
#

Why would you need to write something else?

pseudo vault
#

Thought it might be bad because it says HMGBAFARM twice just one with less caps.

vernal crest
#

Nobody in game is going to see that part. It's just a descriptive identifier for your farm that ensures it's unique in game.

pseudo vault
#

Okay.

vernal crest
#

My NPC's internal name is Abagaianye.HiriaNPC_Hiria, which looks silly because it has her name twice.

#

It's normal to have things like that happen. It's more important for it to be properly descriptive of what your mod is and what the item you're giving an ID to than that it doesn't repeat.

pseudo vault
#

Oh yeah... Did I screw up the mod because I forgot to add the assets folder before making the mod?

#

Since it's a map

#

There was so much info I am confused

vernal crest
#

You don't have to have an assets folder. It's just convention. The mod will still work even if you have your map in the same folder as the content.json. People use folders like assets or data to keep their mod folders tidy.

pseudo vault
#

Okay.

#

Is this correct?

vernal crest
#

No, that's meant to be two different images, not just the HMGBAIcon.png. The {{TargetWithoutPath}} token is not meant to be replaced with your own file name, it's there to tell Content Patcher to look for an image called Icon.png to load into Mods/moddername.HMGBAFARM/Icon and then after that look for an image called WorldMap.png to load into Mods/moddername.HMGBAFARM/WorldMap.

pseudo vault
#

I'll be honest... I just copied that from the tutorial page...

vernal crest
#

I know you did and that's fine. The example is there for you to copy it. It's encouraged to do so :)

#

But you changed it. It was "FromFile": "assets/{{TargetWithoutPath}}.png". And as I said, that {{TargetWithoutPath}} bit is another token. It's not meant for you to replace with your own text, it's there to perform a function.

#

If you go to your mod folder and change the name of your HMGBAIcon.png file to just Icon.png and then make a new file for the WorldMap image called WorldMap.png you can use the {{TargetWithoutPath}} token to get Content Patcher to use them.

#

You'd need to change your FromFile to "FromFile": "{{TargetWithoutPath}}.png" as well.

steel plaza
pseudo vault
#

Okay I fixed the icon stuff. The example did not come with a worldmap line.

ocean sailBOT
#

Log Info: SMAPI 4.2.1 with SDV 1.6.15 build 24356 on Microsoft Windows 11 Home Single Language, with 4 C# mods and 1 content packs.

vernal crest
pseudo vault
#

OH

#

I don't need a FromFile for it?

vernal crest
#

No you do. I just told you what you need to change your FromFile to.