#making-mods-general

1 messages Β· Page 192 of 1

lucid iron
#

Looking forward to ichor's mystery mod

tribal ore
#

Guys help me. I discovered TriggerActions and it's like I have a new addiction

#

I have added a whole goddamned rehab arc to my mod because of it. I can't stop.

#

I can do anything now

fervent horizon
tribal ore
#

Bout the only thing I haven't been able to figure out how to do with just CP is send a kid to the farmer's house to be adopted

lucid iron
#

I think you can have event on the day after right

rigid musk
#

Could anyone explain, in the most elementary - I have zero brain cells way - how the advancedMove command works

#

I can see why I would want to use it in events instead of the general move one but my brain is refusing to understand how it works even with the examples provided

slender badger
#

The basic advantages of advancedMove are that it allows you to condense a string of move commands into one command and it's also much easier to have mutiple actors moving simultaneously

#

How you use it depends a bit on what exactly you want to do, but as a basic example, here's a bit I did in No More Floor Fish to make Sam and the farmer walk at the same time and then pause while waiting for the other to finish:
advancedMove Sam false 0 1 3 0 0 -6 -1 0 4 1000/advancedMove farmer false 0 -1 -2 0 0 -1 -1 0 4 1000/waitForAllStationary/

rigid musk
#

oh i like that wait command at the end there

slender badger
#

The false is a true/false on whether you want the action to loop (which is useful if you want a character running around on loop in the background or something), then the numbers are pairs of movement commands like your regular move command has, just without the facing direction at the end

#

The last two numbers (the single digit and the 1000) are a wait command to face in the direction of the single digit and then wait for the specified number of milliseconds

slender badger
# rigid musk *oh i like that wait command at the end there*

Yeah, if you're using advancedMove, you definitely want to pair it with waitForAllStationary because other commands happen at the same time as advancedMove, so if it's not there or if you don't have a long enough pause for the advancedMove to finish, the advancedMove will stop partway through and things will get wonky

rigid musk
#

This was very helpful thank you so much Airyn! wiggle

#

I don't know why but the way the wiki explained it really wasn't getting through to me tbh_seen

tiny zealot
#

silly warning about waitForAllStationary: if your users have Random Cats in Events installed, those count as NPCs, and the command will wait for them, even if they're offscreen and no matter how long it takes

slender badger
#

Oh no SBVLmaoDog

rigid musk
#

Gotta wait for them! they're important!

lusty elm
#

If I enter a mod idea with a firm fixed goal in mind, that also involves it being small as a base requirement, I can avoid scope creep. otherwise I tend to get scope creeped Hard, at least 3 of my hiatuses are from scope creep that I couldnt accomplish and just lost motivation. SDVpufferchicksweatsip

tiny zealot
#

the other thing that is semi-fucked about move vs advancedMove is that they calculate being done differently, so if you have done a positionOffset on an NPC previously, move may never decide to stop walking and softlock your event, while advancedMove will work fine

rigid musk
#

My problem with scope creep is that I never truly know fully what I want to do. I have a concept, and an end goal, but I'll be making the mod and then realize 'hm what if I add these things and it would make it better and more interesting' ... and then I end up having to script and code 13 events

tiny zealot
#

(i suspect it is because advancedMove takes the offset into account and move does not, but i haven't looked into it)

royal stump
#

(still actively working on stuff that's been delayed by scope creep for, uh, a while)
(not that I was active during most of that time, but that's also why SDVkrobusgiggle)

lusty elm
#

rooBlank I didnt realize you were trying to Launch 2.0 as a goal Before I even published my first mod.

royal stump
#

FTM's needed an overhaul since I released it, really SDVkrobusgiggle it wasn't made to be controlled by mods at first, just player settings

#

(then had a brief period of "have people download this json into their ftm/data folder", then actual packs)

fervent hound
#

so, I don't understand content.json files and will literally pay someone to code them for the two mods that I have. I'd obviously credit you on my mod pages.

tiny zealot
#

!commissions

ocean sailBOT
royal stump
#

^ the Code/Content Patcher Code lower down is probably the right group

light shore
#

hey uh i have question this is my first time making a mod so for my custom npc i did a house for him but it doesnt appear on the map even smapi doesnt tell it

#

and when it appears on the map i cant go inside even i make a warp

tiny zealot
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.

tiny zealot
#

(the first link is where to go)

fervent hound
light shore
acoustic summit
#

Im silly, and unfamiliar with map patches

tiny zealot
# light shore

how did you arrive at this format for your content.json? (i am thinking in particular of "did you follow a specific tutorial or video")
there are some important things wrong with it

acoustic summit
#

I was a little confused by the trying to warp to it, part.

acoustic summit
#

It does seem like you are trying to add a location for the inside

light shore
#

i tried everything but i cant do coding

acoustic summit
light shore
#

and the exterior

light shore
acoustic summit
#

The mod id is what is inside your manifest.json in "UniqueID", also I am so sorry I don't how how to remove embeds

tiny zealot
# light shore lol kind of

did you ask chatgpt to make this file for you? MapChanges is not a valid field for EditMap actions, and you should not be using format 1.27, and a few other things

light shore
#

its so confusing

tiny zealot
#

ok, so we have arrived at why it doesn't work πŸ˜…
do not use chatgpt to write mods. this is what happens

light shore
tribal ore
#

Petition to make SetWeather a built-in action that can be called by events and triggers

#

Please just let me make it rain

rigid musk
#

CJB Cheats...

acoustic summit
rigid musk
#

or there's a debug-

#

OH i misread that

light shore
#

i appreaciate it

lucid iron
#

It's a learning curve, but you can do it wew

acoustic summit
#

!anyonecancook

ocean sailBOT
#
light shore
#

I wish there was a ready code or something 😦

tiny zealot
#

!npc there's a template and a tutorial for a new custom npc!

ocean sailBOT
#
Creating a Custom NPC

Keep in mind that making NPCs is a complex process that requires learning many different aspects of Stardew modding.
Here are a few links that can help get you started on all that you need to know:

slender badger
#

!modideas It might be that making mods isn't for you if it's that confusing πŸ™‚ You can always put your idea on the ideas github instead if you want

ocean sailBOT
#

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

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

lucid iron
#

Well there is, just look at other mods

rigid musk
acoustic summit
#

The great thing about CP mods is that you really can open any one of them up and learn from how they do things!

slender badger
rigid musk
# light shore I wish there was a ready code or something 😦

If you need help I am more than willing to let you use what I have as an example! Making Mr.Qi into an NPC has literally been a culmination of years of me making individual smaller mods to learn how to do the small things and then putting all of that knowledge together (as well as the help from the people in this lovely discord server) to make a bigger one

#

I am very much pro 'please use my stuff to learn' :3

rigid musk
rigid musk
#

Will I ever utilize it? ... maybe one day if I decide to make another cutscene for Qi
but I think the many like ... 16 I have for him is fine

#

Spacecore is another framework mod :3

#

I used it in my mod (as an optional dependency) to add descriptions to my furniture items

#

yet another example of scope creep

light shore
tribal ore
#

Trying to avoid adding extra mods with mine. Though I am sorely tempted by the SecretNotes framework

light shore
#

im still looking at wiki

rigid musk
tribal ore
#

I'm working aroudn it right now by mailing them a rain totem

#

But it would be nice for CP to include SetWeather or something

rigid musk
#

No no I meant if you wanted to include a scene where it just starts raining DURING the event

#

optional dependancy for spacecore for that

rigid musk
#

you could just include a mail for the rain totem though

tribal ore
#

Still!!! The totem is a partial solution. I want to be a weather god xD

#

Just sad it doesn't exist

#

Thanks for pointing me at SpaceCore. I'm going to look at it just for ideas for future stuff πŸ™‚

uncut viper
#

(BETAS has a "set weather for tomorrow" action)

tribal ore
uncut viper
tribal ore
#

Ooooooooooooohhhhh

#

Thank you @Button for making this! I'm really trying to avoid extra mods, but this is amazing

uncut viper
#

if y'ever need any other actions or anything in it feel free to ask SDVpuffersmile

rigid musk
# light shore omg thank uu i just want my home in the map lol

So creating a custom location requires three primary things-

Loading the TMX file/map location
Actually Adding the location
Adding a warp TO the location
there are also other things like if your location needs a house or something similar to that which would require map patches and what not

tribal ore
#

Button, what does Spiderbuttons.BETAS_RemovePlayerModData actually do? Could I call that to reset a mod to it's starting state?

light shore
uncut viper
#

it changes an entry in the Farmer.modData field that normally only C# mods can access

rigid musk
uncut viper
#

ModData is like CustomFields but stored permanently on the player

tribal ore
uncut viper
#

it would not no, it's just for being able to read and write arbitrary persistent data

tribal ore
#

Thank you πŸ™‚

light shore
tribal ore
#

Actually, that's a question. When the player uses the shrine to erase an NPC

#

NPC's memory, what happens to mod stuff?

acoustic summit
#

The warp has no where to go since you need to add the location for the warp to use πŸ™‚

light shore
#

i added warp like this on tiled

tribal ore
#

Cute house! πŸ™‚

acoustic summit
#

Yep! Thats a beautiful home btw! The warp command works on locations, not maps πŸ™‚

light shore
acoustic summit
#

So when you reference "AtsushiForestHomeIn" that needs to be loaded as the internal name of a location

rigid musk
#

oh that is a lovely home

slender badger
slender badger
#

Which does have open permissions, but you need to specify here in the server that it's not yours

rigid musk
#

oooo ouch there - make sure you mention it next time though

slender badger
light shore
#

uum

rigid musk
#

For a warp like that you would likely need a lockeddoorwarp

light shore
rigid musk
#

It's okay - like Airyn said it has open perms, just make sure to mention where you got it from

slender badger
#

It should be pretty obvious that you don't take credit for someone else's art and you say who the artist is when people compliment the art.

acoustic summit
#
       "Action": "EditData",
        "Target": "Data/Locations",
        "Entries": {
        "NIVInnerInsec": {
        "DisplayName": "InsideInsectarium",
                "DefaultArrivalTile": {
                    "X": 40,
                    "Y": 52
                },
                "CreateOnLoad": {
                    "AlwaysActive": true,
                    "MapPath": "Mods/NatureInTheValley/Maps/InsectariumInterior"
                },
                "CanPlantHere": false,
                "ExcludeFromNpcPathfinding": false
            }
        }
    },``` 
Thats an example of adding a location, for reference.
#

The exact settings will be different, but thats again where you'd need to refer to the locations wiki

#

"NIVInnerInsec" would become "AtsushiForestHomeIn"

#

And the "MapPath" will use the map path that you already loaded SDVpufferthumbsup

light shore
acoustic summit
#

I mean you can, idm! Just change whats needed

#

You also probably dont need "AlwaysActive"

rigid musk
#
            "LogName": "Load Room Location",
            "Action": "Load",
            "Target": "Maps/AngelOfStars.Mrqifriendable_QiRoom",
            "FromFile": "assets/QiRoom.tmx"
        },```

and loading said map woud look something like this
light shore
#

what means NICVInnerInsec

acoustic summit
#

They loaded the map already, but yep!

rigid musk
#

minus the log name, you dont need logs, i just use them for content patcher stuff

#

Ohh i didnt know they did thats good

acoustic summit
rigid musk
#

That's the name of their map you have to replace things with stuff that relates to your own individual map

light shore
#

oh okay got it

#

so what about the coordinates should i write the inside of the home entrance or the outside

rigid musk
#

the default arrival tile is where people ... default arrive really - so probalby at your enterence to the house near where the door is

lavish quail
#

okay, so... can someone guide me through making a custom npc? i feel stupid and i have like 5 tabs open from trying to figure it out 😭

median dune
#

uh, can you give any more specifics? I can't seem to find anything, also it may have not been clear but the inventory I want to add isn't meant for the player, I want it to be openable like a chest but not directly tied to them idk if that changes anything. To be exact I want this inventory to be opened via dialogue

rotund elm
#

Are there any other framework mods besides that I could be utilizing right now I see the mail framework mod and spacecore and that’s about it

acoustic summit
#

!npc Some temples and guides here!

ocean sailBOT
#
Creating a Custom NPC

Keep in mind that making NPCs is a complex process that requires learning many different aspects of Stardew modding.
Here are a few links that can help get you started on all that you need to know:

lavish quail
lucid iron
#

You don't have to subclass itemgrabmenu but i did because i was gonna do more draw stuff

lavish quail
#

i will do my best to make sense of these things and i will come back here if i need assistance. i've never coded anything before, i'm a complete newbie SDVpufferwaaah

ocean sailBOT
lucid iron
#

Hm where did the list of framework go

#

!startmodding

ocean sailBOT
#

Making mods can be broadly divided into two categories:

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

lucid iron
#

Ah here

rotund elm
#

Thank you πŸ™

lucid iron
#

Frameworks are more if a "as needed thing"

#

Like you can send mail without mail framework mod

#

So it's probably nicer for user that you don't

lavish quail
#

i'm already back... i'm puzzled by this, i have no idea how to add these types of files πŸ˜“

acoustic summit
#

Go to the folder, add a text file, at the end of it's name replace .txt with .json πŸ™‚

lavish quail
#

ohh okay! thank you :D

light shore
ornate trellis
#

or directly use notepad++ to make a json

ornate trellis
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.

ornate trellis
#

its always best to send a json through the smapi site to make people look at it

modest dagger
#

isn't the format like, much higher than 1.27?

calm nebula
light shore
slender badger
acoustic summit
# light shore is it true now ...

There's some errors in the json formatting, and you still want to load the other map you were loading before. Also; disable "AlwaysActive" and change the display name πŸ™‚

light shore
#

oh i didnt see the display name

median dune
lucid iron
#

You can try it in game if u want

#

Dl the 1.5.0.beta from release and the mod called trinket holder

#

Whenever you use a trinket there u open a chest like menu

median dune
#

right thats actually a great idea

lucid iron
#

This is also the system used for junimo chests

#

So u can trust it is reliable

#

As long as u don't lose the key to ur global inv somehow

calm nebula
#

(Vmv ender chests also use that)

lucid iron
#

In my case i generate a guid on first attempt

#

And keep that in mod data to serialize

calm nebula
#

Well, on the empties

lucid iron
#

Really

#

Well that was a side thing

#

The main case is u delet trinket with stuff in it

uncut viper
#

hey atra

#

what's your solution to the cyclic dependency problem of a framework that copies data from other assets into itself

#

chu and I need it

#

collab

calm nebula
#

That's my solution

uncut viper
#

can you turn that into pseudo code for me thanks

light shore
#

i checked it but didnt understand again where did i do wrong...

#

im feeling so dumb

lusty elm
#

My brain is not awake enough to do what I want it to do, i need more caffeine i guess... or food? I haven't eaten today yet...

rigid musk
light shore
#

i dont know how do i do that

lusty elm
#

boot up the game, load your save file, go to the smapi command console that pops up with the game, and copy paste in "debug warp AtsushiForestHomeIn" hit enter

lavish quail
#

i'm once again confused... πŸ˜“ i don't have anywhere for the goober to spawn yet, is this required?

rigid musk
#

yeah otherwise they wont spawn in

#

you could set it to like... the forest

#

while testing

lavish quail
#

okay cool

rigid musk
#

or for them to just sit in the town square etc

lavish quail
#

uhh

#

idk what to put for that

#

i'm sos orry i'm a complete newbie to coding 😭

rigid musk
#

"Location" would be whichever map you want "Tile" is the tile location on said map "Direction" is which way they face

light shore
#

the mod doesnt work

rigid musk
#

Have you unpacked the game files?

light shore
#

it doesnt appear

rigid musk
#

can you send a SMAPI log @light shore

#

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

rigid musk
#

!unpack

ocean sailBOT
#

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

lavish quail
#

ohh

rigid musk
#

:3

lavish quail
#

okay cool ty

rigid musk
#

its really helpful

#

Thatll give you all the map names - and so much other stuff

#

A lot of it can be used as examples too!

#

at least generally

ocean sailBOT
#

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

acoustic summit
#

Though I think you removed the map patch for the exterior

rigid musk
#

Ah yeah idk how i didnt see the formatting issue lmao

acoustic summit
#

Just some missing brackets, missing ]

rigid musk
#

the brackets... its always the brackets...

rigid musk
#

Uh can you send the error log with the log parser not the json one

lavish quail
#

WINDOWS STOP PROTECTING MY PC

#

oh oops

ocean sailBOT
#

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

light shore
#

i was just confused lol

lavish quail
rigid musk
#

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

rigid musk
#

I'm not sure how to use mods that add other tilesheets (I've never used them before actually)

