#making-mods-general

1 messages · Page 446 of 1

brittle pasture
#

that looks good to me. dumb questions but:

  • what does Lookup Anything show when you lookup the Razor Trout, or a tile on the Town river
  • are you sure your edits are saved in the mod folder; what if you entered the game, run patch export Data/Locations and post the file it creates on smapi.io
crystal tiger
brittle pasture
#

just deleting the line should work

shut edge
#

is the building ItemConversions option actually used anywhere?

brave fable
#

the mill uses it, yes

shut edge
#

oh yeah ok, that makes sense

#

wonder if that would be useful in an animal context at all, hmm

brave fable
#

i wouldn't be surprised if various modded buildings did, too. i could see a wishing well doing something if you throw in a goat or something

shut edge
#

lol

crystal tiger
brittle pasture
#

haha that'd do it

brittle pasture
crystal tiger
brittle pasture
#

(tbh I do sincerely wish there are more buildings that use the conversion feature, but it's super basic compared to machine data)

brave fable
#

@deft pivot you'll probably want to follow ⤴️ this advice to set a new appearance for the Krobus NPC itself while not affecting other places that happen to use his character sprite, such as the original cut-in-half shadow guy from your message a few hours ago.
it might look a little like this:```json
{
"Action": "EditData",
"Target": "Data/Characters",
"TargetField": [ "Krobus", "Appearance" ]
"Entries": {
"MyCustomAnimeKrobus": {
"Id": "MyCustomAnimeKrobus",
"Condition": null,
"Portrait": "Mods/{{ModId}}/anime_krobus_portraits.png",
"Sprite": "Mods/{{ModId}}/anime_krobus_sprites.png",
"Precedence": -999999
}
}
}

which will add a new `Appearance` entry with high priority using your custom artwork with no particular conditions.
this means you can remove your existing `Target: Characters/Krobus` and `Target: Portraits/Krobus` changes and let the game use those for the other shadow guy as usual
uncut viper
#

you can also change the TextureName in characterdata instead

brave fable
#

well yes, but that won't change the portraits

uncut viper
#

it would if they targeted what they changed it to

brave fable
#

and also doesn't leave us room to defer to whichever other sprites, meaning he'll probably be overwritten by the cinema trenchcoat krobus

#

maybe? i think? probably

uncut viper
#

presumably youd be changing that appearance data anyway?

brave fable
#

i mean if i were changing appearance data anyway i'd just do it wholesale as above

crystal tiger
brave fable
#

i'm not sure of any cases that would pick texturename and ignore appearance though, which would blow a hole in it

uncut viper
#

does changing the appearance change the shop portrait though?

brave fable
#

probably not SDVpufferthinkblob

uncut viper
#

the social page and calendar i believe

brittle pasture
brave fable
#

true true

uncut viper
#

yeah, calendar ignores appearance

brittle pasture
#

(aka where you deleted the condition earlier)

brave fable
#

clearly we replace all fields. maybe we replace krobus. maybe we remove him for simplicity

shut edge
#

" Any numbers of buildings can be an upgrade for the same building, in which case the player can choose one upgrade path. " huh neat

shut edge
#

like put your wood in a barn with a charmander and it becomes coal

brittle pasture
#

doesn't seem possible with conversion data
machines though you can use a machine that uses EAC's "current location is an animal house with the specified animal" GSQ

wraith bay
#
{
  "LogName": "Add SVE Razor Trout Fish Data",
  "Action": "EditData",
  "Priority": "Late",
  "Target": "Data/Fish",
  "Entries": {
    "FlashShifter.StardewValleyExpandedCP_Razor_Trout": "Razor Trout/85/dart/8/14/600 2600/spring summer fall winter/both/683 .4/2/.99/.5/10/false"
  }
},
brave fable
#

couldn't you use that GSQ in the Condition field for the ProducedItems entries (or is the Condition evaluated on processing complete)

wraith bay
#

not getting spawn conditions -_-

brittle pasture
uncut viper
#

from the next update to EA/MC maybe

crystal tiger
shut edge
#

is it bad if i am half tempted to add dog eggs, just because of the hal lab logo

brittle pasture
#

only if you also add dog mayonnaise

wraith bay
#

if it has an egg it has a mayo

deft pivot
urban patrol
#

how do you pass a token in i18n again? "DocksTalks.0": "It's farmer {{PlayerName}}!",

brittle pasture
#

"{{i18n:DocksTalks.0 |PlayerName={{PlayerName}}}}"

urban patrol
#

thank you!

#

and that goes in content.json not default.json right

deft pivot
#

Was this what I was supposed to do? There's an error in my smapi log so I know I'm doing something wrong, but I don't know to what extent

ocean sailBOT
#

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

vernal crest
# deft pivot Was this what I was supposed to do? There's an error in my smapi log so I know I...

No, you need to change all those EditImage patches that are currently targetting Portraits/Krobus etc and change those targets to be Mods/GrimAsKrobus/GrimPortraits (etc). And then remove the .png from the Appearance data edit. The point of these changes (if I followed correctly) is to make it so that you're not actually changing the original Krobus portrait or sprites at all but are instead changing Krobus himself so that he uses a different set of portraits and sprites.

#

You are also missing a comma after the third } after the Appearance patch

shut edge
mellow verge
#

Hi everyone! Last year, I made my own farm map based on the vanilla ones. I still haven't figured out how to create a new farm map separately, and I'm now looking for someone to help me. Can you post a json file of a separate farm by ccmakers and describe the creation process step by step? (Do you have a detailed guide for beginners?)

vernal crest
#

You can download an existing mod and copy what they have done or even just use the example on the farm data wiki page. If you copy and paste that example into a content.json and add a Format field (and the files according to what's in the FromFile fields), you'll have a working additional farms farm map mod that you will just have to tweak values for.

#

We do not have a tutorial but the page I linked explains what all of the fields are for

hallow prism
#

it may not be exactly what i wished for but may be good enough

brave fable
#

a building DefaultAction with some Action Message dialogue tricks could be a pretty flexible solution all the same

#

you couldn't easily check if the player's holding an item, but you could still take money

#

or with c# and a custom tileaction just do whatever you like, of course

hallow prism
#

i'm limiting myself to non C# but there's more non C# options out there now than when i considered the idea the first time

brave fable
#

see i'm in the opposite situation, i've already done up an easy sort of wishing-well-like map feature but now that the statue of blessings is in the game my main idea is gone haha

shut edge
#

VMV coin for one of those rusty mystery boxes maybe

#

or like, a buff

brave fable
#

a buff is about as vague as 'a reward' lol

shut edge
#

just a text toast that says "you did it"

brave fable
#

one (1) stardew hero trophy

#

0.1% chance

shut edge
#

coin in well, junimo cart starts

brave fable
#

my god. a wishing well that's just the coin slot to a giant ancient arcade machine

shut edge
#

the valley itself is the machine

#

insert a coin and it launches another instance of the game inside your existing one

#

damn that'd be a wild mod for like, go to bed and you dream a randomized save day

brave fable
#

viewport x y clamp false unfreeze is odd. with unfreeze it snaps to the bottom-right corner of the map regardless of the x y values and can't be moved with viewport move x y duration, but without it the viewport sets and moves as you'd expect

vernal crest
#

Maybe unfreeze and clamp are fighting each other? If clamp stops the viewport from moving off the sides of the map and unfreeze makes it follow the farmer, it might cause strange behaviour.

brave fable
#

is that what unfreeze does

#

i would've imagined a lot of things but not lock/follow/chase camera lol

#

TODO: explain other parameters my old enemy

vernal crest
#

Allegedly. I keep getting overwhelmed every time I try to pull it all apart to explain it properly on the wiki.

brave fable
#

it'd absolutely explain why viewport move has no effect (and why the camera is locked to the bottom-right, where the farmer is)

#

well i'll just write in some good-enough info there for now so i can earn some wiki privileges

vernal crest
#

Ah so not necessarily fighting with clamp, just unfreeze being confusingly named

#

I also had no idea you could set viewport with an NPC as its target instead of an x y coordinate. I wonder if it follows the NPC (probably not?)

royal stump
#

the farmer/NPC one just replaces the x/y with the position of that character, so probably not, unless viewport does that already

#

(idk what unfreeze does to the camera either, it's kinda complicated stuff in Game1 and all the event command does is this)

if (option == "unfreeze")
{
    Game1.viewportFreeze = false;
}```
lucid mulch
#

note that 1.6.15 has a bug where if you aren't clamping then the fade and unfreeze stuff incorrectly read the same index when on an npc target

brave fable
#

oh. well that makes more sense hahah

#

the default event camera is 'frozen' on the coordinates you set. unfreezing it returns it to the usual game behaviour of following the player

lucid mulch
#

and it doesn't follow, it just grabs their coords at the point in time

#

and player is a valid npc target

brave fable
#

viewport farmer does not work. viewport player does

lucid mulch
#
position = ((!(NPCTarget == "player")) ? @event.getActorByName(NPCTarget).TilePoint : Game1.MasterPlayer.TilePoint);
brave fable
#

unless farmer counts as a valid actor?

#

ah it does nevermind

#

spouse is also a valid actor. cute

lucid mulch
#

I think the 1.7 wider event refactor standardized npc targets more

#

actually I still have the last 1.7 build in ILSpy it didn't change it

#

did fix the index bug though

#

interestingly enough it partially supports the optional NPC target syntax of appending a ? but it'll just null reference exception when it gets back to the event

brave fable
#

i see why nobody only very brave & determined people edit the wiki

#

it's really amazing how many different kinds of formatting you can apply to a paragraph without ever knowing how or why

#

or even wanting to

vernal crest
#

It is a wild and dangerous place

brave fable
#

usable? understandable?

vernal crest
#

Beautiful! My only feedback is that you've used the angle bracket formatting in the description when it should be square bracket (or none)

brave fable
#

good catch SDVpufferthumbsup i'll fix it and publish (if wiki lets me)

#

beats a TODO at least

round timber
#

the dreaded TODO….

brave fable
#

what the hell do you mean there's a burger bobber and i can just use it in events as a temp sprite

#

while i'm making a n event in a hot springs.... a floating burger.....

#

but we don't have access to the xperiodic and yperiodic args in events to make it bob SDVpufferpensive

drowsy pewter
#

bebber burber bobber

vernal crest
#

TAS and give it motion?

brave fable
#

motion is linear, it'd just fly off into the sunset

#

you'd need the periodic properties to bob the burger

vernal crest
#

Just remove it and add a new one going back down then repeat /j

drowsy pewter
#

this bush remove/regenerate trigger action is very handy

drowsy pewter
#

@next plaza if i only want to use excluderegions, what should I put for includeregions? the whole map, or null, or something else?

blissful panther
# drowsy pewter <@140231789217054721> if i only want to use excluderegions, what should I put fo...

It looks like from the code, it's set up to specifically skip includeRegions if you put null there, yeah.

(Code for context. SDVkrobusgiggle)

List<Rectangle> includeRegions = new();
if (args.Length >= 4 && args[3] != "null")
{
    string[] rectStrs = args[3].Split('/');
    int i = 0;
    foreach (string rectStr in rectStrs)
    {
        string[] rectParts = rectStr.Split(',');
        if (!ArgUtility.TryGetRectangle(rectParts, 0, out Rectangle rect, out error))
        {
            error = $"Rectangle parsing error for includeRegion {i}: {error}";
            return false;
        }
        includeRegions.Add(rect);
        ++i;
    }
}
drowsy pewter
#

nice thanks haha

blissful panther
#

Yeah, when that's null, it just automatically adds an include region the size of the entire map.

elfin kindle
#

Hi hi, i am back! This time cus i cant figure out why tf my schedule won't work SDVpufferwaaah I have checked multiple tutorials and really tried to copy everything letter by letter.
Schedule.json file: https://smapi.io/json/none/263f30cb77b44cb6a2e52265fb41e670
Maps.json file: https://smapi.io/json/none/dbafaecae1584e60a08a5a0a634eee1d
(This one has worked fine, though i haven't tried the ice festival yet but ya'll dont have to look at that one, this is just for context)

I'm getting 0 errors through Smapi's console but i'll include my latest one since the schedule doesn't work
Smapi Log: https://smapi.io/log/ecd61bf034d641c8b13c3de79005dc89

ocean sailBOT
#

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

elfin kindle
#

My NPC does appear in the right map, i have tried sleeping after each change to make sure it resets as well

#

He just won't move

#

Ah and this might be useful? I've marked his most common spots, the ones referenced in his basic spring/default schedule ^^"

karmic gust
#

Did you load a blank JSON for the schedule?

elfin kindle
#

ah, no? I never quite grasped what loading the blank json does and didn't see it referenced in the tutorials i looked at

next plaza
#

I've been too mentally drained at the end of the day during the week lately to work on much, maybe converting the docs over to prepare for the autogeneration for readme+website would be a good task

karmic gust
next plaza
#

Remind me in 3 hours to work on spacecore docs (and also do those PRs finally)

patent lanceBOT
#

you're in luck, I have one spare egg timer available. I think it's broken but we'll give it try. (#6907251) (3h | <t:1760464759>)

elfin kindle
blissful panther
elfin kindle
#

Ah-hah!! It works! I think get what the blank.json is used for now, thank ya'll for always helping out SDVpufferfall

vernal crest
# elfin kindle Ah i've looked at that one many times when i was just starting out! Maybe now i ...

The purpose behind the blank load is because an asset has to exist before it can be edited. You can load your actual schedule file directly, but then you can't use CP tokens because CP passes the file straight to the game without editing it to replace the tokens with their intended values first. So if you want to use tokens (and we usually do, since the recommended convention for the NPC internal name is {{ModId}}_<Name>) you load a blank json first so the asset can exist, then use EditData to pass the actual schedule data into that asset. Because you've used EditData, CP knows to edit it before passing it to the game and replaces the tokens correctly.

#

The same thing applies for NPC dialogue and event files for new locations that you made for your mod. We don't do it for things like NPC gift tastes or adding events to existing vanilla locations that already have events in them, because those assets already exist so we jump straight to the EditData part to add our data to it.

elfin kindle
#

Aha! Then it's as i was starting to suspect! But i really appreciate the proper explanation cus now i understand why my tokens had been really messing with my mod when i tried to fix compatibility! Now i can actually make it proper and follow customs ^^ Thank you so much for taking the time to explain!!!

vernal crest
#

You are very welcome :) Many people struggle to understand blank loads at first (including me) so I like to properly explain them so people can use their understanding to know when and how to use them.