light shore
ornate trellis
#

I think you delete them out before shipping the mod and jsut throw in a dependency in teh manifest?

light shore
#

i didnt delete any tilesheet actually

rigid musk
rigid musk
ornate trellis
#

while still editing you shouldnt but to to boot up to check if everything works then probs a good idea(and then to just undo the delete to get em back)

rigid musk
#

Again your issue IS the tilesheet climbing issue (aka your tilesheets are in a folder that isnt the same as your map) so you need to fix that (not by putting said tilesheets in the same folder as the map - especially if you intend on releasing the mod) but by fixing the climbing issue by removing the paths (as explained with the command i sent)

#

Funtime Void is right as well because you need to add a dependancy for Daisy Niko's Tilesheets so that those can actually load since you used them

lavish quail
#

time to pause trying to make the mod and wait for profiles and sprites, yippee! :D

unborn fog
#

Quick question.
Is there a known way to fix Daisy Nikos combatting with Rustic Interiors and WBPT?
Yes, I know there is a support channel but this is a small question that isn't entirely bothersome to my game. Also I was directed, (I think) to toss this here.

latent mauve
#

My comment was directing Dottie, but we can probably answer that here as well, since it'd likely require mod editing?

rancid musk
#

I turned on a debug flag in Visual Studio, and now Stardew won't launch in debug mode, and I can't find the flag in options to turn it back off. Woooooooo

unborn fog
light shore
#

am i just gonna remove the <image source="paths" width="64" height="256"/> or..?

latent mauve
unborn fog
#

I just forgot I have the interior mod-

#

I honestly thought the issue came from having the recolor. .

#

I really gotta make a modlist folks.

latent mauve
#

haha, then you can probably just drop that mod to fix your issue. xD

unborn fog
#

😭

#

Thank you!

craggy cape
#

says invalid update key

uncut viper
#

well your update key is invalid

latent mauve
#

okay, so, for the UpdateKeys, if you have "Nexus:" you have to have the Mod's ID number (the number on the mod page URL) in there.

"UpdateKeys": [ "Nexus:<number>" ],

uncut viper
#

theres no id in it

unborn fog
#

Okay, nevermind, I don't have DaisyNiko's interior.

#

So I don't know why Rustic is bugging out.

craggy cape
#

alr time to run a test again to see if it works now

#

i added the id to it so x)

unborn fog
#

Upon entering any place in town, opening a shop there, the frame and colors around the interior spaces experiences a lighting bug and flashes between many different frames, for specifics.

craggy cape
#

and says its all correct :D

dire canopy
#

Hey @uncut viper , am I doing something wrong in here?

                    "Id": "HorseshoeMagnetHold",
                    "Trigger": "Spiderbuttons.BETAS_ItemEquipped",
                    "Condition": "ITEM_ID Target (O)10",
                    "HostOnly": false,
                    "Action": "AddBuff FWB.Horseshoe_Magnet",
                    "Actions": null,
                    "CustomFields": null,
                    "MarkActionApplied": false
                },
                "Maru.MagnetUnq": {
                    "Id": "HorseshoeMagnetPlaced",
                    "Trigger": "Spiderbuttons.BETAS_ItemUnequipped",
                    "Condition": "ITEM_ID Target (O)10",
                    "HostOnly": false,
                    "Action": "RemoveBuff FWB.Horseshoe_Magnet",
                    "Actions": null,
                    "CustomFields": null,
                    "MarkActionApplied": false
                },```
latent mauve
uncut viper
#

(wrong Button)

unborn fog
#

I can, one moment^^

uncut viper
#

(also if the issue is now just with a single mod and they arent making it, thats tech support channel territory)

uncut viper
rigid oriole
#

In C# land, where should I be looking if I want to place an Object on top of a tile on the map that can be picked up by the player?

dire canopy
# uncut viper (wrong Button)

This was supposed to trigger the buff:

                "DisplayName": "{{i18n:Horseshoe_Magnet.Name}}",
                "Description": "{{i18n:Horseshoe_Magnet.Description}}",
                "IsDebuff": false,
                "GlowColor": null,
                "Duration": -2,
                "MaxDuration": -2,
                "IconTexture": "{{InternalAssetKey: assets/assets.png}}",
                "IconSpriteIndex": 2,
                "Effects": {
                    "FarmingLevel": 0.0,
                    "FishingLevel": 0.0,
                    "MiningLevel": 0.0,
                    "LuckLevel": 0.0,
                    "ForagingLevel": 0.0,
                    "MaxStamina": 0.0,
                    "MagneticRadius": 128.0,
                    "Speed": 0.0,
                    "Defense": 0.0,
                    "Attack": 0.0
                },
                "ActionsOnApply": null,
                "CustomFields": null
            },```
But it's not triggering
latent mauve
#

Fair enough, Otter and I can move over to #1272025932932055121 now since it's no longer editing a mod to prevent a compatibility issue.

dire canopy
#

at least I meant to when you hold the item you get the buff

latent mauve
#

(Sorry to make you relocate yet again @unborn fog )

uncut viper
#

oh, when you hold it? not equip it?

dire canopy
unborn fog
#

It's alright! I'll make a post and try to get videos/photos of the bug to further help and the smapi log. Would you like me to ping you upon it' creation?

dire canopy
#

because it's supposed to activate when you hold the magnet on top of your head, rather than equip it in any field

uncut viper
#

ItemEquipped only fires when you actually put equipment on and also when you select a Tool (dont ask me why, game does it)

#

but just holding any old item above your head isnt equipping it

latent mauve
unborn fog
#

Alrighty! Thank yous

dire canopy
lusty elm
#

hmmmm, rooThink I'm thinking about making a Farm Cave redesign for this map, but if I do, I know i'll have to make a config for it, so people can turn it off. Also I'll probably have people who want it as a standalone, also I'll need to figure out how the farmcave works in terms of determining spawn area for like the mushroom boxes vs Fruit.

uncut viper
#

its admittedly not a trigger im really keen on adding bc a trigger for "swapped to a different active inventory slot" happens like, constantly. that sounds like a recipe for lag

craggy cape
#

ok the json validator said everything was good but now smapi gave me another error.. SOBs

uncut viper
#

just scrolling through your hotbar would cause it to happen 12 times in like a millisecond

#

and each time would need to check every triggeraction edit to see if it applies

dire canopy
#

It's fine, I'll work around it

lusty elm
#

does anyone know offhand how the farm cave generation works?

craggy cape
#

line 29.. but theres no line 29.

uncut viper
#

there is a GSQ in BETAS for PLAYER_HELD_ITEM if you can find some way to use it

dire canopy
rare orbit
#

how do i simply target a set of sprites? trying to edit Sebastian's beach sprites and i just wanna target the vanilla sprites

dire canopy
light shore
craggy cape
#

wait what. why does the file from the riceball indicators say bunny.png LMFAO

uncut viper
rigid musk
twin moss
#

Hey there sorry to interrupt- I'm new to modding and by new I mean been trying to use AI to help me make a mod and sadly it failed. Would someone be willing to inspect my code I've been making in Rider?

uncut viper
#

do not use AI

#

i will not inspect AI generated code and i wouldnt expect someone else to want to either

twin moss
#

That bad?

rigid musk
uncut viper
#

also, AI generated mods arent allowed in here

lucid iron
#

what is up with this wave of AI today

twin moss
#