elfin kindle
#

Yeah, when youre beginning it's all very confusing and overwhelming so you just kinda blindly follow everything copy + paste style but understanding is always gonna be more effective in the end. But first you gotta test stuff out and learn how to write and navigate the things :P Then you can mess up, bonk your head against the keyboard and THEN start understanding

vernal crest
#

Yup pretty much haha

#

Doing stuff without knowing what it does is a perfectly good way to learn if you're able to go "ok if I don't do X then Y doesn't happen, but once I do X then Y does happen, so X is probably causing Y"

next plaza
#

Examples and stuff would still need to be manually done in the xmldocs, but it'll reduce the barrier a lot (especially since I have two places I want to generate docs for)

blissful panther
#

Maybe a custom analyser to refuse to build in release mode if I don't have any Feature-derived class documented...

elfin kindle
next plaza
blissful panther
#

Not easily at least! I suppose you could have it look for a custom XML doc tag pointing to the generated docs, then it could compare what it would generate against that?

next plaza
#

I mean what if you updated the method body is what I meant

#

!stone

ocean sailBOT
#

🪨 The item ID for Stone is 390.

blissful panther
#

Oh, well that's a million times spookier.

calm nebula
#

Just make an ai do it

spice sapphire
#

Hello

That they recommend me to draw a complex interface,

I want to make a list on the left and according to what you select, another list will appear on the right.

next plaza
next plaza
lucid iron
#

I basically just update docs whenever I make a thing

#

And then do the deploy once I am actually ready

next plaza
#

SpaceCore has some stuff for easier UI as well, but for really complex stuff it's still not ideal

#

I'm gonna rework it... eventually...

lucid iron
#

That said I think xmldoc structure is not very good for actually describing what modders need to do so I manually write all that

next plaza
lucid iron
#

it took me 3 days to write the initial docs yes Dokkan

#

Including it on gh and new website seems not so hard though

next plaza
next plaza
lucid iron
next plaza
lucid iron
#

You can be fancy and use react or whatever too

#

If it is just static webpage no server backend gh pages is perfectly adequate

next plaza
#

Hmm I hadn't seen docfx before

lucid iron
#

I never committed the shell scripts but i can share when i home AquaThumbsup

#

It works pretty ok

next plaza
#

I'll check later if it can do what I have in mind

lucid iron
#

Speaking of StardewUI it uses mkdocs

#

the xmldoc part isn't built-in for that one though, psure stardewui has specialized stuff just for that

next plaza
#

The XML docs is one of the key parts I want

lucid iron
#

Yeah then docfx

next plaza
#

That also would mean any docs for fields on a data model are available in C# as well

lucid iron
#

I uh, have been ass about documenting stuff in newer version

next plaza
lucid iron
#

Inside the xml docs i mean

next plaza
#

C# makes it easy to load XML after all

lucid iron
#

So that section is somewhat useless

next plaza
#

I also still need to do my C#-generated content pack idea...

#

(Sorta like how datagen in modern MC works, actually)

lucid iron
#

Otoh the harmony xmldocs is very helpful for finding niche features of codematcher

#

It also uses docfx iirc

next plaza
#

(Basically, my qualm with json is the quote madness and lack of compile time safety, but my qualm with doing it straight in asset requested is that its tedious for large amounts of data)

lucid iron
#

I think my problem was that my mod is content facing so a C# method existing means basically nothing bolbpopcornhat

next plaza
#

(I talked about it some in one of the secret crime threads)

lucid iron
#

It is presumably more useful for stuff like spacecore skills

next plaza
#

Yeah, I just kinda hate having to have a separate CP content pack for a C# mod. I want it self contained

#

Not that this works around that

#

Unless I commit code crimes against SMAPI

lucid iron
#

I did think it would be nice if I could like

#

Call some cp api and give it the patch records

#

Instead of packing content pack

next plaza
#

Pathos has been against the idea when I asked before.

lucid iron
#

It is still not exactly compile time safe tho

next plaza
#

The "create fake content pack" API is only available for your own helper

next plaza
lucid iron
#

Did u see this crime

next plaza
lucid iron
#

Idk how that could be solved tbh

next plaza
# next plaza Well, my idea is a bit more complex than simply passing a pack to CP

It's more like:

public class Mod : StardewModdingAPI.Mod, IGeneratesData
{
  public void Generate(IGenerationContext ctx)
  {
    if ( ctx.FrameworkId != "Pathoschild.ContentPatcher" ) return;
    var cp = (IContentPatcherGenerationContext) ctx;

    var objects = cp.Dictionary<string, ObjectData>("Data/Objects");
    objects.Add( "MyObject1", new() { Price = 123, /* ... */ } );
    objects.Add( "MyObject2", new() { Price = 456, /* ... */ }, conditions: cp.Conditions().Add( "Season", "spring" ).Add( "Weather", "rain" ) );
    objects.Add( "MyObject3", new() { Price = 789, /* ... */ }, priority: Low );

    objects["(O)0"].DisplayName += " Honey";
    
    var dt = cp.DynamicToken( "variant" );
    dt.SetValue( "default" );
    dt.SetValue( "spooky", conditions: cp.CreateConditions().Add( "Season", "spring" ) );
    cp.Replace( "Maps/Forest", $"assets/Forest/{dt}.tmx", exclusive: false ); // custom interpolated string handler, by the way
    cp.Replace( "Maps/Town", $"assets/Town/spooky.tmx", conditions: cp.Conditions().Add( dt, "spooky" ) );
  }
}

(Except with a bunch more convenience methods and constants and such)

#

When you build your mod it will start up a bootstrap process to run that method (or maybe just have it generate in debug builds when you run the mod? if I go pack injection route), and then use the things you called to generate a pack based on it

next plaza
lucid iron
#

This would only work for vanilla things or hard reference then NotteThink

next plaza
#

The reason it's IGenerationContext instead of CP directly would be for mods that aren't accessible via CP but have their own pack. (And also C# generics don't work like Java ones, nor do we have C++ template specialization)

next plaza
#

Also

#

It doesn't have to the same type

#

Just an equivalent one

lucid iron
#

I guess it's ok if u make a placeholder class if you are bothered

next plaza
#

Since it doesn't go through vanilla content system

next plaza
#

Just copy+paste the data model from your dependency into your mod if it's not a hard dep

lucid iron
#

Finally my weird ass choice to use BuildingData for furniture will pay off Dokkan

next plaza
#

Everyone loves duck typing

#

Another thing to figure out would be config stuff though

#

I guess I could add something to simplify generating mod tokens for your C# config

#

The other option would be more invasive patching CP to make it pull directly from C#... which @ivory plume might hate me if I try

spice sapphire
#

Ok I ll try it
Thx

patent lanceBOT
elder kite
#

I went ahead and made my old launch scripts into a setup script that lets you customize them for yourself! :D

wraith aspen
#

hey everyone, quick question here. how would i add two conditions to a drop chance? i'm trying to add a season condition to a trashcan drop in my mod but i dont think i did it right, as one of the items for the other seasons showed up in my drops

brittle pasture
#

need a comma between two separate conditions

#

RANDOM 0.1, SEASON Summer

wraith aspen
#

i'll give that a shot, thank you!

elder kite
#

lol

ornate trellis
gentle rose
elder kite
#

It is currently, sorry I forgot to update that part of my mod page template

#

Are you on Linux or Mac OS?

gentle rose
#

I usually use linux, I was just curious SDVpuffersquee

quartz vale
#

Can someone tell me If i need to config a Path on my own for custom npc when settings their schedule or so they find the best suitting Path their own?

urban patrol
#

pathfinding is handled by the game automatically, you just tell it schedule points and it does its magic

hard fern
#

Yeah, it'll at least try to the best of their ability

quick sand
#

Hello can anyone help with spacecore?
I'm making a mod that spawns monsters. In the spacecore documentation it says: "(C# mods can register additional types with the SpaceCore API.)" Can someone create an example of this with the magmasprite so that I can understand how it's supposed to be written?

Background: I'm working through Microsoft's C# class but it isn't really connecting to writing stardew mods yet. Currently in the looping logic "do-while" module. My mod is listed on Nexus as "The Arena"

brittle pasture
#

asking just in case, do you want a custom monster class with custom behaviors/pathfinding/etc?

quick sand
#

No at the moment I'm just trying to add the magma sprite as a monster class that I can then update my CP to summon it

brittle pasture
#

the vanilla magma sprite is just a reskinned bat

quick sand
#

🤯

#

Do you know how to use the texture override option? I tried to use it like the monster name option but it didn't work

brittle pasture
#

it takes an asset name so you can just point to the magma sprite path right

#

do you have code of what you tried?

#

also, hmm, it doesn't seem like SpaceCore actually supports spawning a full featured magma sprite

#

(it is a bat reskin, but one with a few extra bells and whistles on top, which SC doesn't seem to allow you to set)

quick sand
#

Haha I just put
"MonsterTextureOverride": "Sludge",
To try to make my red slime use the red slime skin instead of the rub values.

#

Unfortunately it seems slimes textures are the most complex so I ended up getting burned out and took a break

next plaza
brittle pasture
#

I may be wrong (likely) but looking at Bat.cs it only uses the mine level, and if it's -555 then it spawns a magma sprite

next plaza
#

Hmm, guess I assumed from seeing the parseMonsterInfo

#

The function you pass to it takes in the position (in pixels) and a Dictionary of the spawnables MonsterAdditionalData, and should return the monster instance

#

(I realize this may not be super helpful since you mentioned you're still working through learning C#, but for future reference)

quick sand
#

I just can't translate what I'm learning into anything tangible

brittle pasture
#

I don't think it helps here unless you want to make a new monster class that just subclasses Bat but with the extra fields set to true

#

actually I guess we dont need the subclass

quick sand
next plaza
#

Once you got the api instance you'd just do something like:

spacecoreApiInstance.RegisterSpawnableMonster( "MyMonsterId", FunctionReferenceThatMatchesRequiredSignature );

Anonymous function example (which will probably be very confusing looking if you don't know what those are yet):

spacecoreApiInstance.RegisterSpawnableMonster( "MyMonsterId", (pixelPosition, customData) => new MyMonster( pixelPosition ) );
next plaza
#

Not sure that you can affect it with content patcher mods

brittle pasture
#

or a pr to sc

quick sand
finite ginkgo
#

(a little late, but Sword & Sorcery also adds a Magma Sprite SC monster type if you want a code reference, also has a small extra thing to allow it to be 'magma sparkler'-like instead, because those are also a thing in this here game apparently)

serene moat
#

Hello! I am having issues with my NPCs either not showing on their Patios or not standing on the path spot. If they show up, they will stand on the spot below the red dot and not using the animation set up sometimes. Nothing but the red spot on the path layer is on the tile

next plaza
#

Oh, didn't realize S&S was open source now

finite ginkgo
#

Been for a while now (~6 months if going by when the license was added to/readme last updated in the repo)

solid apex
#

Hello! It's my first time modding and I wanted to make a custom NPC, but I've been getting this error [Content Patcher] Data patch "Freya NPC > EditData Data/NPCDispositions" reported warnings when applying runtime migration 2.0.0. (For the mod author: see https://smapi.io/cp-migrate to avoid runtime migrations.)
[Content Patcher] Can't apply data patch "Freya NPC > EditData Data/NPCDispositions > entry #1" to Data/Characters: failed converting entry to the expected type 'System.String': Error reading string. Unexpected token: StartObject. Path ''.. Plus I don't think she's loading properly because I can't see her in the in game NPC list. Can somebody help me? I can share her config file if it's necessary

GitHub

Mods for Stardew Valley using SMAPI. Contribute to Pathoschild/StardewMods development by creating an account on GitHub.

urban patrol
#

!npc are you following a tutorial? NPC dispositions is an outdated method of adding a new NPC. we recommend using any of the following resources:

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:

solid apex
lucid iron
#

i ran into weird bug where Game.currentLocation is null Thqnkqng

#

now i cant reproduce

lucid iron
#

split screen

calm nebula
#

Yes

lucid iron
#

but then it started working

calm nebula
#

Game1.currentLocation can be null briefly

#

For farmhands

lucid iron
#

i was testing something unrelated pippleDot

#

weh

#

i assumed onwarp would be safely after its set

#

the smapi event i mean

calm nebula
#

Not necessarily tbh and I think onwarp can fire twice for farmhands

#

But yeahhhhhh

lucid iron
#

well thats ok tbh

#

im doing a CWT.GetValue in there so firing twice is not a problem

#

the location being null is a problem

whole kite
#

Hello! Got a question for y'all. I'm currently tinkering with a personal edit of Beams Color Change and PIF to get them to play nicer together.
Currently PIF rooms are only changed when "OtherHouses" changes are active, causing the rest of the town to change as well. I'd like to make them change with the FarmHouse instead so the rest of pelican town doesn't look weird with my darker edit of the "Darker Brown" beams/walls and normal everything else.

The way I'm reading this:
"LocationName |contains=FarmHouse,Cellar,IslandFarmHouse,Shed,Big Shed,Greenhouse": "false"
is that it says "If its not FarmHouse, Cellar, Island FarmHouse, the sheds, or Greenhouse then its an OtherHouse and it should be changed" vs FarmHouse just targets the FarmHouse LocationName.

I looked through the PIF documentation about the LocationName/MapName/FTM Compat stuff and thought perhaps I could swap the LocationName": "FarmHouse"
out for something like "LocationName |contains=FarmHouse,DLX.PIF_MINE_": "true" or "LocationName |contains=FarmHouse,prefix:DLX.PIF_MINE_": "true" but neither of those appeared to work. I'm a bit tired and still very very new at all this so I feel like I'm missing the obvious answer and discord search is abysmal. Does anyone have any ideas or know where/what I might look into?

(sorry for the wall of text)

calm nebula
whole kite
calm nebula
#

And you'll get an event with the real location when it shows up

#

But tbh I dont like the whole null currentlocation thing

lucid iron
calm nebula
#

I tend to want to use e.NewLocation and I genuinely don't recall why

calm nebula
lucid iron
#

You need PIF to provide a token that you can use

#

For the generated location names

lucid iron
#

Is just weird it bork at all y'know

calm nebula
#

"Query: '{{LocationName}}' LIKE 'Delix.Pif.Mine*'" : true

#

But use the correct prefix

calm nebula
#

Not it!

whole kite
calm nebula
#

Query token on the CP docs

whole kite
#

Got it. Thank you!

uncut viper
lucid iron
uncut viper
#

"When a farmhand warps to a location, the game fetches the real location from the host player before the warp completes. For a short while, the farmhand may have a null currentLocation field while they're between locations."

lucid iron
#

but then is e.NewLocation safe

#

my confusion partly comes from inability to reproduce the issue

uncut viper
#

well its shadow world stuff (or at least in the same ballpark) so ofc when you try to shine a light on it, it goes away

calm nebula
#

Just be like me

uncut viper
#

like the heisenberg principle

calm nebula
#

And pretend multiplayer doesn't exist

lucid iron
uncut viper
#

i cant pretend that bc i exclusively play in multiplayer

#

literally never played the game singleplayer

#

(mod testing doesnt count as playing)

lucid iron
#

sigh i guess i will put up a patch version just for this rip 1.1.1

calm nebula
#

I'm joking...mostly

#

I did make a point to do proper multiplayer support back when I did actually bother to maintain....anything

lucid iron
#

i never play in mp but i do support cus button and sinz only play mp Dokkan

uncut viper
#

mods that dont work in MP get a scathing review in my monthly columns

calm nebula
#

What about mods that dont work in single-player

uncut viper
#

i wouldnt know if they do or not bc i dont play singleplayer

calm nebula
#

What about mods that dont work at all

uncut viper
#

as long as they dont generate bug reports on MY mod pages they can not-work as much as they want

lucid iron
#

tbh i think mp support for the 2 machines case is not so bad

#

split screen is worse by A Lot

calm nebula
#

Remind me - chue

#

You're the one who was looking into PerScreen performance?

lucid iron
#

no :)

uncut viper
#

i have a multiplayer only mod that i dont even support splitscreen for

lucid iron
#

well i was just wondering if it'd be better if we had array

#

instead of dict

calm nebula
#

I have an impl i want to try

#

Next time I have spare time

lucid iron
#

and the actual tto difference is essentially nothing as far as i can tell kyuuchan_run

whole kite
lucid iron
#

i did it anyways cus it feels better emotionally and thats what hobby coding is all about 😌

lucid iron
calm nebula
#

Array with bitmask for validity

lucid iron
#

fancy

#

something else that confuse me is that

#

why does relaunching the game gets you into a state of screen 0 + screen 2

#

why not just reuse 1 yggy

calm nebula
#

But also hook into game instance dispose to clear screens

calm nebula
#

I bitmask all day bitmask all night

patent lanceBOT
patent atlas
#

heya, someone reported a severe bug in my mod that's either a random [de]serialization problem or a random mod conflict, which means i'll be cheating and skipping a bunch of days and have to create a new farm to test with the other mod i think

#

is there any guide on best practices to avoid messing up my own account?

#

like, disabling achievements and stuff

#

i guess, a guide to testing in general

#

hnhngngn rider lost config and it's been soo long i gotta learn everything again

#

for some reason, opening the project for the first time in months made rider forget about all types even after updating the ModBuildConfig package 💔

#

Fixed by setting the gamepath manually in the csproj 👍

gaunt orbit
patent atlas
#

and what do ya'll do in terms of testing commands

#

giving items, etc

tiny zealot
#

i do lots of direct testing, by e.g. spawning in objects, directly playing my events, etc.
but then i also test whether each given thing works by debugging in the prerequisites and triggering it "normally"

#

so say i have an event that triggers on a given day with X friendship with Y person, i slice through the universe with debug commands to line up the conditions and make sure it starts when i expect

patent atlas
#

got it got it

#

thanks!

#

my mod apparently has been deleting hats

#

which is terrible

#

replacing them specifically with the Cowboy Hat actually, which still baffles be as to why that hat specifically

#

is there any form of centralized handling of attachment slots? To avoid having two mods use the same slot

tiny zealot
#

what is an attachment slot?

patent atlas
#

the slot on a fishing rod for bait, for example

#

when an item has a popup with a slot inside

#

I'm currently doing this to add a slot to a item which has none:

private static void Constructor_SetSlotCount_Postfix(Pan __instance)
{
    Index = __instance.AttachmentSlotsCount++; 
}
brittle pasture
#

realistically the standard is going to be whichever mod becomes the most popular, thus dictating that lesser mods be written around it

patent atlas
#

I tried to make a funky workaround to work with any mod

#
/// <returns>The hat attachment slot index or -1 if for some reason it is not registered.</returns>
public static int GetAttachmentIndex(Pan pan) => Indexes.GetValueOrDefault(pan, -1);
private static readonly Dictionary<Pan, int> Indexes = new();

private static void Constructor_SetSlotCount_Postfix(Pan __instance)
{
    Indexes[__instance] = __instance.AttachmentSlotsCount++; 
}
#

but this is obviously brittle

#

this was meant to make sure I always have the last index available, but because this is not persisted in any way, adding or removing a mod would break it anyways

#

I might just assume no mod adds attachment slots to pans and simplifiy this stuff

#

I don't think it is currently causing issues, but it wouldn't avoid conflicts anyways (i think)

#

and maybe this funky persistence is related to my deletion of player hats 💔

gaunt orbit
#

So far the only mod I know of that does this is modular tools, which has a ton of its own bugs

#

I think the state of things right now is just "nobody's really doing this so it's the wild west"

#

I would make it work for now and add compat later if you need it and it's not too tricky

#

You can always just say "x is not compatible with y"

rare patio
#

howdy! just dropping by to ask a quick question

is there any way I can make it so that a shirt replacement sprite that is dependent on the player being male or female (using contentpatcher atm but maybe there's some other thing i should be) that would also show up correctly on multiplayer? atm what i have just displays the male/female variant on all players depending on what the client player's gender is which isnt quite right

next plaza
#

Just add your own netfield to the item! and painfully hook into the attachment slot code manually

rare patio
#

ah wait sorry if i interrupted something

next plaza
rare patio
#

ah, i see

next plaza
rare patio
#

lmao

#

hmm. is there any way to circumvent that without having to make custom items and then cheat them in for the defaults (was making fully custom character stuff for me and my partner for our umptillionth stardew playthrough)

#

eh probably not

next plaza
#

It’s been ages since I’ve looked at that code though

#

So I’m not entirely sure

rare patio
#

tailoring stuff does yeah but i more meant for the default clothes so we dont have to use the cheat console lol

ig i could just only modify the ones i know will be used by us actually i dont know why i didnt think of that

#

🥀 im smart i swear

next plaza
#

For that matter, in whatever code you have generating the item already, you could just use a condition to change which item is given based on the current player gender

rare patio
#

im not generating anything atm i was just modifying the default shirt spritesheet

next plaza
#

Oh you said default clothes

rare patio
#

yea

next plaza
#

Oh, editing default shirts too, not just new character customization default choices for new game?

#

Yeah you’re probably out of luck in that case

rare patio
#

yeah i assumed so

next plaza
#

You can add new shirts to the new character page apparently

#

But if you don’t want to make the actual items

#

No way around it

#

(With just CP anyways)

rare patio
#

i mean i can just make them actual items but i realized that since we're going for matching ocs as our characters they're really only ever gonna wear like 2 things lol

#

so i can just only "Gender" the matching items

#

i was overcomplicating things

next plaza
#

I mean a couple new items is really lightweight as far as Stardew goes

#

But if that works for your use case, then it works, no need to do more

#

/me disappears into dreamland

rare patio
#

so real

next plaza
#

(And not the Kirby kind)

rare patio
#

damn not the kirby kind? thats the best kind

next plaza
#

Gotta wait for Kirby Air Riders to come out for that 😔

#

(If that even takes place in dreamland…)

patent atlas
#

Hmm, apparently my NetRef's internal value isn't being set properly when loading a game

#

I thought XmlType + XmlElement + spacecore registering would be enough to serialize NetRefs?

#
[XmlType($"Mods_{ModEntry.ModAuthorName}_{nameof(HatWrapper)}")]
public class HatWrapper : Object
{
    [XmlElement(nameof(_internalHat))]
    private readonly NetRef<Hat> _internalHat = new();
    public Hat InternalHat => _internalHat.Value;

    public override string TypeDefinitionId => ItemRegistry.type_hat;

    public HatWrapper()
    {
    }

    public HatWrapper(Hat hat) : base(hat.ItemId, 1)
    {
        _internalHat.Value = hat;
    }

    protected override void initNetFields()
    {
        base.initNetFields();
        NetFields.AddField(_internalHat, nameof(_internalHat));
    }
}

// MOdEntry.cs
helper.Events.GameLoop.GameLaunched += RegisterSerializableTypes;
//...
private void RegisterSerializableTypes(object? sender, GameLaunchedEventArgs evt)
    {
        var api = Helper.ModRegistry.GetApi<ISpaceCoreApi>("spacechase0.SpaceCore");
        if (api == null) throw new($"{ModManifest.UniqueID} requires SpaceCore!");
        api.RegisterSerializerType(typeof(HatWrapper));
    }

next plaza
#

Going to bed for real this time, but it might be worth trying

#

That or turn your property into a get/set instead of => .Value

patent atlas
#
[XmlElement("hat")]
    public readonly NetRef<Hat> hat = new NetRef<Hat>();

hmmm it is public in the horse class

#

i'll try that

next plaza
#

(I recently did some very extensive stuff with the vanilla netfields and properties, and I’m pretty sure that was the case for just about everything)

#

Hope you can get it working!

patent atlas
#

i hope so too SDVpufferdizzy

#

good night!

#

that might actually be it SDVpufferwow

brittle pasture
#

:q

#

...i'm keeping it

soft lance
#

i love kirbyyyyyyyyyyyy

#

: D

patent atlas
calm nebula
#

You have successfully quit the game

patent atlas
#

Nooo they forgot to save

brittle pasture
patent atlas
#

It's too late for a w now...

patent atlas
tame burrow
#

@lucid iron i missed this completely. THANK YOU. ;-; (DitR is so old it probably won't be too useful now but i'm adding the migration anyway just in case)

brave fable
#

it's technically correct to merge the viewport move info into viewport given it's just another format of the same command, but i'm not sure this is the best way

#

oops lost my linebreaks in the optional args

royal stump
#

they seem distinct enough to justify splitting, imo
and end is a pretty big precedent for not merging by technical command SDVkrobusgiggle

brave fable
#

mmm it's a tricky call

tiny zealot
#

if you do merge them, i would not put the <> brackets around move, since the argument is the literal word move and not a value that you sub in

brave fable
#

how would you then format the optional arguments clamp and unfreeze 📝

#

which are also string literals

tiny zealot
#

unsure (viewport is a nightmare), but those are a slightly different case (optional trailing arguments)

opal hull
#

Quick question, if any of y'all know: does the FashionSenseOutfits framework mod have compatibility with split-screen co-op? Like being able to target players by name or something? I think it probably doesn't, but thought I'd ask y'all just in case.

I'd like to make a split-screen content pack for it if so, and if not, then I guess it's just one more thing that pushes me towards learning C#. I feel like most of my mod ideas require it 🫠

autumn tide
opal hull
# autumn tide sadly cannot help, but out of curiosity, what are your mod ideas? /gen

The ones so far that require C# are just this outfit thing, making pets not lose friendship if they don't have their own bowl (I tried mods that turn off friendship decay, but they didn't seem to stop the "no bowl" loss), and a map including fruit trees for an NPC mod that I'm slowly trying to learn how to make... I feel like I had another one at least but now I can't remember it RIP me thinking I don't need to take notes lmao

opal hull
calm nebula
#

The map including fruit trees doesnt need c÷

#

C#

opal hull
#

Thank you!

autumn tide
#

hellooo uh where can I find the in-game audio files to edit? I do have soundboard

lean veldt
#

Hello, is there a way to tell smapi ignore my mod that doesn't have update key because I want to only keep it for personal use?

brittle pasture
#

add ["nexus:???"], then smapi only complains that it can't parse the number in trace logs (which is invisible by default)

lean veldt
#

Ok thanks SDVpufferheart

tiny zealot
#

in your config.user.json (in the smapi-internal folder), you can add a field called SuppressUpdateChecks which turns off update checks for any mods listed in it (see the config.json for example)

lean veldt
#

Ok thank you very much SDVpufferheart

oblique meadow
#

Ok. I need to know if there was a better way of doing this limiting the options to CP
I changed the demetrius event on my farm to be the dwarf. However understanding the dwarf is tied to the translation guide flag. So what I did was give the translation guide flag on day 1, and it clears the flag after they have seen the "Demetrius farm cave" event. It WORKS, I just feel like it could have been done differently with less chance of issues for players. Thoughts?

tiny zealot
#

you could lock the event behind the translation guide flag

#

changing preconditions is a bit weird since it's part of the key, so you have to null out the event and then replace it at the new key, but it's an option

oblique meadow
#

Yeah, I could. But would it be silly to lock what should be an early game event behind a late game trigger?

tiny zealot
#

speaking for myself, i prefer it to the solution you described above

#

you could also just leave it as-is and let the dwarf speak dwarvish if you don't have the flag

#

if people complain you can just "git gud" at them /j

oblique meadow
#

I dont know a ton about events so pardon the ignorance on this (I know I should read the wiki and I will), Can I tie an event to a player getting a specific flag?

#

Wait

#

nevermind

#

You already said yes. Just in a different way

late gull
#

Can I bundle an exisiting physics library for my pinball iMinigame implementation or am I going to have to write this up from scratch?

mental wyvern
#

hello im new to modding how can i make my npc show up in game? theres no errors yet the npc wont show 🙁

latent mauve
#

!json if you show your code, we might be able to point out something you've missed

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.

mental wyvern
latent mauve
#

Can you share your Data/Characters entry in the json validator at the link? Also is this character meant to be social (can be talked to, gifted, etc.) or nonsocial?

#

You should have a URL in a green box once you put the code in at that link and click save & parse

#

It's easiest to share that

mental wyvern
#

okii

#

manifest

brittle pasture
mental wyvern
#

content

brittle pasture
#

look at ModBuildConfig's documentation

latent mauve
mental wyvern
#

ohhh

latent mauve
#

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

mental wyvern
#

i was following on the stardew wiki

#

oof

latent mauve
#

Might have been on an outdated page, mind telling us which one so we can make sure to add a note to it?

mental wyvern
#

so the dispos.json isnt needed anymore?

tiny zealot
#

this is the part at issue:

    {
      "LogName": "NPC Manifestation",
      "Action": "EditData",
      "Target": "Data/NPCDispositions",
      "Entries": {
        "SilverKnight": "adult/polite/neutral/neutral/male/datable/null/Other/fall 20//BusStop 22 5/SilverKnight"
      }
    },```
latent mauve
#

That's the updated tutorial, so not sure where you got the Data/NPCDispositions target and slash delimited string from

mental wyvern
#

im so dumb sorry ToT

tiny zealot
#

you're not dumb! it's confusing if you're new to it

latent mauve
#

The tutorial mentions Data/Characters and has an example block, that is what you need to use instead 🙂

mental wyvern
#

ohh

mental wyvern
latent mauve
#

It's a fairly recent change that swapped the NPCs to data models, so it's easy to overlook!

tiny zealot
#

ah that would do it

latent mauve
#

It's way easier to understand the values in the new way

mental wyvern
#

so what part of the code should i remove?

#

or change

latent mauve
#

The part ichor posted needs to be changed

#

YT tutorials tend to get outdated quick, unfortunately

tiny zealot
#

instead of that patch to Data/NPCDispositions (old data asset, no longer in use), you should be patching to Data/Characters in the manner of the tutorial you were reading

#

you don't have to put it in a separate file (dispos.json) if you don't want to. the important part is the format of this part:

        {
            "Action": "EditData",
            "Target": "Data/Characters",
            "Entries": {
         ...```
latent mauve
#

Also, since it's early, consider adding {{ModId}}_ in front of your NPC's internal name and portrait/sprite targets!

tiny zealot
#

looping back to the chorus! once more with feeling!

latent mauve
#

It helps prevent future mod compatibility issues if someone else makes a mod with the same NPC name later.

tiny zealot
#

🎵 always prefix your thiiiiings 🎶

mental wyvern
#

ok i did what you guys said i think.. but now theres another problem SDVpufferwaaah

latent mauve
#

Okay, so you need to change the slash delimited string part to a series of key and value pairs.

#

Lemme get to a computer so I can explain it more clearly

latent mauve
#

Honestly, converting from the old dispositions model to the new Data/Characters model is probably one of the best use cases of my google sheet NPC Builder xD

mental wyvern
#

huhuhu

latent mauve
#

You already know all the values, you just need to attach them to the new Fields in the data model. 😄

mental wyvern
#

data model whats that?

latent mauve
#

alright, computer booted up

mental wyvern
#

the sprites?

#

im sorryyy ive been doing this for hours im slowly losing my mind

latent mauve
#

so, this is a slash-delimited list: "adult/polite/neutral/neutral/male/datable/null/Other/fall 20//BusStop 22 5/SilverKnight"

#

because each value is separated by a /

#

the new format uses a data model, which has code that looks more like this as an example:

"Target": "Data/Characters",
"Entries": {
"{{ModId}}_NPCName": {
"DisplayName": "MyNPC",
"BirthSeason": "Spring",
"BirthDay": 5,
"Gender": "Male",
"Age": "Adult"
}, //Close NPC model
}, //Close Characters Entries
}, //Close EditData Characters Action```
#

adult is a value for the "Age" field, so you need to use "Age":"Adult" with the new format, and so on.

mental wyvern
latent mauve
#

yep, you're gonna use that type of entry.

#

You should have a block like that in tiakall's tutorial as well, but the fields are all listed on the official wiki on the Modding:NPC_Data page

mental wyvern
#

okii tyy

latent mauve
#

I'm kind of explaining it broadly, so if you have any specific questions, feel free to ask!

vernal crest
latent mauve
#

(thanks Aba, it felt awkward to point them there myself after they were already looking at Tia's tutorial)

#

I did specifically build it while migrating a 1.5 character to 1.6 though, so it should work well enough for this. 🙂

elder kite
#

Having trouble targeting any sprites in this mod, something updated but I can't seem to figure out what, the path of the objects.png file is unchanged and the UniqueID for the mod is the same as well: https://www.nexusmods.com/stardewvalley/mods/20340

Nexus Mods :: Stardew Valley

A configurable mod that adds a few new crops to grow vanilla forage items, as well as converts some vanilla crops into perennial 'bushes'.

#

Any ideas?

#

"Target": "Mods\\Cornucopia.GrowableForage\\objects",

#

sample of one of the editimage actions:

#
        {
            "Action": "EditImage",
            "Target": "Mods\\Cornucopia.GrowableForage\\objects",
            "FromFile": "assets/seeds/{{Seed Packet Variant}}/seeds-growable-forage.png",
            "FromArea": {
                "X": 0,
                "Y": 0,
                "Width": 16,
                "Height": 16
            },
            "ToArea": {
                "X": 64,
                "Y": 16,
                "Width": 16,
                "Height": 16
            },
            "Priority": "Late",
            "When": {
                "= Disable Entire Mod": "false",
                "Seed Sprites": "Enabled",
                "Growable Forage": "true"
            }
        },```
brittle pasture
tiny zealot
#
Game1.dialogueFont = Game1.content.Load<SpriteFont>("Fonts\\SpriteFont1");
Game1.dialogueFont.LineSpacing = 42;
...
Game1.smallFont = Game1.content.Load<SpriteFont>("Fonts\\SmallFont");
Game1.smallFont.LineSpacing = 28;```
why, mr ape. why would you do this to me
elder kite
#

Sorry its so long, the end should be the helpful part I think

#

Didn't wanna omit anything important

tight rivet
#

I think I'm going to endup writing a python script to pull values out of this to prevent it taking forever

brittle pasture
elder kite
ocean sailBOT
#

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

elder kite
#

Theres lot of other errors with SSS, im just currently updating it and working thru all the issues mod by mod

brittle pasture
#

there's no Mods/ prefix

elder kite
#

That was it! How did you figure that out?

#

For most mods I've been targeting I've been using that path formatting

#

Example that is working for east scarp:
"Target": "Mods\\Lemurkat.EastScarp\\esobjects",

brittle pasture
#

I downloaded it to check the content.json

#

have you not being doing it /gen

elder kite
#

What?

#

The format above used to be working for this mod as well, so I'm confused what changed

brittle pasture
#

(I admit I should have done that first before telling you to run the command, my apologies lol)

finite ginkgo
# elder kite For most mods I've been targeting I've been using that path formatting

The Mods/ prefix (and just whole target path in general) is arbitrary, the game doesn't actually know or care that it's coming from a mod, the target is whatever the original mod provides, if it was working before, then yeah it was using the target Mods/Cornucopia.GrowableForage/objects, but an update to the mod clearly updated that to remove the Mods/ prefix

brittle pasture
#

ah that could be the reason

#

though actually I downloaded the March 2024 version and the target's always been like that?

finite ginkgo
#

But yeah, the target Mods/<mod id>/whatever is neither a requirement or a real standard, never assume that's what the target will be, always check the original mod

elder kite
#

Weird, I swear it used to work but maybe Im tripping, anyways, thanks its all working with mod now

#

Onto the next 😅

finite ginkgo
finite ginkgo
gaunt orbit
#

is NetList actually used anywhere or is it all NetCollection

gaunt orbit
#

do crabpots and casks have the is_machine tag or no?

#

or tappers, for that matter

brittle pasture
#

hmm according to the code they have it if they have entries in Data/Machines

#

so cask and tapper yes (the latter's empty lol), crab pots no

#

(it seems like the tappers' Data/Machines entries is solely to set HasOutput to true so they have the machine_output tag)

gaunt orbit
#

crab pots my nemesis

#

evil bastard item

#

incidentally, incubators count as machines, they just do cursed things to turn items into animals

brittle pasture
#

side fun fact, heaters' winter wobbling animation is identical to a machine's working effect, and is achieved by setting it to process a phantom item that takes 9999 minutes

hard fern
late gull
lucid iron
#

The phantom item is laws of thermodynamics

gaunt orbit
#

No need to write a whole new feature when you can just mangle something you already have into doing what you want

#

(to be clear this is humorous and not critical. I have been there myself.)

mental hound
#

Does anyone know how to use the item categories, like the Eggs and Milk in the Home Cook's Bundle, as an item in the default bundles? When I try to use either the category name or ID, it shows up as an error item.

tender bloom
#

Should be like -5

mental hound
#

i did that, and it showed up as an error item

hallow prism
#

For eggs or are you trying with something else?

#

It may be limited to specific cases

#

Showing what you did may help

calm nebula
#

It is limited to specific cases ys

mental hound
#

im trying to transplant some remixed bundles into the default set. Im using editdata on the bundle fields, swapping one of the bundle's data with this:

"Bulletin Board/32": {
          1: "O 201 5",
          2: "-5 10 0 -6 10 0 246 100 0",
          3: "5",
          4: "3",
          6: "Home Cook's"
          }

am currently checking if i need to make a new save for the edits to apply, gimme a moment to validate

#

lol okay cool i was right and it wasnt getting reflected without making a new save. I do have a separate question though, is there a way to use the remixed bundle icons on the default ones?

#

i know the bundle key has an index for the bundle icon, but the remixed bundle format is completely different, so i dont believe swapping the index with LooseSprites\\BundleSprites:7 would work

gilded thunder
#

hii, is it possible to set a relationship requirement or bracket to change a dialogue entry?

tender bloom
#

You can use When conditions

#

The base game dialogue keys also have some more limited friendship conditions

graceful grail
#

first day coding anything, how do i use #$b# within $c (which i have been told doesn't work)

uncut viper
#

you have been told that bc it doesnt

graceful grail
#

awesome

#

is there a way to do it anyway

uncut viper
#

no

gilded thunder
graceful grail
#

is there a way to randomise between 2 dialogue lines other than with $c in which i can have click breaks with #$b#

gilded thunder
#

i tried searching through this channel and on the wiki for any hints, and the only thing i could find was on event data with friendship; would that work within the When condition?

uncut viper
#

a lot of people use i18n to randomly choose between lines

uncut viper
#

content patcher has tokens to get the players relationship/friendship values with an NPC

#

you would use these tokens to decide when to change/add dialogue

gilded thunder
#

oh, thank you :>

tribal ore
#

Is the BusStop not a valid location for NPC schedules?

#

They seem to arrive at the map, and then just stay at the warp in tile

urban patrol
#

it should be valid. are you testing with a minimal mod setup? they might be running into a buildings tile or another warp

tribal ore
#

Yeah, no SVE or anything else that changes the BusStop map, afaik

#

I'll double check. Tried with two different NPCs and got similar results

urban patrol
#

and you're not trying to path them into a building tile, just to make sure?

tribal ore
#

Just out onto the path. But those are good things to double-check, thanks. I'll try a different tile

#

Changing to a different tile didn't work. CP reports only Data/Events/BusStop as being modified, nothing else. Very strange

#

I'll probably revisit later. Can't let this be a block for what I'm currently doing

urban patrol
#

you could send the schedule here too just in case anyone else has a brain blast about it

urban patrol
#

!npc there are tutorials and resources here--in my opinion, it's almost easier to create a whole new NPC than to replace an existing one if you want to do that. if you're determined to edit penny to become your girlfriend, though, you would just make sure that your edits target penny

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:

vernal crest
#

If you only want to edit the portrait and sprite with no other changes, that's a very easy and straightforward thing to do and way, way easier and faster than making a new NPC. To do that, I'd recommend just finding an existing mod which replaces the textures of the NPC you want to edit - ideally one released after March 2024 so it's for the current game version - and then replace the images with your own (and obviously don't share that with other people). If you want to put a more fleshed out version of your girlfriend into the game, then the links that nic shared are a good approach.

urban patrol
#

does anyone know how long the CC conversation topics last? an NPC just commented on removing the glittering boulder after being unlocked for the first time

#

despite the glittering boulder being completed a long time ago

tiny zealot
hard fern
vernal crest
#

And if you have the Lasting Conversation Topics mod, the answer can sometimes be "forever"

urban patrol
#

no, just these

#

unless one of these does and i wasn't aware

#

wrong one here

#

(not my save, someone else's that i've been trying to investigate for days now)

uncut viper
#

the length of a CT is saved to the farmer itself

#

so if they EVER had a mod activate that CT for super long, its like that forever

#

if they had Lasting Conversation Topics when they broke the boulder but uninstalled that mod a year ago the CT would still last however long Lasting Conversation Topics set it to

#

and ofc other mods can reactivate the CT whenever they want manually

urban patrol
#

i assume they never installed that, because they learned how to install mods last week XD but overall it was just a curious moment where i went "wait why is she saying that the first time you meet her"

undone narwhal
#

{{ModId}}_Faegate < in this, {{ModId}} refers to the unique id, correct?

uncut viper
undone narwhal
#

danke

mental wyvern
uncut viper
#

Content Patcher fills it in for you

mental wyvern
vernal crest
# mental wyvern and what to do with it like example what to change

You've tried to put the content of your dispos.json file inside your content.json, including the Changes field, but you can only have one Changes field per field. You also have to decide whether you want your Data/Characters patch to be in dispos.json or in the content.json, because right now you're telling Content Patcher to go get what's inside the dispos.json and then adding the same thing (the Data/Characters patch) directly to the content.json right below that.

#

So to fix this I'll start with a question: do you want your Silver Knight character data to be directly inside the content.json or do you want it to be in a separate file?

vernal crest
mental wyvern
#

OOHH

#

i fixed it

vernal crest
#

Be aware that the errors might have gone away, but that doesn't mean you definitely did fix it. Everything has to be in the right place for it to work, not just have no errors.

mental wyvern
#

oh

vernal crest
# mental wyvern notepad+++

Okay, you can install a plugin called JSON Tools and then use its "Pretty print" option to fix your indentation which will make it easier to read.

vernal crest
# mental wyvern oh

I'm not saying it isn't fixed - it might be! But you can't just randomly add and remove brackets and commas for it to be right. Things have to be at the right level for it to work in game (meaning they have to be inside the right number of brackets). You can share it again if you want help checking if it's all at the right level.

vernal crest
undone narwhal
#

When you add a dependency, but required is false, that's just like saying "You don't have to have the listed mod, but if you do, this mod here should be loaded after it"?

uncut viper
#

the mod written in the dependency will be listed before your mod

#

loaded* not listed

#

otherwise you're correct its optional and just defines the load order

lucid mulch
#

also if you specify a version in that optional dependency, and it is loaded but is a older version, your mod wont load at all

uncut viper
#

that i did not know and it seems weird to me that it works that way but good to know

undone narwhal
vernal crest
lean veldt
#

Hello can CP add new hats, pants and shirts without replacing the vanilla ones? Is there any references I can use for that? I don't want to use FS

tender bloom
#

Yes, it should be able to, but I don’t know offhand of many references. You might take a look at visit mt vapius as I believe it adds new hats.

#

In addition, the best resource is usually the unpacked game files

#

!unpack if you haven’t already

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!

tender bloom
#

Most of the time, you just need to use content patcher to add a new entry in the data file for each thing

brave fable
tender bloom
#

Ah, that’ll be better then, since VMV is a pretty big mod

#

Less to dig through if yours is just pants and shirt

#

Also wow pants 👀

brave fable
#

no other gameplay features or weird stuff like in desertbus

#

desertbus just adds a copy of Baggy Pants that uses pam's colour palette lol

lean veldt
#

Thank you very much both of you SDVpufferheart

brave fable
#

pants are pretty ridiculous but they're not hard, just repetitive. helps a lot if you use a program like photoshop where you can underlay the farmer base spritesheets alongside another set of pants as reference

latent mauve
brave fable
#

a lot of frames are duplicates, which saves some time, and for not-very-form-fitting pants you can duplicate a bunch more too if you're not fussed. but you do also need to make a tall male version and a short female version which have some frame differences other than overall height

mental wyvern
latent mauve
#

The nice thing about the JSON validator is that you can click the brackets to see where the open and closing pairs are

#

So if you have too many, they won't match up

vernal crest
#

The reason I sent you the link to the tutorial is because you're going to have lots more of this to do for making an NPC and the more you understand what is happening with the syntax, the easier it will be to make progress without continually having errors that slow you down.

latent mauve
#

In this case, I feel like the error was entirely from copy/pasting the dispos file in it's entirety rather than just the action block, but I agree that it's still good to get a grounding in how the lists and data models work 🙂

tired matrix
#

My mod got flagged suspicious files, i uploaded again but still… what do i do?

brave fable
#

wait patiently SDVpufferchickegg nexus staff will sort it out before long

vernal crest
vernal crest
haughty charm
#

@vale isle Please do not solicit for commissions. Advertising is against server rules. Thank you!

vale isle
#

Mybadddd, I apologize 😗

pulsar charm
#

does portraiture still work well in the current SDV version or is there a better alternative now? I keep seeing posts about it where they get errors

gentle rose
#

portraiture still works in the current sdv version, but if you’ve seen specific errors I’d be interested in seeing what they are

gentle rose
#

what kind of mod was it? c#?

tired matrix
#

Just normal custom npc

gentle rose
#

using content patcher?

vernal crest
#

Yep

gentle rose
#

weird, wonder what they “caught”

tired matrix
#

Probably an ini file i forgot to delete after i unsuccessfully made a c#

#

I cleaned the folder from unused files now

pulsar charm
#

Hi @dusk terrace, I just wanted to ask. I'm trying to make a dialogue display format that has a 75x100 portrait. But every time I boot up the game, I get this error:

[Content Patcher] Can't apply image patch "mono's Portraits > EditImage Portraits/Linus_Winter" to Portraits/Linus_Winter: target area (X:0, Y:0, Width:150, Height:384) extends past the right edge of the image (Width:128), which isn't allowed. Patches can only extend the tilesheet downwards.

I've edited the Linus_Winter.png of the mono's portraits to have 75x100 portraits but content patcher won't allow it.

finite ginkgo
#

You'll have to Load the image in rather than use EditImage since edit image doesn't allow for expanding horizontally

pulsar charm
pulsar charm
# finite ginkgo You'll have to `Load` the image in rather than use `EditImage` since edit image ...

I don't think I did it right. I got this error:

[Content Patcher] Error preloading content pack '(CP) (DDF) Advanced'. Technical details:
Newtonsoft.Json.JsonReaderException: Can't parse JSON file at D:\Program Files (x86)\Steam\steamapps\common\Stardew Valley\Mods[CP] [DFF] Advanced\content.json. This doesn't seem to be valid JSON.
Technical details: After parsing a value an unexpected character was encountered: {. Path 'Changes[0]', line 10, position 2.
at StardewModdingAPI.Toolkit.Serialization.JsonHelper.ReadJsonFileIfExists[TModel](String fullPath, TModel& result) in E:\source_Stardew\SMAPI\src\SMAPI.Toolkit\Serialization\JsonHelper.cs:line 86
at StardewModdingAPI.Framework.ContentPack.ReadJsonFile[TModel](String path) in E:\source_Stardew\SMAPI\src\SMAPI\Framework\ContentPack.cs:line 76
at ContentPatcher.Framework.RawContentPack.TryReloadContent(String& error) in E:\source_Stardew\Mods.Pathoschild\ContentPatcher\Framework\RawContentPack.cs:line 80
at ContentPatcher.ModEntry.GetContentPacks()+MoveNext() in E:\source_Stardew\Mods.Pathoschild\ContentPatcher\ModEntry.cs:line 453

This was how I wrote it:

    {
            "Action": "Load",
            "Target": "aedenthorn.DialogueDisplayFramework/dictionary",
            "TargetField": [ "default", "portrait" ],
            "Entries": { "h": 100, "w": 75 }
    }

I'm really new to modding so I'm sorry if I misunderstood

dusk terrace
#

!log

ocean sailBOT
#

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

Please share your SMAPI log file. To do so:

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

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

dusk terrace
#

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

pulsar charm
dusk terrace
#

which mod are you using? the framework or the furniture mod?
If you're making the mod, please upload the content file (see above)
if you're just using somebody else's mod without making your own then

#

!mh

ocean sailBOT
#

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

pulsar charm
#

I'm using the dialogue display mod

dusk terrace
#

that last part was directed towards someone else 😅

pulsar charm
#

i've been editing it to match how i want it to look

#

oh sorry!

ocean sailBOT
#

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

dusk terrace
#

!json pls upload the json here

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.

dusk terrace
#

it has a built-in validator

lean veldt
pulsar charm
dusk terrace
#

ah, yea looks like you forgot a comma on line 9

pulsar charm
#

OH

#

okay let me test

dusk terrace
pulsar charm
#

I tried it and the game ignored all my changes though

#

okay!

dusk terrace
#

which afaik you just need to change the action from Load to EditData

#

it might also need to be moved after your main patch, or to be set with lower priority... I forgot how exactly DDFC works in that regards

pulsar charm
#

I updated Content Patcher and it sort of works now but it's not showing me the portrait that I made

#

it's showing the default one

dusk terrace
#

Also, just noticed you could just merge both patches since you have the same target
(sorry, just woke up...)

In your main patch just add in the h/w fields and remove the smaller patch:

"portrait": {
  "xOffset": -248,
  "yOffset": 0,
  "right": true,
  "h": 100,
  "w": 75
},

You'll also need to add a patch to load your image file now.
It sounds like you had such a patch when you mentioned me earlier, but was using the EditImage action instead of Load (as mentioned by EnderTedi)

pulsar charm
late gull
#

Got into a flow state last night, i think pinball will be done sooner than expected 🙂

tired matrix
#

What to do when the unequip trinket command doesnt work?

brave fable
#

impressive SDVpufferthinkblob how are you thinking of handling ball runs and long surfaces? always had me wondering when i'd think about pinball games in a sprite game, not sure how i'd define surface vectors for bouncing and rolling along

#

especially curves. yuck

late gull
#

I kind of cheesed it a bit, curves are actually multiple short segments of circle which the ball resolves with damped restitution. For slopes, the ball just reflects velocity and restitution so gravity makes it "slide" but its actually repeated contacts

gentle rose
#

(could definitely just be me)

late gull
#

It is, tis one of the things I am working on today 😛

gentle rose
#

nice, looking forward to seeing it

#

is the hitbox square right now?

late gull
gentle rose
#

ah, a lizard

pulsar charm
dusk terrace
#

not sure what you mean... but your content.json should have 2 patches:

  1. Your edited image with the Load action
  2. The combined DDFC patch with the EditData action
autumn tide
#

hellooo is there a console command for setting daily luck value? I wanna set up something so that dialog is different on max luck days

#

there is this command but I'm not sure how i would use the luck value

vernal crest
#

That is not daily luck, it's player luck

autumn tide
vernal crest
#

No, like buffs you get from the lucky ring or eating luck foods

autumn tide
#

Oh, got it

#

that makes sense now

vernal crest
#

Actually, I don't know if that's even that or if that's just the unimplemented luck skill

autumn tide
#

cause buffs for other skills are a thing

vernal crest
#

Either way, not daily luck

#

I don't know of any console commands for daily luck, I just debug sleep a lot and then use debug summary full dds to view the daily luck value (dds being my fake mod id so no mod patches are actually shown)

vernal crest
#

I just tried seeing if debug dayupdate would affect daily luck but sadly it did not

autumn tide
#

ik it can be done cause CJB cheats had a max out luck every day thing

#

CJB*

vernal crest
#

Yeah but that doesn't necessarily mean there's a console command associated with it

autumn tide
#

oh

vernal crest
#

You could make one yourself by scraping the code from CJB and assigning it to a debug command though, I imagine

autumn tide
#

...I'll try to use CJB-

pulsar charm
#

@dusk terrace I finally figured it out! I just had to put my portraits in the same folder. So I guess if I publish this mod, the format and the portraits itself has to be combined?

Anyways, thank you for assisting me! I really appreciate all the help!

vernal crest
# autumn tide ...I'll try to use CJB-

Made you a very tiny mod that just adds a console command set_luck <value> (no debug in front). It lets you choose what value to set daily luck to using the same code that CJB uses. But CJB just sets it always to 0.115, while this allows you to choose. Use set_luck 0.115 to set it to the same value that CJB does for max luck or set_luck -0.115 for terrible daily luck, etc. Use Lookup Anything on your farmer to confirm it's worked.

vernal crest
#

No problem! I'm a real amateur with C# so let me know if anything funky happens.

tired matrix
#

Whynis my custom npc stuck at pierre’s on Wednesday when its not even in the coding

latent mauve
#

Have you slept since changing the code?

#

First stop of "why is my NPC pathfinding weird" is to try to sleep a day in game in case something changed

rigid musk
#

That or just "sdv path finding horrible"

dusk terrace
tired matrix
autumn tide
tired matrix
#

I was trying to fix all bugs quickly

autumn tide
latent mauve
#

Trying to fix them all quickly increases the risk of new mistakes, please breathe and get some rest if you need it!

#

Users will be users and they will still be there after you have gotten some sleep

hallow prism
#

yeah, can confirm the "must fix quick!" often ends in "now the entire mod isn't working because of a missing comma" or other similar things

narrow flint
#

Hi people that know things 🙂
I joined to ask this quick question - is it possible to make an building (specifically the farmhouse) animated via CP (animations) or AT? I havent managed to get it working so far but I've never seen a mod that does this so idk if I'm wasting my time..

brittle pasture
#

CP buildings can have animated draw layers

#

(see the mill)

tiny zealot
#

if you need an animation that vanilla buildings can't handle, my understanding is that CP-A is end-of-life and you should use spacecore to animate textures

tribal ore
#

Happy Sebtober! I just released v1.4 of Older Sebastian
https://www.nexusmods.com/stardewvalley/mods/31574

This update adds a new post-marriage event that allows Sebastian to finally stop smoking. I've also added several other post-14 heart events since the last time I posted here, so there's a bunch of new content to for your next Older Seb playthrough.

Nexus Mods :: Stardew Valley

Ever wished that Sebastian was a little more mature? Older Sebastian overhauls the vanilla character while leaving his core intact. Experience 25+ new events, hundreds of new lines of dialogue, custom

elder kite
#

Making good progress 😅
vanilla and 9 mods down, 17 to go

indigo yoke
#

how in C# would I go trying to find an asset path? So I can then use that path in content patcher

uncut viper
#

if its your mod you're the one defining what the asset path is

indigo yoke
uncut viper
#

well vanilla asset paths are the content folder
modded asset paths are arbitrary. if its your mod, you're defining it. that also means if its someone elses mod, theyre the ones defining it. you look at their source code

lucid iron
#

If you have a asset requested handler it triggers anytime someone loads an asset

uncut viper
#

the SMAPI log may also say if a mod edits an asset, but only if its requested, and if you dont know what to look for anyway, you may not recognize it

lucid iron
#

I feel like this is not what you want tho, can u describe the goal here

indigo yoke
#

that will send a message to the log with the asset path.

lucid iron
#

That sounds like you want list of allcontent patcher patches

#

If it's personal use I'd just fork n make cp print that

#

Patch summary is also essentially that

#

Things get complicated when ppl have unbounded tokens in the Target

raw compass
#

Is there any map property (incl added by an extra framework/extension mod) that can define a map as always nighttime, for the purposes of keeping nighttiles or other light sources on at all times?

raw compass
#

I scoured the documentation but clearly missed it 🫠 point me in the right direction please?

lucid iron
#

u just gotta put them all to like 0600

raw compass
#

mmap was my first thought, haha

lucid iron
#

should work Bolb

raw compass
#

nifty thank you!

lucid iron
#

otoh if its like

#

supposed to be always nighttime anyways

#

and it is ur map

#

just paint on the night tiles?

#

u need mushymato.MMAP_WoodsLighting if its outdoors but vanilla lets u set ambiant lighting for indoors

raw compass
#

Map editing isn't my goal; I want player-placed lamps to be always on.
(Full disclosure: It's really just me going crazy trying to decorate Sylvanlight with literally any light source prettier than torches)

lucid iron
#

cus it changes the time being checked for furniture lights

raw compass
#

Appreciate it SDVpufferheart

rigid musk
#

hello friends im wondering if someone can help me with a reoccurring error ive been having with my mod :)

apparently when people have one of the translations installed, it does this. However that specific index has 'true' (as it is a boolean.. i cant believe i actually know what that word means now) and the translation only touches the tokens I supplied

#

Json with the specific mentioned quest but it happens with the others too - also important to note this doesn't happen regularly

lucid iron
#

oh i saw this in english

#

didnt think about it tho and its been months

rigid musk
#

ive gotten so many comments from people about it

uncut viper
#

well you should probably send the translation if the issue is with a translation

lucid iron
#

with a string asset like this, you will have to try patch export

rigid musk
#

oh yeah i was going to do that sorry i got distracted

lucid iron
#

see if the actual in game string has right number of / delims

rigid musk
whole raptor
#

Why would the translation cause an error here? SDVpufferthink

rigid musk
#

That's what I'm wondering :L I have no clue why

lucid iron
#

it could if they added a / for some reason

rigid musk
#

I remember checking to see if they did that and afaik they did not

uncut viper
#

"Aos.QiMonsterSlayingQuest2.objeasy": "已斩杀大型史莱姆:0/30",
is this supposed to include the slash?

rigid musk
#

ill double check again

#

squintysus Now... I don't actually know

uncut viper
#

no, it isnt

#

your default i18n has "0 out of 30"

#

they translated that as 0/30

rigid musk
#

Huh I wonder how I missed that, I could have sworn I didn't see anything before

uncut viper
#

they did the same for the other 3 quests

rigid musk
#

I will bring this up with them thank you <3

uncut viper
#

that extra slash pushes every field after it back one index

rigid musk
#

Honestly even if I did notice it I probably didn't think it would affect it since it's within the token but it makes sense

whole raptor
uncut viper
#

as always one must remember that the game has no idea what a token is

#

and it never sees a token

whole raptor
#

First time seeing i18n translations causing errors tbh

lucid iron
#

@indigo yoke pinging over here to ask about the editimage thing DokkanStare

#

are you trying to expose a image target for void to edit?

indigo yoke
#

I use Birbcore for setting up my assets for a long time since it made setting everything up easier.

lucid iron
#

are you doing something along the lines of this

indigo yoke
#

Birb core says it alredy exposes the assets

#
    /// <summary>
    /// A single asset. This property is synced with what is in the content pipeline, and can be used directly.
    /// This asset can be overriden by other mods, and those changes will be reflected in this property.
    /// The path of the asset will be "Mods/&lt;ModUniqueID&gt;/&lt;Property&gt;", for instance the following property
    /// <code>
    ///    [Asset(Path="assets/my_texture.png")]
    ///    public static Texture2D MyTexture;
    ///    public static string MyTextureAssetName;
    /// </code>
    /// could be located at "Mods/drbirbdev.BirbCore/MyTexture" in the content pipeline. Other mods could then
    /// load this texture to use it, and this mod can just use the MyTexture property directly.
    /// An optional string property sharing the same name, but ending with "AssetName" can also be included.
    /// This property will be set to the "Mods/&lt;ModUniqueID&gt;/&lt;Property&gt;" value, which is required for some methods.
    /// </summary>
lucid iron
#
public static void OnAssetRequested(AssetRequestedEventArgs e)
{
    if (e.Name.IsEquivalentTo(TrinketColorizerTexture))
    {
        e.LoadFromModFile<Texture2D>(TrinketColorizerTextureFile, AssetLoadPriority.Exclusive);
    }
}
#

wow the accursed automagics

indigo yoke
#

Nay, something like this

namespace WizardryManaBar.Core
{
    [SAsset(Priority = 0)]
    public class Assets
    {
        [SAsset.Asset("assets/manabg.png")]
        public Texture2D ManaBG { get; set; }
    }
}
lucid iron
#

well birbcore does indeed do what i mean

#

just automagically for you

#

im not really sure if using GetInternalAssetName like this then passing it to content pipeline is legal NotteThink

#

internal asset is for internal usage as name suggests blobcatgooglyblep

uncut viper
#

SMAPI disallows applying edits to internal asset paths

#

so probably not

lucid iron
#

moonslime do you have a log with ur mod handy Bolb

ocean sailBOT
#

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

lucid iron
#

did u successfully load texture in this one?

indigo yoke
#

ignore the one error, that was me testing around poking stuff

#

nay

#

well

lucid iron
#

yea i was hoping to see what the internal name ended up being

indigo yoke
#

the texture itself loads

#

the content pack texture doesnt

lucid iron
#

did this log load into save NotteThink

lucid iron
indigo yoke
ocean sailBOT
#

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

indigo yoke
#

here is one that loads into a save

lucid iron
#

the 2 variables in this sample are just const string like this

    public const string TrinketColorizerTextureFile = "assets/trinketcolorizer.png";
    public const string TrinketColorizerTexture = $"Mods/{ModEntry.ModId}/TrinketColorizer";
ocean sailBOT
#

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

lucid iron
#

heres what im filtering for btw

whole raptor
indigo yoke
lucid iron
#

i have specific dislike for personcore when the person is not me PecoSmile

#

and (opinion) this kinda automagic should just be shared project stuff

uncut viper
#

i dont trust other people with critical automagic

#

if my mod breaks i want it to be all my fault

lucid iron
#

anyhow besides changing away from the automagic to doing the asset requested urself

uncut viper
#

(not that its "broken" here but i mean in general)

lucid iron
#

just putting it in CP side will be basically the same

#

up to u what do Bolb

brittle pasture
#

(tbh it does look pretty neat but it's barely fewer lines than doing it manually + dependency on another person's mod just for that)
(heck you can just replicate that in your own mod)

whole raptor
#

It's easier to say "Welp, it broke cause of sdv update, wait 2 years", than "Oh, requirement/framework updated, I have no clue what's wrong" SDVkrobusgiggle

lucid iron
indigo yoke
uncut viper
#

its exactly the same as calling one you put in your own asset requested event

lucid iron
#

no examples off hand cus i always pick doing it in C#

uncut viper
#

what you put in the Target in the CP Load action is what you load with your content helper

lucid iron
#

in terms of actual usage it is just Game1.content.Load<Texture2D>(whateveryouwrote)

uncut viper
#

or the games content helper or whatever

whole raptor
#

Btw Slime, would you consider maybe adding the event unlocking the skill to be in the content pipeline too? (if it's not already)

indigo yoke
patent lanceBOT
whole raptor
#

It always felt too... "robotic" to me? As in it basically breaks the 4th wall, thought I might mayyyybe give it a makeover sometime hah

#

Or if you'd like to change it yourself I can send some suggestions

indigo yoke
#

xD I mean it was/is a really old event. It does need updating. Like the dialogue boxes about the controls should be changed into square boxes.

lucid iron
#

though if it is always there then it prob doesn't matter much

#

textures are also special case invalidation wise bc smapi doesnt give u a new Texture2D ever, just copies pixels over

whole raptor
#

This part is hilarious tho SDVpuffersquee

indigo yoke
whole raptor
#

Oh, also.. SDVpufferthinkblob

lucid iron
#

u can change iconic framework to move icons more up

#

there be config

indigo yoke
#

or lower it

whole raptor
#

Oh, nice

ornate locust
#

pulls it out of his robe

indigo yoke
#

okay yeah, went to check Binning skill with this (just to see if I personally was doing something wrong)

        {
            "LogName": "Texture swap test",
            "Action": "EditImage",
            "Target": "Mods/drbirbdev.BinningSkill/SkillTexture",
            "FromFile": "Assets/skill_texture.png"
        },

Since that's what it says to use on their mod page

Patchable Content
Mods/drbirbdev.BinningSkill/SkillTexture - Contains skill UI textures. See here for sprite layout.
Mods/drbirbdev.BinningSkill/GarbageHats - Contains hat textures.
Mods/drbirbdev.BinningSkill/Items - Contains BigCraftable and Recipe textures.
Mods/drbirbdev.BinningSkill/TrashCanTilesheet - Contains texture for tilesheet including trashcans.
Mods/drbirbdev.BinningSkill/AnimationCopper - Contains texture for animating trash can searches. There are also Iron, Gold, etc variants.

No work. sadness.

lucid iron
#

im guessing the trick of using internal asset name like this used to be ok, and is no longer ok after some smapi update

indigo yoke
lucid iron
#

though from smapi pov it was fixing unintended behavior rather than changing api Dokkan

uncut viper
#

this code has been here for at least 7 years

calm nebula
#

Also the internal asset name is SMAPI/smth

uncut viper
#

it is SMAPI followed by the unique ID followed by the file path

#

with slashes separating