Oh, crap I ap[ologize

rare orbit
#

hello??

lucid iron
#

anyways the reality is that the LLM is not trained on SDV mods

#

it will fail confidently and we will go medlook

dire canopy
fervent horizon
#

A lot of AI models are out of date on current frameworks and SMAPI

craggy cape
#

oh im slow, the riceball pngs are named bunny. huh

uncut viper
craggy cape
rigid musk
#

You might not even need C# or anything for what you want... maybe

uncut viper
# dire canopy You could emulate Multi Yield Crops for example

the issue is that e.g. "Spiderbuttons.BETAS_SpawnItemDebris [itemid] [location to spawn it]" doesnt have a good way to figure out the "location to spawn it" part because it doesnt really have enough information. if you break a rock, for example, that can fire a "RockBroken" trigger, but how do you write the location to spawn it if you dont know where the rock is that they broke

rare orbit
lucid iron
twin moss
uncut viper
#

sometimes things just get missed, if its been completely missed its accidental 99% of the time and you can just reply to your message to give it a little polite bump. the other 1% of the time is the people around dont know the answer

craggy cape
#

fym line 29 it only goes to line 27

rare orbit
#

ahh

lucid iron
fervent horizon
rigid musk
lucid iron
#

but also

#

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

using editor that check 4 u is great

zenith robin
rigid musk
fervent horizon
#

Single parent adoption

rigid musk
#

Iirc you can do that by removing the crib pondering

#

Ohhh OH

twin moss
rigid musk
#

I misread it

uncut viper
#

i also misinterpreted it the same way i think but that makes more sense

fervent horizon
#

Maybe tie it into a phone call

wanton pebble
#

!chatgptcode

ocean sailBOT
#

Please stop trying to get ChatGPT to write your C# mods for you, especially if you don't know how to write C#. It won't work without heavy editing, and it wastes everyone's time.

Large language models fundamentally are reguritating something from their inputβ€”which is roughly speaking, the written output of humanity up until 2021 or so, for ChatGPT. For specific, niche topics like "is this framework going to do what I want" or "which things does Game1.cs have access to", it probably has no idea! But it's good at detecting that people in the past have....said things about frameworks and written things in C#, so it does its best to assemble words and symbols into a nice order for you. Sometimes it tells you true things, and sometimes it tells you false things, and if you can't detect when, you're in trouble. When you're writing code, this usually produces garbage, because you can't be "sort of similar", you have to be exactly correct or it won't work.

rigid musk
#

O: that's a very cool idea - I do think it'd need C# though pondering Unless you could use CP to trigger the dialogue box to pop up with a custom text...

uncut viper
#

hmm im actually surprised ive not seen a mod for it before

rigid musk
#

Me too honestly

wanton pebble
#

I do appreciate the wave of people WANTING to mod though SDVpuffersquee

blissful panther
#

(Or make Superman, and have a chance for any meteor crashed on your farm to come with a definitely not Kryptonian.)

fervent horizon
#

It is a great idea for a mod

dire canopy
#

thanks

wanton pebble
#

It's exactly the kind of place the guy would love. Surprised nobody has made a mod for it

fervent horizon
#

Maybe put it in the ideas github and someone might pick it up

rare orbit
#

the files are set up right??

blissful panther
twin moss
#

Where would be a good place to learn C# for future attempts at making the mod myself though?

fervent horizon
uncut viper
wanton pebble
#

What's that command with the c sharp yellow book

uncut viper
#

!yellowbook

ocean sailBOT
wanton pebble
#

There you go

uncut viper
#

(i had no idea if that would work)

twin moss
#

Omg you guys are awesome

lucid iron
#

Stardew valley is like

#

Minnesota instead of kansas

wanton pebble
#

My workplace also offers a C# course So I'll be using that plus the book here next month

lucid iron
#

But there's corn so it's close enough

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

uncut viper
#

the wiki tutorial for content patcher specifically

#

it also links to the content patcher documentation (see "full Content Patcher readme" at the top)

royal stump
#

SDVpufferlurk fwiw about spawning debris items earlier, I'm actively working on trigger action stuff for FTM atm & can probably add that as a spawn type once it's done (though that'll be a while, & not trying to discourage Two Cakesℒ️ in any case)

craggy cape
#

oh my god im so close to fixing this mod. all i need now is to figure out the configschema thing..
"[Content Patcher] Could not load content pack 'Rice balls relationship indicators': using the ConfigSchema field requires Format version 1.3.0 or later."

uncut viper
#

how do you plan on solving figuring out where exactly to spawn the item debris when you dont know where the trigger takes place

royal stump
#

I just finished a tile query system for that in particular, aside from adding more conditions, e.g. "Tiles": "AREA 5 5 10 10, IsPlaceable"

uncut viper
craggy cape
#

so i just change it to 2.5.1 and itll work?

uncut viper
royal stump
#

(incidentally, I can probably put that in the API if it's helpful anywhere else)

uncut viper
craggy cape
#

okie!

uncut viper
#

assuming you have CP version 2.5.1 installed

royal stump
craggy cape
#

yup 2.5.1

royal stump
#

e.g. that query up there would return anything between 5,5 and 15,15 that isn't obstructed, in random order

#

-> the action itself eats that and places a number of items based on some other fields/args

uncut viper
#

but you cannot possibly know the location of the mined rock beforehand

fervent horizon
#

Wouldn't the mined rock be 1 space in front of the player location

uncut viper
#

not necessarily

royal stump
#

ah, yeah, I'm not sure if it's relevant in that context then SDVpufferthinkblob I'm not sure about passing context like that

fervent horizon
#

I guess not for a bomb

uncut viper
#

mods might increase the reach, or have the pickace work in a grid like the water bucket, bombs also count as mining

#

i can pass the location of the rock into the context, but then the issue becomes how to make it generic and work on things that arent just rocks

fervent horizon
#

yeah, and there are no properties to read when a object is broken?

uncut viper
#

im not sure what you mean

#

an Action doesnt react to anything

light shore
lucid iron
#

there are ways to read object is broken

#

but i think what button is getting at is that there's a broken pipe in here

uncut viper
#

the Trigger reacts to something, the Action is context-agnostic

#

like, consider putting a SpawnItemDebris action in a dialogue command? or a letter? it can be used anywhere that an Action can be used

#

in a dialogue command you'd might wanna spawn it at the NPCs feet. in a letter, maybe the mailbox? or maybe at the farmers location, for both. i havent come up with a good, not-confusing way to allow for generic possibilities like that

fervent horizon
#

Ah, I see now

royal stump
#

yeah, that'd probably involve a lot of preset unique values that might also only work in 1 context

craggy cape
#

thank you all <3

#

i got it to work SDVpuffersquee

lucid iron
#

hm but

royal stump
#

(incidentally I need to remember to give spawn actions an optional "spawn on this specific tile" arg, not just a custom field)

uncut viper
#

i actually cant think of a good but confusing solution either actually, bc for a custom Trigger adding context is easy, but adding it to something like a dialogue command is... impossible, unless i transpile the dialogue parser. which

#

is not ideal!

lucid iron
#

i remember theres shenanigans with debris appearing on locations that ur player is not in

#

it just dont bc not loaded

royal stump
#

it's been a few major versions since I bothered to spawn debris anywhere, since mobile 1.4 only supported it at current location SDVpuffersquint

uncut viper
#

(and also thatd ONLY work for the dialogue parser. id need to do the same for buffs, letters, museum rewards... anywhere that an action works. which ofc wont count modded ones)

royal stump
#

I think it used to be fine anywhere on PC depending on which spawn method you used, but idr for sure

lucid iron
#

the particular context for this was

#

rokugin has a mod that needs to collect bush shake drops

#

in trinkets i was able to do the catch debris method bc well its trinkets, player is there

#

rokugin couldnt for some reason, most likely player is not there, so ultimate it just use api

wanton pebble
uncut viper
#

tbh the other issue with a spawn item debris action is like. its not necessary either, itd mostly just be for fun, since you can just add the item to the players inventory directly

wanton pebble
#

Self study is good! It's also a little limiting if you have lots of questions and you don't want to bug people 5k times for answers XD

uncut viper
#

some visual flair

lucid iron
#

yea

#

tbh i think it is good argument to just restrict to player current location blobcatgooglyblep

#

cus if u r not there then why not just do placed object

uncut viper
#

restrictions... SDVpufferpensive

#

PlaceObject wouldnt be a bad idea tho

#

does picking them up work with just objects generically or does it only work with crops and like, quest items

lucid iron
#

gotta get in on the spawn items framework competition PecoSmile

#

so some objects do funny things when placed

#

for example fence becomes a real fence

#

need tool to break

fervent horizon
#

Monster musk has to be broken like a machine

lucid iron
#

its not very clean but maybe thats the point

#

let me drop a bomb in front of my house every day

uncut viper
#

thats a TAS not an object innit

fervent horizon
#

I only know that because I have a rooster that "finds" monster muck

royal stump
#

I think bomb melts into a tas when used, yeah

uncut viper
#

probably be easier to just make an Explode action

lusty elm
#

On The Farm Cave:
~So it looks like the Farmcave's warp property does nothing, and the exit warp is hardcoded instead?
~The Mushroom Boxes are fixed in location based on coordinates.
rooThink
Not a lot of wiggle room.

rigid musk
rigid musk
#

I would have to actually see what yours looks like to know what the full filepath you have to remove is

lucid iron
#

while sorta keeping the original cave cleared

#

i dunno about warps, maybe the Action and TouchAction ones will work blobcatgooglyblep

lusty elm
#

yeah, but at the same time, it doesnt work well for the space i was thinking of putting the cave on the map, I had room to go up with my planned location but not east/south rooThink I see why so many farmcave edits just add a ladder with a zone below that they have free reign over.

lucid iron
#

what if u do something dumb like

#

a interior warp that goes to some down/right part of map

#

but is implied to be top/left via a touchwarp

uncut viper
#

why is your tmx a txt

lusty elm
#

at that point there isnt much of a difference from just having my own map rather than the cave, the hope was I could make a large farmcave rooThink i'll have to brainstorm on it.

uncut viper
#

is that what discord usually does for tmxs.. ?

light shore
lusty elm
#

i believe normally its just a Downloadable file, but you can open them as a text format, and maybe they sent that?

rigid musk
#

Also some of your filepaths look like they're just vanilla assets but you renamed them? which if you want them to load from the game they need to be named after the actual tilesheets

#

i.e. 'pathshj' - if it's supposed to be the 'paths.png' it needs to be named that

#

(from the vanilla game)

#

if its your own tilesheets you have to load them in if you have them in an assets folder iirc (i just keep all of my maps + my custom tilesheets together/ in the same folder)

light shore
rigid musk
#

I also dont know why theyre tsx files and not pngs

#

you can choose not to rename them

light shore
rigid musk
#

for future reference you can drag vanilla tilesheets into the same folder as your map and delete/move them out when you're done to avoid the tilesheet climbing thing

#

I don't actually know honestly

#

I just know that all of the ones I use are pngs

#

and the ones other people use are also pngs

lusty elm
gentle pebble
#

Ok so im on the part of modding where im trying to make a map for my NPC (im using Tile) Im making the mod for my gf I actually dont play stardew so I dont 100% know how everthing works. She plays with Stardew Valley Expanded is it possible for me to put a house on a already existing map such as on stardew valley expanded like in empy space. Or do I need to add a warp?

lusty elm
#

Okay, so its not that rooThink

light shore
# rigid musk

i delete it now but when i opened the map in tiled it cant find the files

rigid musk
#

Yeah because it doesn't have the filepath anymore - if you want to edit the map (or need to) drag the tilesheets you used into the same folder as the map like I said

#

itll prevent it from doing the tilesheet climbing

#

(and again, rename those vanilla ones to the actual vanilla names or else they wont work in game)

light shore
#

should i make them png?

rigid musk
#

yes (i still have no clue why they arent)

lusty elm
#

yeah I have no idea either

uncut viper
#

well if they are tsx files then you can't just rename them into pngs

#

so make sure you're not doing that and actually grabbing the actual tilesheets

ivory plume
#

(Note that SMAPI / Content Patcher do support .tsx tilesheets, and there are advantages like sharing animations between map files.)

rigid musk
#

Ooo very interseting

uncut viper
#

probably got exported from one of the vanilla maps

modern ether
#

I'm so stuck. I'm trying to lower the price multiplier for wine so that it doesn't sell for quite as much money, but I can't figure out how to do it. I've tried Content Patcher and Producer Framework Mod, and it hasn't worked. I was told here previously I need to use C# but I have no idea where to even start in that regard

rotund elm
#

Has anyone made a mod to allow 32*32px object sprites yet?

light shore
blissful panther
#

@dusk mulch Okay, the actual final thing is ready for testing. Some minor tweaks to the JSON format:

"Changes": [
    {
        "Action": "EditMap",
        "Target": "Maps/SeedShop",
        "MapTiles": [
            {
                "Position": {
                    "X": 8,
                    "Y": 18
                },
                "Layer": "Buildings",
                "SetProperties": {
                    "Action": "PEEM_InteractionGetItem YourMod.YourItemPickupID"
                }
            }
        ]
    },
    {
        "Action": "EditData",
        "Target": "PEEM/ItemPickups",
        "Entries": {
            "YourMod.YourItemPickupID": {
                "ID": "YourMod.YourItemPickupID",
                "ItemID": "(O)256",
                "Quantity": 4,
                "DaysToRefresh": 3,
                "LocationName": "SeedShop",
                "Tile": {
                    "X": "8",
                    "Y": "18"
                }
            }
        }
    }
]

Essentially, anything MEEP was renamed to PEEM. Other than that, there should be no changes. And the pickup cooldowns should work with multiplayer, but it's completely untested. You'll want to just bundle it alongside your mod once it's been tested enough.

Attached the zip here: #making-mods-general message

light shore
#

im still trying to fix it tho

brittle ledge
brittle ledge
#

!NPC Pretty sure I link to the map patches tutorial in the first link

ocean sailBOT
#
Creating a Custom NPC

Keep in mind that making NPCs is a complex process that requires learning many different aspects of Stardew modding.
Here are a few links that can help get you started on all that you need to know:

lusty elm
#

rooThink if you use a click warp, does it let you do it on a horse or do you have to dismount

brittle ledge
#

I think you can? Based on the mines, anyway

#

Those should be click warps and I can get on them while on the tractor (though the hitbox is a bit wonky)

blissful panther
brittle pasture
#

(I have to run for a couple hours, can't stay to elaborate sorry)

gentle pebble
lucid iron
#

The only issue is other mods adding more wine rules

#

There's not that many i feel but cornucopia is one

#

Just rmbr to add for those as well

modern ether
lusty elm
#

Hmm just tested, it makes me dismount my horse

brittle ledge
#

You will dismount if you miss, yeah. It often takes me several tries.

modern ether
hallow prism
#

good thing to do when making mod

#

test with only your mod and mods strictly needed

#

at least if you're stuck with something that should work but doesn't always work or you have doubt or it's likely to have interaction with stuff

lusty elm
hallow prism
#

i don't always do that (and sometimes i DO want to test interactions with stuff i play with), but if i need a clean troubleshooting stuff then i make a separate test folder

light shore
rigid musk
#

You don't have to do that - from what it appears you CAN use TSX files (according to the all mighty Pathos whos word I shall take as gospel in this situation)

I'm not sure why you could\n't use PNGs but you should be fine as long as your tilesheets are named with the correct corresponding vanilla file you got it from

#

i.e paths.tsx

rigid musk
# rigid musk

Specifically here - for any tilesheet that is vanilla, make sure you change the name to be the actual vanilla tilesheet name

uncut viper
#

tsx's just store some of the information thatd normally go inside the .tmx inside a different file instead, theyre completely fine, though if theres a bunch of little errors that compounded into one hard to untangle mess it sometimes CAN be easier to just start from scratch and redo it right, but that depends on how much you've done and how much you dont know how to fix (and your patience ofc)

rigid musk
#

for your own custom tilesheets im not actually sure how to load those in from a separate folder, i think you just need to have them loaded via your content json (and then adding daisy nikos as a dependency for those tilesheets)

#

That's true yeah

#

Sometimes it can be a breath of fresh air to just... start from scratch

uncut viper
#

like using a tsx in itself is fine, but if that tsx was imported wrong and uses the wrong name, and has wrong filepaths, and is out of order if using a vanilla map, then... it can just be kind of a mess

twin moss
#

Am I crazy? Isn't the phone menu located in menus not objects?

wanton pebble
#

(Personally speaking I hate TSXs in SDV mods, but that's just because when I started out modding maps I made a tilesheet into a TSX and it was a mess... and it was for a mod that wasn't mine that I was trying to update...)

#

(Never again SDVkrobusgiggle )

hallow prism
#

which phone menu?

twin moss
#

Like for the telephone furniture after clicking it, if I wanted to add an option to that menu I need to hook to it (still trying to grasp the logic bear with me)

hallow prism
#

oh, not the assets, the code part

lucid iron
#

The interaction code is probably in Objects.cs tbh

hallow prism
#

i can't help with code stuff

lucid iron
#

The part where menu is opened

uncut viper
#

you also cant just "add" an option to it, you need to regisdter your own PhoneHandler

twin moss
#

Damnit I was really hoping lmao

dire canopy
#

How many Active BuffIcons added by a mod is too many Active Buff Icons?

uncut viper
#

ask 100 users that and get 101 different answers

hallow prism
#

it depends if they can be active at same time or not

lucid iron
#

37 final answer take it or leave it

dire canopy
hallow prism
#

this isn't really answering me

uncut viper
#

if its permanent, my personal answer is 0

dire canopy
hallow prism
#

i mean

dire canopy
#

But this time, you get by completing special orders with Bachelors at 8 hearts

lucid iron
#

If it not simultaneous it's ok i guess, dunno what h be doing with polymod tho

hallow prism
#

well

#

one permanent icon is ok

lucid iron
#

Oh bachelor's ok i vote 0

dire canopy
hallow prism
#

more is depending of user, i would dislike havig too much

uncut viper
#

my answer doesnt change whether what you tried works or not. as a player, i do not want a permanent buff icon on my screen. period

#

others may feel differently

hallow prism
#

invisible icon buff πŸ˜„

#

joke aside, you don't have to cater to all users

uncut viper
#

invisible buff icons would still push other buff icons around. that said i was sure there was a way to make it NOT have an icon? or is that a spacecore thing?

hallow prism
#

but one icon is fine, a bit more is okish, more will be annoying, for me, which is why you need to decide what is acceptable for you

acoustic summit
#

Yeah you can have iconless buffs

reef kiln
#

If it a permanent buff, just tell me I have it. Put it in special powers. I don't want a icon cluttering my screen.

acoustic summit
#

You can also just register one buff with multiple actions/effects

dire canopy
hallow prism
#

i wondered if having one buff, but stacking the obtained buff would be a way to go

#

but powers may be a good approach too

#

or one power, improved by what is obtained? to avoid clutter

dire canopy
#

The thing is: the buff is added via a trigger action and it's added

hallow prism
#

anyway, i am glad i don't have to decide ahah πŸ˜„

lucid iron
#

I like the powers tab idea

dire canopy
#

Even if I turned it into a power, I can't add the values without adding the buff (with the icon)

lucid iron
#

Assuming iconless buff works (it should)

dire canopy
#

at least not in a C# free way

lucid iron
#

You con condition ur trigger action from having the power

dire canopy
#

not adding +2 to defense for instance

lucid iron
#

I don't understand the distinction

acoustic summit
#

Im not 100% sure how to do it without C# but I've definitely made some complex iconless buffs, which are able to be edited post application.

#

If you wanted to stack the effect, for example

lusty elm
#

Doing this internal cavern is hurting my brain a bit. Why do i need to be so detailed and match elevation levels of the surface and physics SDVpufferdizzy

lucid iron
#

Because u r full of love and care

dire canopy
# lucid iron I don't understand the distinction

For example, if I create a trigger action and have it add +2 to defense, I would have to link it to a buff. I can't say to content patcher add +2 defense to farmer I have to say add a buff to farmer that grants +2 defense - this buff will then grant +2 defense - but that would have an icon

lucid iron
uncut viper
#

8AwA8 is saying you dont need an icon

dire canopy
lucid iron
#

Maybe u can share log n content json

acoustic summit
dire canopy
#

How did you do that?

#

I tried just having no Icon but it didn't work

lusty elm
#

it defintely doesnt help that i have waterfalls flowing into the cavern from the surface, and outputs for them when they come back out of the caves, so i need to match those along with elevations, its gonna look really cool when I'm done i think, but man...

acoustic summit
#

In C# buffs have a visible field, is that accessible in CP?

dire canopy
#
    "DisplayName": "",
    "Description": ,
    "IsDebuff": ,
    "GlowColor": "",
    "Duration": ,
    "MaxDuration": ,
    "IconTexture": "",
    "IconSpriteIndex": ,
    "Effects": {
      "FarmingLevel": 0.0,
      "FishingLevel": 0.0,
      "MiningLevel": 0.0,
      "LuckLevel": 0.0,
      "ForagingLevel": 0.0,
      "MaxStamina": 0.0,
      "MagneticRadius": 0.0,
      "Speed": 0.0,
      "Defense": 0.0,
      "Attack": 0.0
    },
    "ActionsOnApply": null,
    "CustomFields": null
  },```
#

these are the only options available

acoustic summit
#

new framework opprotunity just dropped? HBI (Hidden Buff Icons)

hallow prism
#

you're missing the opportunity for a silly BB

#

buffed buffs

acoustic summit
#

Ooo

#

I like that

dire canopy
#

Something like a power framework

hallow prism
#

joke aside, i'm going to bed, good luck

dire canopy
#

thanks

acoustic summit
#

Also: Those are the only buff effects accessible in CP?

#

Why is it randomly missing like, 4 buffeffects

dire canopy
acoustic summit
#

The same method that handles adding buff effects also lets you give Knockback, Immunity, WeaponSpeed, AttackMultiplier, CritChance and CritDamage

#

As in the vanilla logic

dire canopy
#

I think no Food Buffs grant that (only weapons)

#

But it's good to know

acoustic summit
#

I think the wiki is just out of date or something, Buffs.json includes buffs that have these fields:
"AttackMultiplier": 0,
"Immunity": 0,
"KnockbackMultiplier": 0,
"WeaponSpeedMultiplier": 0,
"CriticalChanceMultiplier": 0,
"CriticalPowerMultiplier": 0,
"WeaponPrecisionMultiplier": 0

#

Look at buff "12" for example

dire canopy
#

Speed, Attack and Defense

acoustic summit
#

Those are the ones it changes, but it exposes those fields (the ones in my previous message) as ones it could change

dire canopy
#
    "DisplayName": "[LocalizedText Strings\\StringsFromCSFiles:Buff.cs.453]",
    "Description": null,
    "IsDebuff": true,
    "GlowColor": "Yellow",
    "Duration": 6000,
    "MaxDuration": -1,
    "IconTexture": "TileSheets\\BuffsIcons",
    "IconSpriteIndex": 12,
    "Effects": {
      "FarmingLevel": 0.0,
      "FishingLevel": 0.0,
      "MiningLevel": 0.0,
      "LuckLevel": 0.0,
      "ForagingLevel": 0.0,
      "MaxStamina": 0.0,
      "MagneticRadius": 0.0,
      "Speed": -2.0,
      "Defense": -3.0,
      "Attack": -3.0
    },
    "ActionsOnApply": null,
    "CustomFields": null
  },```
#

I only have this ones

acoustic summit
#
            "DisplayName": "[LocalizedText Strings\\StringsFromCSFiles:Buff.cs.453]",
            "Description": null,
            "IsDebuff": true,
            "GlowColor": "Yellow",
            "Duration": 6000,
            "MaxDuration": -1,
            "IconTexture": "TileSheets\\BuffsIcons",
            "IconSpriteIndex": 12,
            "Effects": {
                "CombatLevel": 0,
                "FarmingLevel": 0,
                "FishingLevel": 0,
                "MiningLevel": 0,
                "LuckLevel": 0,
                "ForagingLevel": 0,
                "MaxStamina": 0,
                "MagneticRadius": 0,
                "Speed": -2,
                "Defense": -3,
                "Attack": -3,
                "AttackMultiplier": 0,
                "Immunity": 0,
                "KnockbackMultiplier": 0,
                "WeaponSpeedMultiplier": 0,
                "CriticalChanceMultiplier": 0,
                "CriticalPowerMultiplier": 0,
                "WeaponPrecisionMultiplier": 0
            },```
I just extracted this from it's xnb
lucid iron
#

Is it bc u put "" instead of null

acoustic summit
#

If you'd like you can test it - but I'd say they are real fields and the wiki doesn't want you to know about it SDVkrobusgiggle

dire canopy
#

I'll test it - since it makes my life easier - I saw Animal Husbandry food buffs had these fields, but I wasn't aware if it worked

light shore
rigid musk
light shore
#

yeah

rigid musk
#

because if you're talking about that you need to have the tilesheets in the same folder

light shore
#

i have them

rigid musk
#

renaming them just makes sure the game can read them when you load your mod

#

are they named the same thing

light shore
#

i renamed the original ones how they should be

#

everywhere

#

on notes on tiled on proporties

rigid musk
#

You may have to replace them then pondering

#

theoretically it should just work

#

could you send a picture of what your window looks like here?

light shore
#

😞

rigid musk
#

i see

light shore
#

LOL im dyinggg for 4 days

#

whats wronnnggg

rigid musk
#

Right so, what im guessing is that some of the tabs there on your tilesheets - if you click on them - just look like a bunch of grey boxes right?

light shore
#

yeah

rigid musk
#

like this

light shore
#

yeahhh

#

actually not even that

#

its just empty

rigid musk
#

that's okay that too - do you have a box up at the top of the window that says stuff like this?

light shore
rigid musk
#

perfect - you're going to double click on each one (one at a time) and follow these steps:

  • scroll for the little section until you see the name of the file
  • click on it so it opens the window in the second image
  • click browse
  • open the corresponding tilesheet that is in the folder with your map
    then you can press the x button up at the top and when it prompts you on if you want to save click yes
#

if you need help at any step let me know

#

every time you do that you should see the proper tilesheets show up for each thing again

dire canopy
#

If I use a AddMail received action, does it ignore the need to have anm entry in mail.json (working as a flag only)?

ivory plume
#

Yep.

dire canopy
scarlet ether
#
            "Name": "recolor",
            "Value": "DNEarthyRecolour",
            "When": { "HasMod": "DaisyNiko.EarthyRecolour, Aimon_WitchyDGR" },
        },```
Is this ```"When":``` condition formatted correctly?
dire canopy
# dire canopy Thanks!

Is there any issue if I use it several times to add the same "mail" (because I'm not sure which event will occur first)?

ivory plume
dire canopy
#

Like, would it be true the first time and be false the next time I add it?

ivory plume
# dire canopy Is there any issue if I use it several times to add the same "mail" (because I'm...

The behavior depends on the mail type argument you set:

  • Now: it'll get added to the mailbox multiple times.
  • Tomorrow: it'll only be added for tomorrow once, even if you call it multiple times. However that will happen even if it's already been received on a previous day.
  • Received: it'll only be added once (adding it again does nothing since it's a hash set).

If you're setting a mail flag, you can just use Received.

dire canopy
#

Thanks, that's what I wanted to know

scarlet ether
#

Hi, sorry to bother again, but does "ConfigSchema": need to be the first section in the content.json? Or can I add other sections before it, such as "DynamicTokens":?

ivory plume
#

The order is usually format > config > dynamic tokens > changes by convention, but the order of sections doesn't actually have any effect. So you can put them in any order you want.

(The order of entries within a section does matter though.)

scarlet ether
#

Thanks; it's a relief to know. My internal logic dictates dynamic tokens should come before config since they're references for actions performed in the config and changes section. O:

uncut viper
#

well, putting them before it in the content.json wont force any specific order of operations. CP processes them in the same order regardless

ivory plume
#

(Yep, so it's fine to put them in whatever order is most readable to you.)

scarlet ether
lusty elm
#

Cave tiles are so limiting, but i'm making it work SDVpufferdizzy

#

i think, we'll see

calm nebula
#

Dray, have you seen kailey's tilesheets

#

Lots more mines

#

@gaunt heath

lusty elm
#

now you tell me

ivory plume
#

Here's the first early technical preview of Central Station, the upcoming successor to Bus Locations and Train Station.

See:

This build includes:

  • the boat/bus/train networks;
  • a placeholder Central Station map with the shop actions;
  • integrations with Bus Locations and Train Station;
  • all features documented in the mod author guide.

Not included yet:

  • the actual Central Station map and its various flavor interactions;
  • random NPCs;
  • mod pop-up shops.

Feel free to try it out and report bugs, feedback, or suggestions here!

uncut viper
#

i have been waiting to click the download button ever since i saw pathos start typing. dunno what im gonna put in there yet but ill be danged if i dont wanna try it

velvet narwhal
#

(i, too, have been summoned)

lucid iron
#

If you edit the layout of that map, you can optionally add the ticket machine yourself. Central Station won't re-add the machine if the Action: CentralStation Train tile property is already present, and it'll automatically adjust its train stop to match the position of the ticket machine.

#

im confused about this a little

#

is it potential mod arms race

tawny ore
#

But does it support SVE?

lucid iron
#

no

uncut viper
#

i think directly editing the map is kind of inherently a mod arms race

lucid iron
#

the question to ask is "does SVE support Central Station"

lusty elm
#

brain hurst, i'll be back after dinner with more brain power. I think I may have designed an entire area in a way to accommodate something that didnt need to be accommodated?

ivory plume
#

That's basically there to support SVE (and any other mods that replace the railroad with a custom layout). So let's save SVE moves the actual railroad somewhere else on the map; if it adds the ticket machine itself, Central Station won't add a duplicate in the original location. (It deliberately edits the location late to allow for that.)

lucid iron
#

naruohodo so it is yield

velvet narwhal
#

i open the game and see yet another livestock bazaar update suslysella

lucid iron
#

im sorry i broke ppl's animal houses

#

SDVpufferpensive scammed by nullable again

velvet narwhal
#

can we keep this as an easter egg?

uncut viper
#

hm

#

Pathos, in the StopData, is it supposed to be Network or Networks and is it a list of strings or a comma separated list single string? the docs use all of those

ivory plume
#

Should be Network, and a comma-delimited single string. (It went through a few iterations; I'll clean up the readme to reflect the current format now.)

uncut viper
#

would that make it difficult to edit the networks with TextOperations?

ivory plume
#

TextOperations only support a text field, so it works because it's a comma-delimited string.

tawny ore
#

@ivory plume unrelated, but since you're here. Would you consider a split string/number range local token feature for Content Patcher?

uncut viper
#

mostly wondering about the delimiting with a comma, i couldnt remember if having that would mean if you appended one itd have a trailing comma at the end

#

i dont use textoperations much and can never remember them fully SDVpufferdizzy

ivory plume
#

TextOperations has built-in support for that; you'd just set the delimiter to ",", and then you can add/remove/edit values as you want.

lucid iron
#

i thought its 1 more attempt to get foreach into content patcher

ivory plume
tawny ore
#

The idea is to replace multiple Includes with a single one that repeats based on a local token taking on one value from a list of values

velvet narwhal
#

afaik textoperations search just hates space delimited

gentle rose
#

I think I was looking for something similar at some point if I understand the idea correctly

uncut viper
lucid iron
#
{
  "Action": "Include",
  "FromFile": "data/box.json",
  "LocalTokens": {
    "L@Capacity": "{{Iter:2, 3, 4}}",
    "L@SheetIndex": "{{Iter:0, 1, 2}}",
  }
}
#

proposal bolbwawawa

uncut viper
#

seems like that way would get real weird if the lengths of the iterations didnt match

lucid iron
#

hm

#

i guess the iter need a key too

#

cus the intention was for these to be same level

#

but i see how it could seem like nested

uncut viper
#

i think this is like the 4th time the features been brainstormed/discussed and much more than the 4th possible implementation suggested SDVpuffersquee

#

(4th time discussed in any detail anyway)

lucid iron
#

the yearning Dokkan

ivory plume
#

I prefer not having magic behavior (e.g. special token names that trigger hidden behavior). So I'd prefer an approach that adds actual fields which can be schema'd/validated/documented.

lucid iron
#

tbh i think theres only a few mods that would seriously benefits from this though

uncut viper
#

theres only a few mods that benefit from TargetLocale too, but its a t hing

tawny ore
#

I think there are multiple ways to go about it, but in the interest of simplicity my opinion is that it'd be a new field that simply defines what to split on, and what local token it is assigned to

lucid iron
#

do most mods add that many templated things

uncut viper
#

no bc it didnt exist until like this month

lucid iron
#

well as in, things that r concievably templated ig

#

machine progression system was the big one i have in mind

uncut viper
#

in my mind it benefits when you need to do something for each thing in a list but dont know ahead of time how big the list is

lucid iron
#

maybe more ppl make these kinds of thing if its easier ofc

calm nebula
#

What is targetlocale

uncut viper
#

it targets a locale

gentle rose
#

my heavily simplified usecase was wanting to use a token to refer to, say spring_1, ..., spring_5 using a numbered range (to make changing the end of the range using config options simpler etc in templates), so basically a range with a string prefix (I still don't know if I'm understanding the idea you're proposing correctly but it's late so lmk if I'm off base Matt)

uncut viper
#

"TargetLocale": "fr-FR" will only touch the french version of an asset

ivory plume
#

TargetLocale covers cases where you need to edit a specific language variant of an asset regardless of the current language. It's used in certain edge cases like bundle data, where the game loads both English and translated assets.

(It exists because there are certain edits that aren't possible without it, it's not just a convenience feature.)

velvet narwhal
#

in the end i feel like this is still the better option due to not having to invalidate FarmAnimals every single time

calm nebula
#

Wdym invalid farmanimals every single time

velvet narwhal
#

uh i had the itemIDs set to a random token before and selph/button/chue was like, "you're gonna invalidate every single day" and went, "you're right"

lucid iron
#

you say our names like we r some kind of council

velvet narwhal
#

yeah the council of bonking me for my crimes

tawny ore
#

@ivory plume this example is a bit sloppy, but something to this effect. Where you can include the cartesian product of tokens from a set.

From this:

{
  "Action": "Include",
  "FromFile": "assets/Example.json",
  "LocalTokens": {
    "NumberToken": 1,
    "StringToken": "A"
  }
},
{
  "Action": "Include",
  "FromFile": "assets/Example.json",
  "LocalTokens": {
    "NumberToken": 2,
    "StringToken": "A"
  }
},
{
  "Action": "Include",
  "FromFile": "assets/Example.json",
  "LocalTokens": {
    "NumberToken": 1,
    "StringToken": "B"
  }
},
{
  "Action": "Include",
  "FromFile": "assets/Example.json",
  "LocalTokens": {
    "NumberToken": 1,
    "StringToken": "B"
  }
}

To this:

{
  "Action": "Include",
  "FromFile": "assets/Example.json",
  "SetTokens": {
    "NumberToken": {
      "Range": {
        "Min": 1,
        "Max": 2
      }
    },
    "StringToken": {
      "SplitString": {
        "String": "A,B",
        "Delimiter": ","
      }
    }
  }
}
calm nebula
#

Hot take: per day inval is kinda finnnneeeeeee

gentle rose
#

given two lists, it would be nice to be able to do (maybe using special text operations?) list product and list zip (the latter only if they match lengths ofc)

tawny ore
#

How about per tick inval?

calm nebula
#

I invalidate myself every tick

velvet narwhal
calm nebula
#

Someone gotta keep my ego in check, I'm an engineer

uncut viper
#

dont check my math

calm nebula
#

28*4*2 approx 200

lucid iron
#

avi this seems like a problem EAC solves isnt it

#

item query outpts yggy

tawny ore
velvet narwhal
gentle rose
rotund elm
#

anyone know where I can find the achievement tiles in content unpacked?

calm nebula
#

Data/achievements

tawny ore
uncut viper
#

ValueAt

rotund elm
#

I see the .json but not a png sheet

uncut viper
#

{{SomeListToken |valueAt=0}}

tawny ore
#

I don't know if the index can be a local token though, so can't say if that would actually work

light shore
uncut viper
#

the tilesheets need to be in the same folder as your .tmx file when adding them

tawny ore
#

But if it's possible then a local token range could effectively select an item from a set assuming the range refers to the indexed element

gentle rose
#

if I'm understanding correctly, that works for accessing individual elements of the zipped list but not the whole list as a single token, right?

uncut viper
#

are you positive its actually the same error then

#

you are loading the png and not a tsx right

tawny ore
uncut viper
#

or at least not the old broken tsxs

uncut viper
tawny ore
#

This is how I'd imagine it could work:

// content.json
{
  "Action": "Include",
  "FromFile": "assets/include.json",
  "SetTokens": {
    "NumberToken": {
      "Range": {
        "Min": 0,
        "Max": 1
      }
    }
  },
  "LocalTokens": {
    "Elements": "A, B"
  }
}

// assets/include.json
{
  "Entries": {
    "Example": "{{NumberToken}} {{Elements |valueAt={{NumberToken}} }}"
  }
}
gentle rose
tawny ore
#

On top you have the include which iterates the range 1-2, but also includes a static local token with the elements you want to zip. On the bottom you have the included file which uses both the number token as well as the corresponding item.

gentle rose
#

I genuinely forgot you can use tokens inside local tokens pffft thank you for being so patient explaining this to me matt

tawny ore
#

Oh wait, index is 0 based isn't it?

uncut viper
#

yes

tawny ore
#

There we go, updated the example then

light shore
#

i guess ill make a new one

gentle rose
#

yeah, now with the local token example it makes perfect sense, for some reason I was thinking that local tokens have to be static...

#

it would still be nice to be able to do it without having to define a local token each time but that's very much just a shallow convenience thing

tawny ore
#

I guess it'd be good if I could update my example to follow any existing conventions that Content Patcher already uses

#

Like content patcher already has a Range function, so maybe it should just reuse that same syntax

#

Does this look like it fits better?

"SetTokens": {
  "NumberToken": "{{Range: 0, 1}}",
  "StringToken": "{{Split: A, B, C |inputSeparator=,}}"
  }
},
gentle rose
#

my dream would be to have some kind of {{Map "@@ some kind of string asset with {{tokens @@}}" list_asset |= placeholder=@@}} feature but that would require changing the token resolution order just for this specific token to work, which is definitely not a good idea for just one, relatively niche token

tawny ore
#

I feel like this follows CP's existing conventions pretty closely

dire canopy
#

@ivory plume I want an event to trigger an EditData, but I needed the editdata to happen before the event end - is there currently a way of making that?

gaunt heath
#

Who pinged me I was busy receiving psychic damage at work

uncut viper
#

atra was talking about your tilesheets

#

i think

gentle rose
#

yeah, they were recommending them to draylon

dire canopy
#

Basically - I have a Buff, that I want it to be changed during the event - and then, at the end of the even I'd use a addbuff action

velvet narwhal
gaunt heath
#

They'll be out soon, once I have some psychic-damage-free time

dire canopy
#

If I add the comand at the end of the event, the patch is applied later, then the event changes do not apply to the buff

uncut viper
#

that is normal content patcher behaviour as things follow the patch update rates

gaunt heath
dire canopy
gaunt heath
#

I was worried they'd be confusing

uncut viper
#

you can just make the patch update rate for your patch to be OnLocationChanged

#

dont know what that would mean for an existing buff of the same ID the player currently has though

gaunt heath
#

Ok ten hours of psychic damage is plenty, time to go home and work on my tilesheets

ivory plume
# tawny ore Does this look like it fits better? ```json "SetTokens": { "NumberToken": "{{R...

There's some limitations with that approach (e.g. how would you pass a token which actually contains multiple values, without splitting it into single values?), and I think usage might still be a bit confusing.

It might be worth making it an action-level feature, so you could do stuff like...

// call the patches with each combination of tokens: [0, A], [0, B], [1, A], [1, B]
{
    "Action": "Repeat",
    "Patches": [
        {
            "Action": "Include",
            "FromFile": "assets/some-file.json",
            "LocalTokens": {
                "NumberToken": "{{NumberToken}}",
                "StringToken": "{{StringToken}}"
            }
        }
    ],
    "FromCartesianSplit": {
        "NumberToken": "{{Range: 0, 1}}",
        "StringToken": "A, B"
    }
}

And then we could have other From* options, like a list of token dicts to use:

// call the patches with the specified tokens: [SomeId, 500], [AnotherId, 700]
{
    "Action": "Repeat",
    "Patches": [
        {
            "Action": "Include",
            "FromFile": "assets/some-file.json",
            "LocalTokens": { ... }
        }
    ],
    "ForEach": [
        {
            "Id": "SomeId",
            "Price": 500
        },
        {
            "Id": "AnotherId",
            "Price": 700
        }
    }
}
uncut viper
#

(i think more people would be confused by you pulling out terms like Cartesian Split /j)

#

a new Content Patcher Action...

gentle rose
#

ngl I understood it better when they added the word cartesian /lh

lucid iron
#

set theory general DokkanStare

tawny ore
#

Yeah, I only used that term as an example because it's probably well-understood here so it conveys the purpose easily

ivory plume
#

(Content Patcher is all sets under the hood.)

uncut viper
#

ive got no clue what a cartesian split is

tawny ore
#

I do database work so that's a term I use quite often

ivory plume
#

Based on 'cartesian join', which is a database join where every combination of rows is selected.

uncut viper
#

(i also didnt notice matt used the term first earlier i just looked at the code)

#

oh i do vaguely remember this now from my db class

ivory plume
#

(We'd probably come up with some friendly field names, this is just a rough idea.)

tiny zealot
#

the thrill of seeing ForEach appear in a potential CP schema πŸ‘€

uncut viper
#

that does actually also make me now understand it a lot more now that my memory has been jogged

gentle rose
#

I only recognise it from cartesian products in maths, but I assume that's where the name comes from anyway and it's basically the same thing

ivory plume
#

(Can't wait to see people complaining about lag when mod authors add nested repeat patches calling include patches which contain repeat patches within repeat patches.)

#

Mod author: works for me, I don't see the issue.
Content Patcher recursively creating 13 million edit patches under the hood.

tawny ore
#

I almost felt like for performance considerations, whatever this was used for should be "compiled" once into effectively the same model as if you had manually written out each include

#

Like, this isn't allowed to change dynamically, but rather is only considered on loading

gentle rose
#

a foreach/map field would be amazing, especially if it can be done over a list token rather than individually listed items

ivory plume
#

If we go with the "Action": "Repeat" approach, I'd probably start with just the ForEach option which would cover most use cases. We could maybe have more dynamic options in the future, but it'd need a lot of thought and planning to make sure it doesn't introduce major performance pitfalls (e.g. being able to create millions of separate patches with a few lines of JSON).

gentle rose
tawny ore
#

The only thing with ForEach is that it doesn't save that many lines of code

#

Like you're still defining each instance of LocalTokens so you're saving on the Action and FromFile

gentle rose
#

the token resolution order where it comes to nested tokens is just that the innermost tokens are resolved first, right?

ivory plume
#

Yep.

#

I tried it with a real mod using the feature. It doesn't save much on lines, but it does make it a bit more readable at least:

tawny ore
#

Where this discussion started (today) was based on a desire to write like 20 machine rules that were mostly identical other than a numerical condition. So that's sort of where the brainstorming started.

uncut viper
#

plus even if they dont save many lines on their own they can still then be used as a template which will save more lines

ivory plume
#

(But at the same time, Content Patcher isn't a programming language. At a certain level of complexity, you might as well just edit the content through the SMAPI content API instead.)

gentle rose
#

I was just about to say, we're bordering on making it turing complete right now haha

tawny ore
#

I don't even think the split string example is needed necessarily if valueAt works based on a local token

#

The MVP that accomplishes most of what's helpful in the "simplest" way would be a numerical local token based on a numerical range

gentle rose
#

I was mostly looking at cases where, for example, you had a template which you wanted to use with i18n keys named prefix_1, prefix_2, ... in some kind of action that takes a token list of i18ns and you wanted to keep the template flexible so you could set a different total number of i18n keys each time you use it. So you would want to have some range token (whose end value is set in the template's local tokens) that can get all the i18n keys, then a way to apply the {{i18n <key>}} token to each of them, then to combine them all into a list to feed to the action

#

it's a very niche case though, and only really necessary if you're templating pretty aggressively

tawny ore
#

Even the cartesian thing may not be necessary since CP can already do math, so simply iterating over a range can probably be used for just about everything

tawny ore
gaunt heath
#

(Pssssst you're missing the floor under the back wall)

Do you want coloured sigils? Is that why the blue one is underneath? The white sigils are on the main _extras/outdoors sheets because they need to change colour in the winter, but I can slap some palette swapped versions at the bottom of the animations sheet in two minutes flat. It's seasonless and the only recolour compat is an HSL saturation adjustment so it's nbd

#

Ahg that was supposed to be a reply

tawny ore
gentle rose
tawny ore
#

Can you share an example, I'm not sure what the expected output is?

gentle rose
#

prefix_1,...,prefix_N individual keys in the i18n file to a single token containing the list {{i18n prefix_1}},...,{{i18n prefix_N}}

tawny ore
#

You're asking for a list concatenation?

gentle rose
#

I'm asking for a map - take a list of strings and map it into a list of tokens with a single one of those strings as an input

tawny ore
#

I don't understand how what this is intended to do wouldn't effectively accomplish the same thing you're asking for

gentle rose
#

uh in python syntax it would be something like [i18n(prefix + x) for x in range(N)] essentially

tawny ore
#

You can't generate an undefined number of tokens because how can you possibly know what you can refer to in the include?

#

That's why a single token taking on every possible value is the only way you can actually use the token

#

Like, you won't have {{Key1}} {{Key2}} ... {{KeyN}}
But you'll have {{Key}} which takes on all values of 1 through N

gentle rose
#

that part's fine πŸ˜… I'm not trying to save them to individual tokens, I'm trying to make it so instead of doing {{i18n <list of tokens>}} I get token containing list of {{i18n <token 1 from list>}},...,{{i18n <last token from list>}}

#

all totals are known in advance and stored in a list

tawny ore
#

Yeah, that's what I'm confused about. This is exactly what the example I shared is intended to do

gentle rose
#

I'm confused then, since yours doesn't seem to be applying a token at all to the result?

#

it's almost definitely me tbh but I'm missing something

tawny ore
#
// this
{
    "Action": "Repeat",
    "Patches": [
        {
            "Action": "Include",
            "FromFile": "assets/some-file.json",
            "LocalTokens": {
                "Key": "prefix_{{NumberToken}}"
            }
        }
    ],
    "FromCartesianSplit": {
        "NumberToken": "{{Range: 1, {{MaxValue}} }}"
    }
}

// is basically just this
{
    "Action": "Include",
    "FromFile": "assets/some-file.json",
    "LocalTokens": {
        "Key": "prefix_1"
    }
},
{
    "Action": "Include",
    "FromFile": "assets/some-file.json",
    "LocalTokens": {
        "Key": "prefix_2"
    }
},
{
    "Action": "Include",
    "FromFile": "assets/some-file.json",
    "LocalTokens": {
        "Key": "prefix_N"
    }
}
#

Think of Repeat as if it's just doing the same thing over and over again for every number in the range

uncut viper
#

i think the confusion might be in not knowing where you're getting NumberToken from

tawny ore
#

So instead of typing the same patch 500 times, you could just set the MaxValue to 500

uncut viper
#

or at leas thats whats confusing me

gentle rose
#

I assume numbertoken is just an index from the range?

tawny ore
#

Oh, yeah that's supposed to be from the earlier example. Need to fix that.

gentle rose
#

OH yeah I see what the issue was. I want to be able to use all of these resulting tokens in a single token list so they can be used in a single trigger action, rather than separate patches

#

in our case it was for randomisation purposes

tawny ore
#

There we go, I changed it back to the "CartesianSplit" naming

#

Yeah, that's why I was asking if what you really wanted was a list join method then

#

For you to take a list of values and join it together into a single string

#

I feel like that's a whole different idea than what this is trying to solve for, but still worth discussing as well. Just isn't really trying to do the same thing at all.

gentle rose
#

I think it's just a different implementation of the same idea tbh - to use python code as pseudocode again bc I'm lazy, it's the difference between for x in range(N): do something and [some stored result for x in range(N)]

#

(aka why I called it a map, because that's what the latter is)

tawny ore
#

I guess I'm not understanding how having a glued together list as a single string help accomplish generating a bunch of distinct patches?

gentle rose
#

it's not - it's for cases where you need all the strings to be in one patch (e.g., you're putting them together in a single action that does some custom randomisation)

tawny ore
#

Okay, so different implementations of different ideas

gentle rose
#

ultimately it's just map vs foreach loop, they have pretty heavy overlap in use cases but a few things on the edge cases the other can't do very well

tawny ore
#

If you disregard the terms (map vs foreach) the effective outcomes are two different things

gentle rose
#

yup! which is why I suggested it as an additional thing to consider haha

#

similar vein of "tool based on iteration", different overall implementation/specifics

tawny ore
#

Yeah, no worries. I was just getting confused because I thought you were suggesting an alternative approach, and I wasn't understanding how it would work.

gentle rose
#

honestly it's probably on me, I shouldn't be messaging this late but I ruined my sleep schedule again because of an asthma attack haha. I'll stop trying to use my brain now though, it's far too late at night for that CB_wave_boy

tawny ore
#

It almost seems like CP is almost there with what you're looking for with Merge and Range being tokens that operate on lists

uncut viper
#

im sure the confusion of this discussion means good things for how easy the eventual documentation will be to write and understand for the layperson SDVpuffersmile

gentle rose
#

(we ended up just making a custom trigger action in c# so this isn't actually needed for the original use purpose tbh, it was just an interesting thing I ran into)

tawny ore
#

Do you know if {{Range: 1, 3}} is basically just parsed into the string "1, 2, 3"?

uncut viper
#

should do

calm nebula
#

Yes

tawny ore
#

So basically, if Range had a delimiter field then you could accomplish exactly what you're looking for

#

key_{{Range: 1, {{MaxValue}} |delimiter=, key_}}

gentle rose
#

it would do like half, because you'd still need to split the tokens apart, put them each into the i18n token separately and put them back together

#

you can't put a list into {{i18n}} and get a list of tokens back

tawny ore
#

Oh, the problem is that the i18n part wouldn't be used

#

I actually think my original-original idea (half joking) would work, which would just be to create a superset format to CP that just compiles into CP.

gentle rose
#

the zip part was doable (though clunky) except for the fact it led to not being able to use that token in that way. I ended up just making a special action that took the prefix and range and other inputs for the original action, processed them properly then returned them to the original action

tawny ore
#

Like, I'd take CP and add some basic templating language so you could do things like loop

gentle rose
tawny ore
#

Imagine something like this:

<% for i in range(1, 5) %>
{
    "Action": "Include",
    "FromFile": "assets/some-file.json",
    "LocalTokens": {
        "Key": "prefix_<%= i %>"
    }
}
<% endfor %>
calm nebula
#

Clearly you need to make a graphical programing language for production flows

tawny ore
#

I'm going to call this language Content Patcher Plus, or CPP for short

#

Second time making that joke, I apologize

calm nebula
#

there will be a third

tawny ore
#

Anyway, that implementation would meet my requirements since it wouldn't add any overhead to CP itself. It would remain completely backwards compatible, but perhaps allow me to add other convenience features.

#

It'd just be a CLI tool that converts this templating language into an actual CP mod

gentle rose
#

in fact, it would be completely independent of the users, it would just be a build tool

#

(until someone suggests the next level of scope creep which is on-the-fly interpretation of that language)

calm nebula
#
"ForEach": {
  "var": "npc for npc in npcs"
}
tawny ore
#

I mean, Typescript has influenced some of the Javascript developments

gentle rose
#

there's something very cursed about how pythonic that is, I approve

tawny ore
#

It would technically be possible for me to ship this as a mod that is interpreted in "realtime" since I could just use SMAPI to dynamically load it as a CP content pack

gentle rose
#

aaaand the prophecised scope creep is already upon us

tawny ore
#

If that functionality existed, I'd only recommend it be used during development. And even then, that would be the same as doing a compile and patch reload.

gentle rose
#

I hear typescript is actually a fairly reasonable and pleasant language to use, which does feel like it's missing part of the core javascript experience

tawny ore
#

It's just C# Javascript

teal bridge
gentle rose
#

(I meant in terms of personal experience using it, not potential results. Less headbutting walls)

uncut viper
#

i only begrudgingly use it not bc i think TS is bad but bc i got so used to not being restricted for a while since i only used JS for the longest time and i am stubborn and dont like being Made to do things the Right Way after so long

#

/hj

teal bridge
#

Just use any if you need to break the abstraction.

gentle rose
#

like once you have to learn the art of javascript's operator type casting does somewhat feel like you're one with the matrix SDVpuffersquee but if you're using a typed language, all of a sudden you "don't need to" which "is a good thing" because "the javascript operator type casting is famously really weird and kind of dumb" SDVpufferwaaah

uncut viper
#

im sure all the TS devs out there will love me for that one

teal bridge
#

True enough. But there are other less hostile options, especially structural interfaces.

dire canopy
# uncut viper you can just make the patch update rate for your patch to be OnLocationChanged

I tried that but, since the patch applies after the trigger action, it didn't work...I found a work around though, it's not pretty...I have a master buff that will be applied through a trigger action every morning, and this one will receive the patches after the events. Then I have a secondary version of the buff that only uses the patched stats from the "master" bufff - this is just a temporary buff and the icon will disappear after you sleep

teal bridge
#

Which still let you do "almost" anything but in a less wild-west way.

calm nebula
uncut viper
#

in my case it is modding related bc i used JS for my mod docs!!

gentle rose
#

(basically, I'm sure typescript is better but I spent so long learning how javascript does things that I refuse to move to a language where you don't have to SDVpuffersquee)

teal bridge
#

Isn't that the pot calling the kettle black. Who was the one ranting about static typing yesterday?

uncut viper
#

and would probably have had a much easier time of it if id written my docs using TS instead

gentle rose
#

I should like, sleep actually

uncut viper
teal bridge
#

I thought about it, but... too easy.

#

(and besides, maybe I'm making a mod to let TypeScript run in Stardew. I'm already halfway there)

uncut viper
#

im for it

gentle rose
#

one day we will make a framework that allows mods to be written in like, brainf*ck or LaTeX commands or something, and then we will know we have finally reached the limits of what we can achieve

calm nebula
#

please, let me write a mod in VHDL

teal bridge
#

A web-style scripting language is actually useful when a web-style DOM is involved. You want esolangs, you'll have to do that yourself.

ivory plume
#

Imagine if we could just write mods in C#, compile them into optimized DLLs, and just load them straight into the game.

calm nebula
#

yes, vhdl is an esolang

calm nebula
teal bridge
#

As far as game dev is concerned it may as well be an esolang.

#

(and in any case, I wasn't replying to that)

gentle rose
#

where in the contents folder do I put the dlls again? /lh

gentle rose
#

that's too far even for me

teal bridge
#

Surely there must be at least one VB.Net mod out there.

gentle rose
#

I will accept php as an alternative though

calm nebula
#

there is!

#

that one that calls the gc every night

#

something something memory something

gentle rose
#

I'm sure it would technically be plausible to write content packs in SQL SDVpufferthinkblob

lucid jewel
#

I'm not sure if this is the right spot for this question, but it is being asked because of a mod I am working on. That weird area that Harvey walks around that is north of Sam's house, is there any reason to not mod a building into it besides having to repath Harvey?

uncut viper
#

SVE compatibility

#

and compatibility with anyone else with the same idea

gaunt heath
calm nebula
#

question, pathos

#

are you a coffee drinker

lucid jewel