#making-mods-general

1 messages · Page 20 of 1

uncut viper
#

items have a CanBeGivenAsGift field

teal bridge
#

Given the game's mechanics, that does make sense; friendship decays, NPCs forget about your gifts. Does the game have a system for marking dialogue as "heard", e.g. to add it back to pending at the end of the day if not "heard", or does that involve a whole bunch of extra complexities around event keys and so on?

velvet narwhal
#

(....i have to do an append to gift tastes for all of my mushroom themed items because wHy are you giving a poisonous mushroom to someone)

lucid iron
#

demetrius would enjoy it

velvet narwhal
#

yeah a few people would be fascinated, but most will be like "whAT"

#

there's that one logic somewhere that clears eventMemory iirc

#

though i don't think that's really reasonable since it's a gift SDVpufferthink ? or maybe the same logic for the dialogue when you sell to pierre's would be better?

uncut viper
#

i suppose you could make your own list to track seen dialogue keys, though that seems like a rather ancillary feature for a mod like this

teal bridge
#

Oh yeah, mail flags. Well, I like this idea though I think I'll get a V1 out first to see what the reactions are.

#

If the basic mechanics seem solid then I can add little immersion tweaks like that.

#

(It's almost there, I think. Just have to do the day-end/day-start logic to receiveGift or return it back... and test it... and add a console command to test so I don't have to keep restarting... and probably a few other things)

uncut viper
#

there is an Action Dialogue.onFinish that you could set in the dialogue that you append to the NPC yourself

#

so you could mark an NPC who received a gift as "pendingResponse = true" or something and have that Action set that to false, so you know it was read

#

if they dont talk to the NPC and see the dialogue, that Action never fires, so the NPC will still be pending and you can set the dialogue again on the next day start

#

(or yknow, probably better to just add the NPC to a list and remove them from the list with an action, rather than iterating over every NPC to check if they have a response pending, but i was just trying to get the core concept wreitten)

teal bridge
#

No worries, it was clear enough. I've never dealt with dialogue at all though so there'd be some reading involved.

uncut viper
#

creating a Dialogue is super easy, just need an NPC, a string, or a translation key (Strings/StringsFromCSFiles:blabla etc) and then NPC's have a setNewDialogue command that will take that dialogue and add it to their daily dialogue

#

either by overwrite or by putting it in front of their usual daily dialogue

plucky reef
#

So if there's that item flag for giftability, what's the spacecore function do differently?

uncut viper
#

i dont know what spacecore function you mean

#

i didnt know it had one for giftability

teal bridge
#

So setNewDialogue = "Daily dialogue"? That's useful.

uncut viper
#

sorry, not command, a function. so like NPC.setNewDialogue(Dialogue, bool, bool)

velvet narwhal
#

Oh the giftable disallow?

uncut viper
#

one of those bools is the overwrite thing and i f orget the other one, i dont have ilspy open atm

teal bridge
#

Right, I can see it. The second is add, third is clearOnMovement (no idea).

uncut viper
#

oh thats for schedules probably

velvet narwhal
#

GiftableToNpcDisallowList - A dictionary of NPC names to messages that should show when you try to gift the item to them, instead of them receiving the gift.

uncut viper
#

if they move to another location that dialogue should get removed probably

#

if thats set to true

teal bridge
#

The other question would be how to trigger a mail flag or other thing when the dialogue is spoken.

plucky reef
#

Oh, so you can be very specific with spacecore vs a boolean with core.

uncut viper
#

you can set the onFinish field on the Dialogue instance itself

teal bridge
#

And the other other question would be how to combine custom "received by mail" dialog with the vanilla gift responses.

uncut viper
#

or you can use trigger action actions as a dialogue command

#

the latter goes in the dialogue string itself though and relies on whoever writes that dialogue to remember to include it

#

NPCs also have a TryGetDialogue function that will return a dialogue instance if you give them a dialogue key like RejectItem_ whatever

#

so i was thinking you could check for a custom key you define, like gotGiftInMail and if they have dialogue for that, load it as the dialogue to add

#

if they dont, then, idk. either they dont respond to the mail or they use a fallback (like maybe the usual gift response)

#

TryGetDialogue returns the dialogue and doesnt add it to their daily dialogue so you can add the onFinish stuff first

teal bridge
#

Is this last train of logic all related to trigger actions? I don't use those either (thought they were just a CP thing).

#

Of course I know about TryGetDialogue since I'm using it for the gift-disabling for rejected gifts from earlier.

uncut viper
#

the onFinish thing is a System.Action action

#

not a trigger action action

#

so a delegate or something i presume

#

its a field on the Dialogue instance itself and not within the dialogue string

teal bridge
#

I get it, just didn't follow where the whole thing about custom dialogue keys or gotGiftInMail came in.

uncut viper
#

i was just saying that so you could have custom responses for getting a gift in the mail specifically

#

if you wanted

teal bridge
#

That would be covered by setNewDialogue, no?

uncut viper
#

but how would you know what dialogue to load to add to setNewDialogue?

teal bridge
#

What I meant was that the custom responses would probably have to be a hybrid of the NPC's vanilla response and the mail stuff.

#

I don't really want to write custom got-by-mail dialogue for every vanilla NPC, and every modded NPC, haha

uncut viper
#

thats why i was suggesting the custom dialogue key. if they dont have that, then you can load whatever dialogue you already had in mind

teal bridge
#

So it'd be some generic personality-based template like "Hey, I got the {X} you sent: {vanilla response}"

uncut viper
#

but trying to load the custom dialogue key first would let people who did wanna write got-by-mail dialogue do so

teal bridge
#

Why a custom key, though? Why does it need a key at all?

#

Oh, you're picturing some future world where a half-dozen other modders want to write custom NPC responses for this action.

uncut viper
#

or responses for the vanilla NPCs, if they want
but i do know id use this for my NPC if it existed

#

its one extra dialogue string in their already long list of dialogue, it aint much to add for a neat feature

#

(for the npc maker i mean)

teal bridge
#

I'm not anticipating that myself, but we will see. I'm always open to adding APIs and other moddability stuff if people ask for it, but trying to anticipate everything that they might want to do can burn up a lot of time.

uncut viper
#

itd just be a single extra if statement to support it, though

teal bridge
#

Perhaps. Or perhaps not. What if they want it conditional? Different for specific items, or for universals? Random responses depending only on gift taste? Hard to predict what precise combination any given NPC or other mod author would want.

#

That's why I'd rather wait 'til someone asks. Then I can interrogate what they really want to do.

#

Having code anywhere (including in a mod) that is not exercised/tested is a net negative for maintenance.

uncut viper
#

dont you already have to check for different responses based on gift taste anyway?

#

or specific items?

#

to get the vanilla response dialogue

teal bridge
#

The game does; I don't.

uncut viper
#

oh, i see, i forgot you could just call GetGiftReaction

#

okay, i concede it is more work than i expected

#

i guess you could check the Dialogue.temporaryDialogueKey or Dialogue.TranslationKey and then just append "_Mail" to it, and check if that exists? and if it doesnt, just dont do anything, since the original dialogue the game got is still there

teal bridge
#

Don't take my reluctance the wrong way, my philosophy is tempered by far too many years (I won't say how many) of learning and reinforcing the lessons that "nothing is ever as easy as it seems" and "every temporary feature/workaround is actually permanent". I will definitely get to that if people want it; if it really is a simple change, then it is after all only 5-10 minutes of work to make that change and push a new version of the mod.

uncut viper
#

thatd let someone add mail specific dialogue to any of the already existing universla, specific, taste-dependent etc dialogue keys

#

nah, im not taking it the wrong way, you were correct that it was not as easy as i initially thought it was

polar ferry
#

Sorry lol looking up "permissions" put me here

velvet narwhal
#

i am in... scary unknown territory

#
    "Operation": "Append",
    "Target": [ "Fields", "Demetrius", "2" ],
    "Value": "{{ModId}}_VeiledLady {{ModId}}_VeiledLadyGleba {{ModId}}_Chora {{ModId}}_ChoraMilk {{ModId}}_PanellusStypic {{ModId}}_TomYueaPhai",
    "Delimiter": " "
}```
if i'm gonna append these to his "liked" category, i know that that's the value at index 2, but how would i go about it ![SDVpufferpain](https://cdn.discordapp.com/emojis/850863588624171079.webp?size=128 "SDVpufferpain")
(*squints to self, i think i did it, i guess i'll have to test after labor day dinner with family*)
hallow prism
#

no

#

it'll be 3, but almost here

#

                {
                    "Operation": "Append",
                    "Target": [
                        "Fields",
                        "Abigail",
                        1
                    ],
                    "Value": "Lumisteria.MtVapius_Amethyst_Polished Lumisteria.MtVapius_CrystalRose Lumisteria.MtVapius_Cooking_JamPie",
                    "Delimiter": " "
                },```
#

here its 1 (loved), so you'll as "why 3?", well it's because it's an alternate of the string ("i love this!!" and the numbers)

#

so 2 would be "i like this.")

velvet narwhal
#

many thanks SDVpuffersob i am too lazy to add regular dialogue right now so i'm just gonna throw it into the liked generics

hallow prism
#

if you wanted to add regular dialogues to a vanilla npc you would do it by gift taste reaction unless you wanted to overwrite the generic liked dialogue

velvet narwhal
#

i was gonna read more into attempting dialogue based on age, but if that's unfeasible i'll just get away with being lazy (why are you giving strange mushrooms to anyone except demetrius and linus?)

#

oh i forgot the wizard too

hallow prism
#

you need to add the dialogue line to the character dialogue so you can't target everyone included modded, but you can have lines for each npc you want if you add them

velvet narwhal
#

nyeh too much work

hallow prism
#
        {
            "LogName": "Caroline Dialogue Gift Taste",
            "Action": "EditData",
            "Target": "Characters/Dialogue/Caroline",
            "Entries": {
                "AcceptGift_(O){{ModID}}_ButterflyLavender": "{{i18n: SereneMeadowCarolineDialogueAcceptGift_(O){{ModID}}_ButterflyLavender{{Random:R01, R02}}}}",
            },
        },```

here for ex. Possibly you can have that being targetting several npcs at once
lone ice
#

Hi all! Anybody know how to create custom conditions for swapping sprites/portraits? Like if I want a different indoor/outdoor sprite?

velvet narwhal
#

appearance system does that pretty solidly

lone ice
#

What is that?

#

a mod?

lone ice
#

I tried this:

 {
   "Action": "Load",
   "Target": "Portraits/Sebastian",
   "FromFile": "assets/Portraits/Boy.png",
   "When": {
     "Season": "Summer",
     "Weather": "Sun",
     "IsOutdoors": "True"
   },
   "Priority": "High",
   "Update": "OnLocationChange"
 },

 {
   "Action": "Load",
   "Target": "Portraits/Sebastian",
   "FromFile": "assets/Portraits/Boy_nohat.png",
   "Priority": "Low",
   "Update": "OnLocationChange"
 },

velvet narwhal
#

it circumvents the need for 'onlocationchange'

latent mauve
#

In Data/Characters, you can set the Appearance field to change following conditions.

lone ice
#

that's awesome

#

thank you both

latent mauve
#

Here's the vanilla example for Abigail's winter clothing, if you navigate to Data/Characters and Abigail for the entry:

      {
        "Id": "Winter",
        "Condition": null,
        "Season": "Winter",
        "Indoors": true,
        "Outdoors": true,
        "Portrait": "Portraits/Abigail_Winter",
        "Sprite": "Characters/Abigail_Winter",
        "IsIslandAttire": false,
        "Precedence": -100,
        "Weight": 0
      }```
nova gale
#

ok, schedules in my custom location work fine, but location based dialog doesn't seem to work at all in the custom space, to be clear, when the wiki says <location><x><y> it's talking about the tile x/y right? (like i'd find in tiled)

#

like this:

"mytigio.DarkestDepthsAssets.Location.BaseCamp_19_38": "{{i18n: NPC.Jakan.Dialogue.PleaseShop}}",
"mytigio.DarkestDepthsAssets.Location.BaseCamp_27_6": "{{i18n: NPC.Jakan.Dialogue.DwarfKing}}",
"mytigio.DarkestDepthsAssets.Location.BaseCamp_5_44": "{{i18n: NPC.Jakan.Dialogue.Fishing}}",
"Mon": "{{i18n: NPC.Jakan.Dialogue.Mon}}",
paper sundial
#

Somebody in my mod comments has found an error in the wiki I think. The wiki page for pig states they can dig up truffles, whereas reading the code, makes it seem this is not the case (for reference: Pig uses Utility.spawnObjectAround which in turn uses Item.CanItemBePlacedHere the parameters here check collisionmask.all and thus doesn't support spawning on flooring)

brittle pasture
#

hmm what's the error?

paper sundial
#

This line, on the Pig wiki page under Produce -> location

calm nebula
#

But they also pass ignore passable

paper sundial
#

SDVpufferthinkblob Then why doesn't it work?

calm nebula
#

It's actually an earlier part of the code actually

paper sundial
#

Oh, so it happens even before it hits DigUpProduce, interesting. Doesn't this still mean that they can't dig up truffles on flooring though?

calm nebula
#

Possibly

#

This piffle is too sleepy to bother to understand code

paper sundial
#

I feel that (< Should be going to bed by now too, but got invested)

#

I'll just keep a link to the messages and look at it tomorrow

calm nebula
#

I walked 15.5 km today

#

So

#

sleeps

paper sundial
calm nebula
#

Past atra seemed to think that code was worth yeeting though

#

I trust past atra

#

Current atra should go make coffee

paper sundial
#

Thanks for help current atra SDVpufferheart feel better

latent mauve
nova gale
#

yeah, it used to be mytigio.DarkestDepthsAssets_Location_BaseCamp but i thought the underscores in the name might be confusing the dialog logic so i changed it

#

going to try just the location without a specific tile as a troubleshooting step

#

hrmm, that doesn't seem to work either

#

I suppose I do use the {{ModId}} syntax in the location key, I'll try hand entering the whole thing to validate

#

alas

vernal crest
# nova gale alas

Is your map name identical to the location name? If not, have you tried using the map name instead of the location name?

pine ermine
gilded comet
#

oooh

nova gale
#

I'll give it a shot

gilded comet
pine ermine
#

That'd be nice

#

thx

gilded comet
teal bridge
#

Anyone know if SMAPI defaults to explicitly having a 120-character console width, or if just uses whatever the OS default is?

brittle pasture
#

there's a limit?
anyway you can specify the console program SMAPI uses

#

it defaults to xterm on Linux, which isn't the most good looking

#

I set it to kitty

teal bridge
#

Not a "limit" of course, lines simply wrap when they're longer, but the default width.

pine ermine
#

You might be able to add it as an argument?

teal bridge
#

Essentially "if I draw a table in the console and try to use more than 80 chars, is it going to look like monkey butt on many people's machines"

#

It's 120 chars on my computer but I don't know why.

thin hamlet
#

JSON’T?!?!?!

#

-.o-.

lucid mulch
#

smapi doesn't default to anything afaik, its just a standard terminal

vernal crest
# nova gale no joy

Drat. If you want to share your json for your dialogue and your data/locations we can have a look in case of typos that you're missing or something?

round dock
#

(can i have my json file checked for typos SBVSob my eyes are so unreliable and i keep forgetting to add a #)

nova gale
#

sure, let me put the dialog back to the location real quick

teal bridge
#

What is gift taste 7? It seems to add a full heart but it's not described anywhere that I can find.

uncut viper
#

might be stardrop tea

velvet narwhal
#

Artisan category 7?

lone ice
#

Hi I'm hoping someone can help me: how do you modify Data/ChairTiles?

#

I want to make a custom tile sittable

teal bridge
#

Hm, Stardrop tea is consistent with the friendship points, yes.

uncut viper
#

(it is indeed stardrop tea and hardcoded)

teal bridge
#

Interesting that in this one instance they decided not to actually hardcode the item ID... heh

uncut viper
#

afaik the only thing that uses it ever

#

wdym? they hardcoded to check for the item ID to decide if the gift taste is 7 or not

teal bridge
#

I mean, it's not hardcoded in receiveGift - which it could have been.

#

There's actually a special taste defined for it.

uncut viper
#

ahh

teal bridge
#

I have no idea how to name that so I'm just going to call it "special"

uncut viper
#

that is also exactly what i did for my GiftGiven trigger

velvet narwhal
lucid mulch
#

there is hardcoded behavior in NPC.tryToReceiveActiveObject for stardrop tea though (which calls recieveGift) as stardrop tea ignores gift limits in addition to its 'special' gift tier

#

and its hardcoded in getGiftTasteForThisItem to give stardrop tea tier7, as NPCGiftTastes does not have a way to make items that tier (in either universal or npc specific setting) and was never uplifted to become objects and stays in its annoying slash seperated form

#

In general 1.6 native content only nicely used data models, and left the older slash seperated forms alone for modding compatibility

mossy belfry
#

can someone help me out with altering an existing location's map? i used tiled to create an expansion for the secret forest, and cant seem to figure out how to get it working. its been a couple days since i looked at it and i do need to check over the wiki again, just asking in advance cause i know ill still be confused haha

teal bridge
lucid mulch
#

its less hardcoded than 1.5.6 at least

#

many of the dialog flags were originally just hardcoded behavior for a specific item that got moved to conditionally on dialogue instead so modded items can have the same behaviour

teal bridge
#

For sure, modding seemed a lot harder in the pre-1.6 days.

#

Even today there are still XNB mods going out...

teal bridge
#

Well, I think the estimations are correct. Only thing left to do now is run receiveGift and pray that it doesn't all blow up.

teal bridge
#

Gift mailing mod. Been talking about it on and off since yesterday (so to avoid spamming people, I'm omitting details; can scroll up if you want 'em).

dull river
#

Cool

#

Thanks for updating your subs ^^

teal bridge
#

Subs? Me? What did I update?

dull river
#

Cool mod though

#

You should add a mailer NPC

teal bridge
#

Not touching NPCs with a ten-foot pole right now. By far the most laborious task in Stardew modding.

#

So, for those folks who do mail stuff, my brain is tired; is there some way to add a specific message with a specific item to the player's mailbox, or do I have to essentially register a temporary item in the global mail data and then add the mail "key"?

brittle pasture
#

I think the LetterViewerMenu constructor allows you to pass any text and title missed the part where you want it in the mailbox, sorry. ignore this

tiny zealot
#

as far as i know, mail is only stored on the player's Farmer object as three NetStringHashSets containing the IDs of mail entries in Data/mail, so to send new mail you need to add it to that asset

#

if the goal is to have it appear in the mailbox

teal bridge
#

So I'd have to override the asset loader and do some weird dynamic key system, since the mail doesn't actually exist (and can't be known) before the sendback actually happens.

#

LetterViewerMenu is actually interesting, I wonder if I can patch the mailbox to do a custom LetterViewerMenu for a mail key that is not actually in the mail data. But... I also wonder if that's easier than just fiddling with the data.

#

It seems like one consequence of having to define a mail is that any item won't have a quality associated. So if the player sends an Iridium X, and it gets sent back, it will be a Base X in the mail.

brittle pasture
#

yeah that still needs Mail Framework mod

teal bridge
#

Why MFM? Lets you specify quality?

brittle pasture
#

yes

teal bridge
#

I don't want to depend on MFM, but maybe I write my own patch and disable it if MFM is installed. Have to see what it does.

tiny zealot
#

patching the mailbox is probably a reasonable approach if you are defining dynamic, temporary mail. it's really set up for predefined ones, as i'm sure is becoming apparent

brittle pasture
#

I think stack and size quality attachment is the only feature MFM still has over vanilla mail? that and a saner content pack format

tiny zealot
#

you can send stacks in at least some vanilla mail, but MFM may have more features about it (i do not know)

lucid iron
#

Can you do custom mail bg in vanilla?

tiny zealot
#

yes

teal bridge
#

I can't find where MFM does this. I see that it has an explicit Items for a Letter, but... it doesn't seem to use that.

brittle pasture
#

oh yeah there are stack in vanilla lol, guess that leaves quality

uncut viper
#

you can technically do both stack size and quality in mail but it wont be shown as an attachment

#

mail strings have an %action command to run trigger action actions and there is an AddItem action

teal bridge
#

Oh, I see it, there's a ShowLetter that's Harmony-patched.

uncut viper
#

you could also technically do multiple %item commands for stack size and theyd just show as separate items you grab one by one, which would be weird but it works

#

actually apparently the %item command also just accepts a [count] parameter anyway

teal bridge
#

I can probably do this. Funny how I said earlier today "It's always more difficult than you expect" , and here's another case. But I'm already transpiling mailbox() so this is just adding a bit. And it seems like MFM just opens the menu and then fiddles with what's inside the menu.

uncut viper
#

kinda strange that it didnt get a quality one added to it

teal bridge
#

Looks like LetterViewerMenu.itemsToGrab is the key. So:

  • Add a real letter without an item, whose key includes some unique ID (patch the asset loader to provide dynamic text for it)
  • Let it run the Game1.activeClickableMenu = new LetterViewMenu(...) in mailbox()
  • Insert a line after that adds the real object to itemsToGrab

Hopefully that does what I think it will.

#

Oh wait, I can't do a true dynamic asset loader, can I? I can only modify the entire dictionary. Can I tell the game to invalidate the mail asset and force the asset loader to run again?

#

Never mind, I shouldn't ask questions that take 30 seconds to look up. Can see there's an invalidation API.

dull river
#

Didn't know there was a difficulty involving NPCs.

#

Why is that?

teal bridge
#

Not difficult, laborious. Just a lot of very tedious things to do.

#

None of them are hard (afaik), it's just a long time-consuming list.

#

But then you should probably ask the ones here who actually make NPCs, like ichor. I'm just relaying secondhand info.

brittle pasture
#

(so there's no dict to modify)

dull river
#

Will definitely try making one. Sounds fun.

vernal crest
#

Yes NPCs are very labour-intensive and also slow. Especially if you are me.

teal bridge
#

Mail data isn't cached? Weird. It's loaded as a Dictionary<string, string> though. What I meant by "not dynamic" is that I can't make it so "when you get this mail key, generate the mail text on the fly". Instead I can only "add known mail string with known key". But cache invalidation should cover it.

#

It looks to me like DataLoader.Mail is cached like everything else in DataLoader but I could be missing something.

brittle pasture
#

it is cached, but not in a variable, so you have to postfix the Mail function which isn't as pretty

#

compare to say Game1.farmAnimalData

next plaza
#

Postfixing would catch people who load it directly

#

It’s better to use an asset editor

teal bridge
#

I don't think postfix is necessary, just have to add an asset loader that adds a special key.

next plaza
#

Wouldn’t *

teal bridge
#

(and by asset loader, I do in fact mean asset editor, would never replace the entire dictionary like some people do)

lucid iron
#

Not related to current mail talk, but some expansions add NPC who are only in town for certain days of the week, do you care to do anything for that Bolb

#

I can't really think of easy way to check besides magical knowledge of what the name of their hidden warp room is

teal bridge
#

The question is for me? As in, do I care to do anything about it with this particular mod (such as...?) Or is there some problem to hypothetically be fixed with a new/different mod?

lucid iron
#

Yeah question for your mail gift mod

teal bridge
#

Why would their schedule matter?

lucid iron
#

You normally can't talk or gift to them on off days, but since it is send mail ignoring that restriction seems fine

tiny zealot
teal bridge
tiny zealot
# dull river Will definitely try making one. Sounds fun.

it is fun! but for context, i am a programmer and it took me five months of my spare time to make my NPC (going from "i'm going to make this NPC" to "the mod is published and available for download"). and i've also been releasing updates for the year (!) since her debut

teal bridge
#

We advise new modders to start small.

#

(not that I did. do as we say, not as we do.)

latent mauve
#

Literally the only reason I am even considering my Zelda NPC mod is because most of the NPCs are just being reskinned from the vanilla ones and some lines of dialogue changed

lucid iron
#

oh is that going to convert vanilla characters to zelda characters?

#

i previously thought it was going to be "add princess zelda" type of crossover npc mod

latent mauve
#

yep

#

Gonna replace all the vanilla characters with Zelda characters (52 at last count, and I'm moving along on the portraits at least)

#

And there might be 2-3 that are new custom NPCs

#

The art is my only slow-down right now, honestly, I wrote most of the code ages ago and the last coding to tackle will be custom events/modifications for 1.6

teal bridge
#

There is the "simple non-villager NPC" flag/system which is easier to work with. Or so I assume, since I keep running into it.

latent mauve
#

Non-social villagers are MUCH easier, to be sure

#

My romance replacements are going to be a pain because of the heart events

teal bridge
#

Aren't there a lot fewer than 52 vanilla characters?

plucky reef
#

34 I think? Not counting the non giftable ones.

tiny zealot
#

(made worse, as many things in my NPC mod are, by C#ing my way around roadblocks)

plucky reef
#

Does the event replay mod with a patch reload work to do fast replays?

next plaza
tiny zealot
#

i usually use debug runtestevent (debug rte), which avoids needing to reload at all, but requires you to convert your finished script since it doesn't use quite the same format as the actual event data

#

fortunately, text editors are good at mechanical conversions like that

latent mauve
#

There's a roadmap document I'm using to track the number remaining xD

teal bridge
#

This sounds like a 6+ month project, which I suppose is what you meant by having written the code "ages ago".

next plaza
#

Technically with my yarn script thing it doesn’t cache the event, so if you only edit the yarn part you can edit save and rerun

latent mauve
#

Yeah, I started the code before the 1.6 update, so there's more stuff I have to go back and edit but the bulk of the dialogue was already finished

#

Let's see, I have listed here: 12 romance, 22 social, 15 nonsocial or major event only, and anywhere from 2-5 custom NPCs

#

And I did take a few out, so my original number was higher

#

34+15 is already at 49, so the planned custom ones that don't fit as replacements took it to 52.

#

art progress check:

plucky reef
#

Whew that is a lot.

latent mauve
#

I've got the neutral portraits done for 2 more of the romance options, just don't have their expressions yet, so I've definitely made some progress!

#

Sprites will be easier, my struggle is on the portraits

velvet narwhal
latent mauve
#

I think I knocked out all 18 of those sprites in a single month, whereas I'm lucky if I get 4 portraits done in a month

teal bridge
#

Makes sense, 4x the rez and more stylized.

latent mauve
#

mhm, they need to be a lot more faithful to the source material for recognition

teal bridge
#

There do seem to be some very prolific portrait artists in the commissions, but I guess that's the part you really want to do yourself.

latent mauve
#

There's also the fact that commissions cost money and I'm not exactly sitting on any disposable income

#

and I CAN do them myself, so, drawing it myself it is

vernal crest
#

Just doing patch reload and then debug ebi is fast enough for replaying an event for me. The tedium comes from having to make a tiny tweak and then watch it again, then again, then again. Even though I comment out most of the event when I'm tweaking it's still so boring.

latent mauve
#

Aba, I feel like I'd just find new ways to make the dialogue flow better in the process of fixing the technical things, so I'd find a way to not get bogged down in boredom with the events.

#

So I guess it depends on how polished your event is when you start testing

teal bridge
#

Now I have to sort out the bizarre mail string syntax... ssssiiiighhh

vernal crest
teal bridge
#

So much yak-shaving in this one

velvet narwhal
#

tbh i get to a certain "stopping point" in my events, where i'm like, "is this playing the way i want it to?" i can't physically write the whole thing or else i'mma self destruct

vernal crest
#

Not without risk of paralysing myself with self-critical perfection-seeking, anyway.

tiny zealot
velvet narwhal
#

do you get the, "this could be a textabovehead command" itch?

tiny zealot
#

i like to think of it as the actors ad-libbing a little bit and getting the director to allow little differences to creep into the script SDVpuffersquee

vernal crest
#

Bear in mind I also don't like events much as a player so I'm not seeking to create masterpieces. Most of my tweaking is actually about how to make the event move faster lol

teal bridge
#

Interesting... I'm not a fan of events either, but I thought you said that interacting with NPCs was your favorite part of the game.

vernal crest
#

It is! But not via events unless they are quick lol

orchid acorn
#

Does anyone have any experience with farm (not farmhouse) events? When I debug ebi the event plays without bugs but I can't get it to naturally trigger.

I originally had the reqs only as: 40180020/e 40180019 but that didn't work, so tried copying vanillas and made added time like most of them have 40180020/e 40180019/t 600 1130 but it still just... Won't trigger naturally. Might anyone have some wisdom?

old edge
#

how may I trigger a cutscene/event in C#?

velvet narwhal
boreal spear
#

Has anybody made a mod where you have to eat

plucky reef
boreal spear
#

Any that aren't outdated

plucky reef
#

Survivalist should be current.

boreal spear
#

Ooh there's new Timmys menu item

#

Nutella

velvet narwhal
#

SDVpufferthink i removed the when condition and the preexisting because i don't have access to it, and it triggered just fine, i assume you're trying to debug on new days?
(when you do debug ebi, it does mark the event as 'seen', so you'd have to return to title to get it to trigger properly)

tiny zealot
orchid acorn
#

so then I finally debugged ebi'ed it directly to see if it worked at all

velvet narwhal
#

i assume the when command isn't something going wrong with it since that is the correct syntax

#

though, i generally do O <NPC> if it's marriage required in the <event ID> code bit

orchid acorn
#

Yeah! and all my other marriage events run with no problems. As you can see they all work by only being viewable by preceding each other. Normally when I debug ebi one, I can trigger the next event whether I've seen it a million times or not since the req is viewing the other one before

#

So I'm surprised I can't trigger it by just doing my usual "view the preceding event"

velvet narwhal
#

where your uh 40180020/e 40180019/t 600 1130 goes: so it looks like 40180020/e 40180019/t 600 1130/O Sterling

#

also yeah that's just SDVpufferthink strange, my heart events are written the same way in that it's a chain command

#

i'mma be honest i've never used the relationship when condition on events though, but if all of your other ones work then i'm stumped SDVpufferflat

orchid acorn
#

I'll try removing it tomorrow morning and using 0 Sterling me

#

but yeah me too

#

like worse comes to worse I'll just switch to the farmhouse and see if that works

#

but I already have 3 marriage farmhouse events so I was hoping to do something different ipretend

silver pelican
#

what is this for?

velvet narwhal
#

when the tree gets chopped it gives off debris i think SDVpufferthink

silver pelican
#

hmm i see SDVpufferwow

velvet narwhal
#

(i personally skip it because i'm lazy)

silver pelican
#

thank you! ill give it a test xd

wise berry
#

Hmmm is there a way to load a vanilla texture to another target? I'm trying to make something that masquarades as a vanilla item until it's nighttime, at which point its texture changes

uncut viper
#

why not conditionally edit its Texture field instead

#

(and sprite index ofc)

wise berry
#

I can't get it working with a conditional edit

uncut viper
#

(though, i dont know if the item will automatically update its appearance anyway)

lucid iron
#

its not a thing you can do with night tile right

uncut viper
#

i know that just changing the sprite index wont update it but im not sure about the texture

wise berry
#

Changing the texture isn't working either, no

lucid iron
#

to make timed edits like that you have to do on time changed update rate

#

or at least location changed

wise berry
#

Ahhh that makes sense

#

I'll go do that!

lucid iron
#

which is kinda not great monS

uncut viper
#

i dont think the update rate matters

lucid iron
#

it does if you are check for time though

uncut viper
#

when i added that reloaditemfield action to BETAS even if i manually changed the fields on the item, it didnt update unless i also called ResetParentSheetIndex() on it

lucid iron
#

for something like a texture at night vs texture at day

hollow aurora
#

One message removed from a suspended account.

velvet narwhal
#

i don't know how it works outside of trees, since trees has a natural "condition" and the time gsq worked there

uncut viper
#

im not saying the data for an object wont change at night, but if you already have an item in your inventory, i do not think it will change

lucid iron
#

hm i remember texture being from parseditemdata

uncut viper
#

newly spawned items will change ofc

lucid iron
#

sprint index prob stored yea

lucid mulch
#

(dont forget to have your timed patch only edit the specific thing you want and not nuke the entire data model in the process)

uncut viper
#

sprite index i know 100% for sure will not change with a reload unless you call ResetParentSheetIndex afterwards bc that is the exact issue i was running into
however i did not test the texture field itself

lucid iron
#

in the various draw methods of object something like this is called to get texture

ParsedItemData itemData = ItemRegistry.GetDataOrErrorItem(base.QualifiedItemId);
Texture2D texture = itemData.GetTexture();
#

so that is why i believe texture change will work

uncut viper
#

looking at Object.draw it seems like it would call the texture correctly, but it uses the current item's parentsheetindex

#

so if your item is at the same sprite index, then thatll work

lucid iron
#

this does mean u gotta make a texture as big as springobjects blobcatgooglyblep

hollow aurora
uncut viper
#

if you're in C#, you can also update the spriteindex manually

lucid iron
#

can u like, load a blank texture and use fromarea toarea?

deep cypress
#

I have made item textures in a lot of sizes

velvet narwhal
#

this has turned into a rabbit hole

lucid iron
#

i feel that unfortunately wouldnt work cus blank texture would be 0x0 right

uncut viper
#

making just a giant image thats mostly transparent except for the one spot would work

#

but you'd have an ugly giant image thats mostly transparent except for the one spot

lucid iron
#

yea unfort hokuhands

uncut viper
#

that would bug me but it might not bug you

wise berry
#

Not keen on it 😅 I'll poke around some more and ask for more help after I think

uncut viper
#

you're already using C# for parts anyway arent you? or is this for a different mod

wise berry
#

Different mod, not opposed to pulling out the C# though

uncut viper
#

ah, then yeah, with CP your only options are that big image thing or the BETAS action i made

lucid iron
#

yea and then you can use the spacecore timed trigger

#

to avoid ontimechanged update rate

uncut viper
#

with C# its easy bc theres already a utility function to iterate over every item in the world

lucid iron
#

that said

#

if it's a vanilla item then you would need to update both the texture and the sprite index right Bolb

hollow aurora
#

One message removed from a suspended account.

lucid iron
#

coooking

velvet narwhal
#

debug cooking

uncut viper
#

if its borrowing the texture of a vanilla item but then turning into a modded one then usually it would need to change both the texture and spriteindex yeah

#

unless its changing from one vanilla item to another vanilla item

hollow aurora
uncut viper
#

no output is normal

hollow aurora
#

One message removed from a suspended account.

warm tulip
#

Hello, i want to code a mod in stardew, for the first time ever (codding) so i use stardew wiki, and i want to know if the modding wiki is uptade to 1.6 ?

velvet narwhal
lucid iron
#

the .gg wiki has guides for older versions too, make sure you look at something for 1.6

#

what kind of mod are you hoping to make?

warm tulip
#

just add an npc

velvet narwhal
#

ooh the most moving parts

vernal crest
#

NPCs are a lot of work

uncut viper
#

an NPC is never a "just" thing

vernal crest
#

Well, good ones are. I imagine you could make a crappy one pretty quickly and easily.

deep cypress
#

Disposition is deprecated in 1.6

uncut viper
#

even a crappy one takes a lot just to get them spawned in and moving

#

that wiki link does not point to a deprecated thing

velvet narwhal
#

that's just what my history always links me to, lmao

warm tulip
#

i will try i camoeback when i give up ou need more information lol

uncut viper
#

that wiki link is correct avi dont worry

vernal crest
#

I suppose since I know how to do it now it feels like just getting them in game doing basic stuff feels easy lol

deep cypress
#

I strongly recomend following the example of how to make an NPC from another mod. (PolyamorySweet has Lantana, in the CP portion, if you copy that, it will help tremendously to save on time and effort getting things started.

silver pelican
#

hi again! im trying to figure out how the game shows the fruit textures whenever its ready to harvest. none of it seems to be in its folder.

brittle pasture
#

the fruits are just objects placed on the tree

lucid iron
#

Those r just items

velvet narwhal
#

they just kinda, plop the fruits on the trees so they needa be objects

lucid iron
#

If u want special texture then u can make a wild tree instead

deep cypress
#

@warm tulip here's the link, the CP folder is where you want to look.

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

Nexus Mods :: Stardew Valley

Permits multiple spouses or roommates, allows multiple spouses at weddings, and also, unlimited hugging and kissing!!! For Stardew 1.6. Compatible with SVE, RSV, ES, ARV, and any other expansion with

warm tulip
lucid iron
#

Cornucopia has one

velvet narwhal
#

if you want crazy trees, tree size framework

deep cypress
#

Ok! As long as Alecto is up to 1.6, that will work great!

silver pelican
#

SDVpufferheart hmm okiii thank youu guysuu

warm tulip
#

ok thx and honestly the serv is really prompt to answer, it's insane

velvet narwhal
#

oh y'know, probably the reason why it's tagged disposition is because of all of the times we've said dispo is depreciated

uncut viper
#

i mean it still defines a disposition

#

its just not in an asset called NPCDispositions anymore

velvet narwhal
#

yeah, my history is just like, "you typed in npc you want this link SPECIFICALLY, right?" aSDVpufferrise

lucid iron
#

Is it a command

velvet narwhal
#

i don't think so?

velvet narwhal
proven spindle
#

Does anyone know if there's an events file for the gourmand frog's cave?

#

I don't see one but just want to be sure it's not under a random name or something

teal bridge
#

Event data appears to be hardcoded on IslandFarmCave.OnGourmandResponse.

proven spindle
#

Thanks!

hearty tide
#

Hi, I was wondering how to make a new status (like that invisibility potion mod) basically the idea is after you consume the item, nearby enemies take chip based on your combat level + attack buffs and are confused (only attack you 50% of the time)

#

I am planning out an ant livestock mod and plan on adding a few ants who create chemicals that cause confusion on their target

paper sundial
hearty tide
#

Understood Thks

wise berry
#

I was digging around the decompiled files and found an easter egg that made me sad :(
There's a bird house furniture item that was added in 1.6 and if I'm not stupid, it looks like doves might visit your birdhouse if you've turned any kids into doves :((

#

Starting to think I need to make myself a mod that lets you take care of a dove or something

#

I've been tossing about the idea of a kid -> bird retexture that's also compatible with LittleNPCs

vernal crest
#

I could not turn my children into birds

#

Too sad

wise berry
#

I've just been sitting here thinking too much about it

vernal crest
#

Mod suggestion: as soon as a player turns their child into a dove, save file corrupted.

wise berry
#

So true

rancid temple
#

You turn your kids into doves and then every day doves attack your crops

wise berry
#

They're hungry SDVkrobusgiggle

rancid temple
#

Scarecrows can't stop them

vernal crest
#

Doves spawn on every map and attack you

wise berry
#

I just wanna be able to hug the dove babies now :(

#

Ogh suddenly dove NPC idea where the lore is that they were someone's child

#

I wanna adopt them and give them hugs

hollow aurora
#

One message removed from a suspended account.

sonic mortar
#

Ahoj!

#

I am Blue, part of the mod making team for Stardew Valley and Cattails: Wildwood Story ^^

#

We are just starting to mod SV but we have a lot of fun with it

#

So far we have published one mod but more is on the way!

#

I am the person that works on the pixel art and manages our socials ^^

#

nice to meet you all!

naive wyvern
#

it's nice to meet you too Blue !

vernal crest
#

Hello!

lone ice
#

Good morning, I'm hoping someone can help me with making a chair sittable? Ive gotten this far but it doesn't seem to work and I have a couple questions:


{
  "Action": "EditData",
  "Target": "Data/ChairTiles",
  "Entries": {
    "X_furniture_set/7/1/": "1/1/left/couch/0/0/false"
  }
  },

#

I don't understand how you derive the X, Y (currently written as 0/0/ here)

#

and I am not sure but it looks like the .png is supposed to be stored in the TileSheets folder despite all tilesheets for Maps being in the Maps folder

#

When I say "doesn't work" I mean this line of code is correctly added to the Data/ChairTiles list in this format but I clearly have some part of my actual entry wrong

#

if anyone could help resolve this I'd appreciate it 😅

naive wyvern
# lone ice I don't understand how you derive the X, Y (currently written as 0/0/ here)

hello ! here's a wiki page I refer to all the time when Im making sittable chairs
https://stardewmodding.wiki.gg/wiki/Tutorial:_Adding_Sitting_to_Custom_Map_Chairs

Stardew Modding Wiki

[This tutorial is a WIP by Majickian and should not be considered a finished product at this time.]
This is a tutorial for adding the ability to sit on custom chair tiles place on a custom map.

lone ice
#

thank you!!

#

This has been driving me crazy

naive wyvern
#

in all my chairs that area where you put 0/0 is also the same for me, i wonder if the reason your chairs arent sittable have something to do with name

#

if you havent already, make sure your file name has the same name as the tilesheet in Tiled

#

its easier to keep track of that way 😭

#

might also be worth mentioning make sure the sitting part of your chairs is in the Buildings layer in Tiled

lone ice
#

I think the part I was missing was loading the .png in Content.json

naive wyvern
#

ahh, that'll do it
always load your textures and put them in an area you can easily see

lone ice
#

do you know what the Target for loading tilesheets is supposed to be? Is it just "Mods/{{Your Mod}}/TileSheets"?

naive wyvern
lone ice
#

ahhh ok

#

thank you

#

it's not knowing which target that gets me

naive wyvern
#

{{TargetWithoutPath}} is the last item in a file path

#

if it helps

#

lemme find the github entry about their difference

lone ice
#

I just read it!

#

that's okay

naive wyvern
#

Ah bet

lone ice
#

What was getting me was I didn't know "Tilesheets" was in Maps

#

because there's a tilesheets folder

naive wyvern
#

Ohhh, well if you're doing your own tilesheets it doesnt really matter where you put yours (Though I do like mine to be consistent with vanilla)

#

as long as you targetted the file correctly, it will load c:

#

common practice of course is having assets/(whatever other folders you have)

#

just to keep things tidy

lone ice
#

I left the folder structure as-is

#

although my unpacked content didn't have a folder labeled "Tilesheets" in Maps

naive wyvern
#

Oh, thats weird then O:

#

but its mystery solved now at least nodnodnod

lone ice
#

Nah it still doesn't work 😭

#

I don't know what I'm doing wrong

naive wyvern
#

its time to bust out

#

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

lone ice
hallow prism
#

!patchsummary is better to check that

ocean sailBOT
#

Can you do these steps to provide more info?

  1. Load your save and view the content that should be patched.
  2. Type patch summary directly into the SMAPI window and press enter.
  3. Upload your SMAPI log to https://smapi.io/log (see instructions on that page).
  4. Post the log link here.
lone ice
#

Thank you!

#

I try that

lone ice
#

[X] | [X] | [ ] | Exclusive | Adding Tilesheets for Maps (Load TileSheets/ShipsAhoy_SRoom)

#

It is loading the tilesheet

#

It's not applying it to anything, though, if it needed to

#

Data/ChairTiles | changed entries

#

ChairTiles successfully changed

#

I'll have to figure it out later

tiny zealot
#

if you are using the tilesheet directly on a map, you probably need to load it to Maps/YourFileName
(assuming you are using the plain filename in the actual .tmx, i.e. your file is referencing YourFileName without any path parts)

lone ice
#

okay let me try that real quick before work 🤣

tiny zealot
#

if your tmx is loading TileSheets/ShipsAhoy_SRoom, then you probably want Maps/TileSheets/ShipsAhoy_SRoom (i don't know if that works; i've only done it with no subdir)

#

the stuff in TileSheets is used for tools, placeable furniture, etc., and counterintuitively not for map tilesheets

lone ice
#

I didn't know what target to send the texture to

#

and it seems to complain if I do Maps/ShipsAhoy_SRoom

nova gale
tiny zealot
#

utterly unrelated, i wish to celebrate my NPC reaching 256 endorsements SDVpufferparty
her popularity can no longer be contained in 8 bits. this is important to me for some reason

lone ice
tiny zealot
nova gale
#

is there a way to teleport characters off screen as part of a schedule (but not using path finding, I want them to just be "gone". I considered just making a map space as a holding area for them but i would have to make an actual warp point for that to work I think (which i can do if thats the only choice, i just wasn't sure if Ic ould warp them away)

brittle ledge
#

That's what most mods do, place them in a hidden room.

hallow prism
#

yeah, i'm not aware of any other way, albeit i'd love for a mod to add a warp schedule feature but well, schedules are risky

brittle ledge
#

You could also set their sprites to be invisible but they'd still have collision/be interactable, so warp room is the better solution imho

calm nebula
#

Probably breaking compat with a bunch of other things

#

(This I think would be worthwhile.)

nova gale
#

thanks all! secret warp room it is

hallow prism
#

"you can do it, you basically will just summon the apocalypse back"

nova gale
#

while you're here Lumina, do any of your NPCs in VMV use location based dialog in a custom location? I cannot for the life of me to get it to work in my custom location and I'd like a working example to look at

#

the couple of your NPCs I've looked at so far all use date or season based dialog as far as I could tell

hallow prism
#

i don't remember using that, no

#

if you have trouble and the hivemind here cant help you, you still have the last recourse of "making a small repro pack and send it to pathos"

nova gale
#

darn, I'll keep looking! (or I'll just use schedule strings instead :P)

#

yeah, true, maybe thats a good idea, and actually that would let me rule out a few additional items if I used an existing NPC

brittle ledge
#

Doesn't Helia have different dialogue depending on whether she's at Glimsap or Faycombe? Or is that not what mytigo meant?

hallow prism
#

so she would have if the query was working but it's fixed in 1.6.9, but it's a query thing, not a location dialogue

#

mytigio want the saloon thing

#

wait

#

isn't the saloon thing broken at the moment with some stuff already?

brittle ledge
#

Ohh do you mean like the Sa... Yes, that

#

Location+ heart is broken yeah

calm nebula
#

The saloon thing js friendships

#

Location dialogue works afaik

hallow prism
#

so depending of what mytigio tested, maybe

nova gale
#

and so far in my testing anything location based for my custom area (location_x_y as well as just location), I haven't tried with hearts yet because these new NPCs aren't really meant to be befriended

hallow prism
#

hmm

nova gale
#

(schedule strings work through, so I could just fall back to those!)

brittle ledge
#

Hm, pretty sure mine works for Wren using location_x_y. Are you using the map name that's loaded into the game?

hallow prism
#

lot of custom locations have underscore so maybe the dialogue thing does't like that

#

but yeah, we'll need to see more of what you use to rule out things

nova gale
#

I renamed my location to remove the underscores, i assumed that was the issue

#

I even renamed it just "dwarfBaseCamp" to make sure it wasn't the periods either

brittle ledge
#

(Wren's uses underscores, that should be fine)

#

When you say you renamed it, you mean in the CP code and not the .TMX file, yes?

nova gale
#

yeah, I didn't touch the map file

brittle ledge
nova gale
#

I'll try a vanilla NPC in the custom area and a custom NPC in a vanilla area and maybe a vanilla NPC in a vanilla area to make sure all of those work, maybe something somewhere is hard coded

#

but, overall, i think I can do everything I was trying to do with schedule strings instead, so we'll see how far I want to take the troubleshooting 😛

woeful pasture
#

My custom location dialogues works okay for my NPC. 🙇‍♀️

brittle ledge
#

It's working for my custom NPC in a vanilla location and a custom location, so it's not broken in general.

nova gale
#

oh, what mods are those? I can just look at working samples I might spot what I did wrong

brittle ledge
#

Unfortunately I'm at work so I can't pull up my files to compare (Wren isn't released yet).

#

If you're still having issues this evening (~8 hours from now) ping me and I can grab my files/look at yours and compare.

nova gale
#

will do (y) danke

woeful pasture
nova gale
#

hrmm, ok so item 1 I notice is you're loading your location based purely on the map file, I'm using the new 1.6 custom location structure

#

maybe I'll try loading the location from the tmx, then editing it

sleek aurora
#

Is it possible to somehow make a double harvest from trees? For example, I need to be able to collect limes and leaves from a lime tree. And how to do the same with ordinary seeds. I didn't find anything like that with cornucopia.

silver snow
#

Hi, I'm not quite making a mod, but considering this is where all the discussion about interfacing with modding things go, I figured i'd ask:
I'm trying to create a python script which parses the JSON information extracted from the XNB files to get some rough statistics about which fish are catchable where. I thought I was doing pretty well so far, because I've been making a bunch of simple python objects out of the name/id fields just to make sure I understand the landscape. However, I've been hitting roadblocks with stuff like
LOCATION_FISH Forest BOBBER_X BOBBER_Y WATER_DEPTH, which has just popped up for an item ID. I have no idea how to parse this outside of the game, there's a lot of these queries, so I'd like to know if I have to manually implement the query/response behavior myself or if there's any tool outside the game to try this.

#

Seems kind of painful to handle bobber x/y, but im sure i can think of something, its just SDVpufferwaaah

tiny zealot
#

the game uses it in place of a specific id in order to generate items randomly

nova gale
tiny zealot
silver snow
#

Oh hmm, if its just evenly distributed I suppose that's not the worst thing ever

#

Good to know though, thank you 🫡

#

It shouldnt be too bad since it's just fish in the area, I already get that so I can just pick from everything that has a concrete ID, since otherwise it'd return none

sleek aurora
#

Yes, 2 fruit wood items. Not at the same time, but with probability.

nova gale
sleek aurora
#

Thanks ))

brittle ledge
dull river
#

I don't know... nothing good for release comes from a one week project mostly.

plucky reef
#

NPC mod is on the list after my big one is done, but it's probably 8 months down the line before I even get started. Make it an optional addon to the profession mod.

#

Two day game jams are fun to get something actually out of your head and onto code but then the months after that make it good.

dull river
plucky reef
#

I also want to do an optional dungeon/extra map for the profession mod but every time that urge hits you have to write that down in a design doc and get back to your original scope.

#

In the middle of trying to do something really simple and my brain says "wouldn't it be cool if you could do...." and you have to keep saying "shut up, make this one little thing work first".

dull river
#

But it's just like the NPC thing, I add stuff according to my own playthrough, like most of us.

dull river
brittle ledge
#

I wish we were having another mod jam here. They're always a good time.

dull river
#

towards stuff I add mostly

tiny zealot
plucky reef
#

I do not have a template, I just started writing and organized it later, but I feel it's mod specific. Then off that design doc I separate out specific tech things I need to do and append it as a checklist.

dull river
#

Just started modding Stardew Valley, and I see that I can't just throw random garbage into this perfect lil cozy game

#

Studying pixel art standards and shit

brittle ledge
#

@tiny zealot didn't see if you saw my question earlier: is there a soft/hard character limit on Secret Note Framework notes?

dull river
#

All terrain features for me at least, MUST have a darker outline like every other terrain feature for example.

#

Otherwise I don't see how shit fits

plucky reef
#

with how long it takes to code it I have to write it down or I'll forget a week later. My brain is full of holes.

dull river
#

ideas keep escaping

tiny zealot
naive wyvern
#

iiiii have a question, is there a way to do this ugdudhf

or am I limited to letters and notes (like the shopping list in one of the houses)

#

just a random idea popped into my head 😭

tiny zealot
#

not in vanilla. MEEP can do something like this, i think. i also implemented my own version for lacey's family photo

naive wyvern
#

oooh what's MEEP?

tiny zealot
naive wyvern
#

ahh thank you ichor SDVpufferheart
you're so strong for making your own version though iuhdiugsaf

tiny zealot
#

the curse of already having a C# component for my mod is that i can easily give it more jobs 😅

brittle ledge
tiny zealot
#

i have one that goes onto a second page (#2, if you are curious). i took the liberty of checking the code and i see nothing that would impose a cap, so you should be able to have as many pages as you need

#

(meaning just write the note as long as it needs to be. the LetterViewerMenu will paginate it automatically, just like mail)

brittle ledge
#

Thank you! I am procrastinating on events so that's my next step with Elliott SBVLmaoDog

nova gale
#

yeah, it's taken me longer to do my npc schedules/events/dialogue then it did to make the entire procedural dungeon system 😛

#

and these are just support NPC who aren't part of festivals and stuff! i can't imagine how long real NPCs take

brittle ledge
#

Honestly it's more that I don't feel like testing anything right now SBVLmaoDog

#

As for how long, it really depends on the NPC. My usual joke is that Jorts and Jean took two weeks and Wren took two years.

swift dust
#

i love Jean and Jorts on twitter poliwhirl_pray

brittle ledge
#

Me too SDVpuffersquee

nova gale
#

does anyone know of a way to set a custom locations LocationContext in CP or will I need to set all of those in my C# portion?

#

oh I see, it's a map property, nm!

lilac stratus
#

okay, can someone explain wtf is going on here? I'm using Harmony to patch StardewValley.Menus.DayTimeMoneyBox._timeText inside StardewValley.Menus.DayTimeMoneyBox.draw - seems straight and simple, right? but it seems that either code (despite having no returns and no breaks) never executes parts of its own code, or somehow Harmony fails to attach. But I've had Harmony attach as prefix and it gets fired ~60 times per second, but then when I try to transpile the logging code says it did its job, but the changes never actually happen. So I've tried attaching to Utility.drawTextWithShadow and it seems to never get called from inside Menus.DayTimeMoneyBox.draw - it fires for every other text, but not for any text from DayTimeMoneyBox... just wtf is going on here? is there some way to debug wth happens here?

floral canyon
#

Hi! I'm still making quests. I wonder what is the query for has_completed_quest? I don't see anything like that in the wiki page 😢

ashen oak
#

TFW you spend like two weeks on and off writing an IL pattern matcher and debugging a transpile only to wake up one morning and realize, "what if we just told JIT not to inline that function" and fix the problem in one line of code

hallow prism
floral canyon
hallow prism
#

in what sense?

floral canyon
#

you said i need to set a flag in the quest entry?

hallow prism
#

in the end dialogue of quest

dull river
#

Most of the times it's just something like that

hallow prism
#

you kinda have all the info here, if you don't know how to add a flag to a dialogue i suggest looking at the dialogue page on wiki and maybe trigger action page depending of the way you want to go

floral canyon
#

is the dialogue in the quest entry treated as normal dialogue?

#

I have used trigger actions but they are useless without the right condition

lucid iron
#

i am not sure i understand what you are trying to transpile tbh, _timeText is a field on DayTimeMoneyBox

hearty tide
#

Hi quick question, so I am kinda trying to make some new code for that MPS mod since a few of my mods aren’t compatible with it. And I noticed that some of said mod ids are different from the name of the items.
(EMS expansion’s golden egg has the id Large_gold_egg) so for ids does one just copy said id or use its name

I am only modifying the file I downloaded from nexus and don’t plan on sharing it. If anything might ask the author if they are interested in adding the code if I find that my addition works

#

This is for mods like grain overhaul, a couple livestock mods and the like that use the vanilla machines but haven’t been made completely compatible yet

tiny zealot
#

there's probably some wackadoo place where a name is expected, or maybe some framework mods expect names, hence the hedge

hearty tide
#

Thks, I was just confused cause a few items I see have odd ids to say the least

#

Ngl I hope this all works out without a hitch. Respect the Nach’s work a lot

tiny zealot
#

also take care to use the actual id. most well-behaved mods should include their mod id inside the item id, e.g. authorname.modname_MyItem. often in content patcher json that will look like {{ModId}}_MyItem, so you'll have to replace as needed so it looks like the former

#

the mod id is in the mod's manifest.json if you need to find it

hearty tide
#

Good thing that it is mainly the unique id

#

Just one thing to keep track of the items

hallow prism
warped spade
#

Heya ! I'm making a mod that edits shop fields of other mods only when those mods are installed. In this case, as I want the edited mods to be optional, how should I set up the dependencies part of my manifest ? Should I leave
"Dependencies": [
{
"UniqueID": "mod.Exemple",
"IsRequired": false
}
]
or is the dependency not necessary ?

tiny zealot
#

the short version of "technical reasons" is that a false dependency like this enforces load order, so in this case your mod will be loaded after mod.Exemple. load order is a tiebreaker for patch priority in Content Patcher, so if neither mod sets a patch priority, your edits will be applied after mod.Exemple's, which is almost certainly what you want.
if mod.Exemple sets a priority, then you will have to as well in order to come after them

warped spade
plucky reef
#

do Bad Things happen if there is a long circular chain of false dependencies that creates a loop? Highly unlikely that would happen but just curious. A hard dependency makes SMAPI throw a hard error.

tiny zealot
#

i think any dependency loop, false or otherwise, breaks

brittle ledge
#

If there's a loop I think it just refuses to load, yeah

royal nimbus
#

so im gonna need some code help. a while ago someone from here was helping me with it but they went mia. so what im wanting to do is add another tab to the player menu and i want it to open up a card that shows the individual stardrops you get as in my mod they are stamps. and this is the card for said stamps. ik there's already a thing in the player inventory that shows how many u can but id like to create a new tab for it. would anyone be able to help me with that?

lucid iron
#

i think it was mentioned that you cant do this without C#

#

and i will also add that it's a bad for mod compatibility to add tabs like this

brittle ledge
#

I seem to recall also that adding a tab was a huge pain even with c#

lucid iron
#

yes big suffering all around

brittle ledge
#

(Could look at adding a button like Event Lookup does?

plucky reef
#

better to make a button that sits on the UI somewhere you can click (I think Magic does this for an example)

uncut viper
#

adding the tab itself with C# wouldnt be too bad for a simple menu like that, but yeah compatibility would suck

#

its editing existing menus that is major pain hours

lucid iron
#

since there's that SDViconstardrop x N bit in player

royal nimbus
lucid iron
#

u could try and replace that with a button

royal nimbus
#

yeah maybe i could replace an exisiting one?

uncut viper
#

replace an existing inventory menu tab?

lucid iron
royal nimbus
#

yeah if thatd be easier? <___> idk

#

i got the graphics down

lucid iron
#

plus the general pain of trying to reshape vanilla ui monS

uncut viper
#

i dont know why you would ever want to remove one of the existing tabs entirely

royal nimbus
#

ive seen mods add more to the side but from what i saw there's room for like 2 more at the top

#

yeah lol i dont

old edge
#

Writing some C# code this morning...anyone know the correct way to implement a farmer sprite change? who.Sprite.currentFrame = 16;

lucid iron
#

you should look at the wiki page about setting up C# development

#

!startmodding

ocean sailBOT
#

Making mods can be broadly divided into two categories:

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

royal nimbus
#

but yeah idk if i could do that myself. id prob need someone to work with me. its such a shame this other person went mia >__<

uncut viper
#

i mean even if they were still around if they were just helping by answering questions and such i think thats much much different than asking them to actually make a menu with you, thats a lot of work. you'd probably be doing it on your own either way unless you wanted to commission someone

royal nimbus
#

they were actually doing it for me which was super nice

#

ahhh

#

yeah. id prob have to do that for sure =/

#

thing is. im poor lol

plucky reef
#

Best way to learn is to start. Start looking at code and ripping your hair out.

royal nimbus
#

xD

#

is there a place here to commission ppl for that?

uncut viper
#

!commissions

brittle ledge
#

!modcomms iirc

ocean sailBOT
royal nimbus
#

ty

brittle ledge
#

I did not, in fact, recall

old edge
#

or is it who.FarmerSprite.setCurrentFrame(16);...

lucid iron
#

hm is the animation something already in game

#

for instance if it's a emote then u want Farmer.performPlayerEmote

old edge
#

need tired one.

lucid iron
#

private void performPassOut()
{
    if (isEmoteAnimating)
    {
        EndEmoteAnimation();
    }
    if (!swimming.Value && bathingClothes.Value)
    {
        bathingClothes.Value = false;
    }
    if (!passedOut && !FarmerSprite.isPassingOut())
    {
        faceDirection(2);
        completelyStopAnimatingOrDoingAction();
        animateOnce(293);
    }
}
plucky reef
#

taking notes here, so I can use the emote in the abigail event where the farmer plays the harp?

lucid iron
#

animateOnce(293) is pass out

#

the harp is a emote u can use by chat right

#

so yea probably

plucky reef
#

woo excellent

#

I can probably grab the jumino explosion animation too where they pop out of everywhere in the community center, that was in the back of my head to look at later but I imagine it's very similar.

teal bridge
#

Every time I have to write another Nexus description, I feel a stronger temptation to have ChatGPT do it for me.

brittle ledge
#

Don't give in to mediocre word salad!

lilac stratus
orchid acorn
#

I wanted to thank you againf or your help ❤️

lilac stratus
lucid iron
#

hm shouldn't myExtraMethod take 2 arguments (SpriteBatch b, StringBuilder _timeText)

#

but putting that aside i assume u did manage to insert your call just before drawTextWithShadow

teal bridge
brittle ledge
#

(/lh but also it will read like a sales pitch, don't do it SBVWahSob )

teal bridge
#

GPT can sell things for me? Hmmmm, very interesting...

lilac stratus
brittle pasture
lucid iron
#

you put Ldarg_0

#

ah no it's a field right LilyDerp

lilac stratus
lucid iron
#

so i think doing the function right before the call is actually too late

#

need to do it before _timeText goes on the stack to be passed into the call

pine elbow
#

im using Miss Coriel’s npc creator 3 and i can’t for the life of me figure out how to use extra sprites and make animations with them. long story short, my character has a schedule where at some point she goes into the wizard hut to read. the reading sprites are in my “extra sprites” folder but how do i make animations with them? anyone have any npc advice? 🥹

lucid iron
#

im not super sure if this is exact block of IL but u get the idea

brittle ledge
nova gale
#

strange question for anyone who has experience with the new custom location contexts: I'm running into an issue where during gameplay, if I pass out I wake up where the location context dictates (in a new player tent in my custom area). However, if I then close the game and start it up again, I instead am in my farm house in the bed. Anyone have any clues I can try to run down?

uncut viper
nova gale
#

oh! awesome

uncut viper
#

"Fixed AllowWakeUpWithoutBed map property not working consistently." I think as long as your map has that property you'll be good

nova gale
#

I saw the 1.6.9 release notes referenced on the wiki, but the link didn't actually seem to go to anything but the 1.6.8 release notes

#

it does, yeah

uncut viper
#

that property wasn't being checked on save load before is the problem

lucid iron
#

ive seen this problem in RSV's summit farmhouse too, prob nothing to do from your side

uncut viper
#

so when you load a save you get put in the bed spot

#

you can download the beta to try it out and see if it's fixed

nova gale
#

oh I can? is that just through steam or somewhere special?

lucid iron
#

see pins

nova gale
#

checks pins

lucid iron
#

you need to be on steam

teal bridge
#

Does the wiki have any page on item giftability? Not for my own knowledge, just for a handy readme link.

uncut viper
#

keep in mind you'll also need updated SMAPI and content patcher

#

versions specific for the beta

nova gale
#

thanks, found the relevent pins, I'll go through those pages really quick

lucid iron
#

the points are detailed on the friendship page

teal bridge
#

Gift tastes is a helpful page, but many if not most items are giftable even if there are no villager-specific tastes (i.e. universal neutrals).

#

Or maybe universal dislikes, that's a bigger category.

#

I guess it does have a link to that.

nova gale
#

"Fixed move command ignoring all remaining NPCs if an optional NPC isn’t found." <-- oh, that explains some stuff

#

having the beta will be nice so i can update my colored items early as well 😄

pine elbow
#

i used the creator to basically do the base stuff now im trying to replace sprite sheets etc but running into trouble

#

also Miss Coriel lost all her data recently so I don’t want to overwhelm her >.<

uncut viper
#

when you say you've used it to make the base stuff... have you actually tested your NPC in game yet? because last i checked, the NPC creator was not updated for 1.6

nova gale
#

Yup, 1.6.9 fixes the waking up at home issue for me (y)

velvet narwhal
#

(if you want special SPECIAL things, that's a spacecore feature, like adding sounds to said animations)

hallow prism
brittle ledge
# pine elbow i’ve been doing some of that too, just curious how to actually make animations w...
Stardew Modding Wiki

So, you're interested in creating a new character for Stardew? Good news: with version 1.6, creating a character is easier and allows for more flexibility than ever. However, NPCs are one of the more complicated things to create for Stardew, as they have a LOT of moving parts. This guide aims to provide a basic but thorough walkthrough for ea...

vernal crest
# nova gale Don't worry about it, I appreciate you looking it over when you get a minute, bu...

So I am extremely baffled. I wrote some location dialogue for Hiria before looking at yours in more depth and hers worked perfectly. I have looked at yours closely and made a whole bunch of tweaks and nothing has worked. The dialogue is there, I can even view it with loaddialogue, but I just can't talk to Jakan and get it! So I am going to try making a new NPC inside your mod and see if I can get them to use location dialogue in your base camp location.

nova gale
#

yeah, I was going to make a much smaller repro mod to see if I could replicate it. The only obvious difference I see between mine and another that worked is that I load my map as an asset then add the location using the EditData action on "Data/Locations" and the working one loaded them using "CustomLocations"

#

having said that, i ended up getting the effect i wanted using Schedule strings instead, which worked fine so I may not dig too much further honestly

brittle ledge
#

Are you still having issues with locational dialogue?

vernal crest
#

Mine works using the 1.6 locations rather than using CustomLocations, so it's not that.

nova gale
#

good to know

vernal crest
#

I am probably going to keep digging even though you got the schedule strings working instead, because I want to know what is affecting this. If that's okay!

#

Might rope in rokugin too and we can have another exploration spree lol

nova gale
#

I don't mind, I'm curious as well, just not "willing to dig into the guts of the dialogue system" curious 😛

#

I'm going to make a pure CP mod for repro as well and see if I can replicate that way, since this one is really a combo of a C# and CP mod, but the majority of the location stuff is handled in CP

vernal crest
#

I am testing yours with just the CP part. I downloaded the whole thing but only extracted the CP pack lol

nova gale
#

the only part that is handled in C# atm is adding it to the location context (and only because at the time I was building the location context in C#, which I no longer need to do and will probably swap that back to CP now)

#

ok, if you can reproduce with just the CP part then that rules out that part as well

vernal crest
#

I am going to combine exploring this with seeing how long it takes me to make a new NPC for future possible commissions purposes lol

brittle ledge
# vernal crest Ya

FWIW I'm pretty sure Sunberry loads in with the 1.6 method and Wren's locational dialogue works fine with that SDVpufferthinkblob could be an issue with the .tmx map itself maybe?

#

or like that specific location (which I suppose is what you're testing)

nova gale
#

I'm going to try adding location dialog to the new custom location i just added, which re-uses a vanilla tmx file, I'll let you know

#

this is for the inside of the tent, so it just uses linus' tent interior atm

vernal crest
#

Oh I can also confirm that the location dialogue with x, y coordinates is possible even with underscores in the location name, as I did not remove mine from my mod when testing location dialogue.

#

Not that we should add underscores back in to yours, mytigio, but just as an FYI if anyone is interested

#

All righty, looks like Jakan is (somehow) the issue!

nova gale
#

I might put it back just so i can keep the naming consistent, literally everything else uses the _ between my mod id and the asset key 😛

vernal crest
#

I didn't do i18n here, but I did with Hiria so I know that works fine - plus if the i18n was a problem it would still load the dialogue box but with broken text.

nova gale
#

yeah, I was pretty sure it was i18n

#

I've messed that up before

vernal crest
#

Your i18n is working okay

nova gale
#

I mean wasn't*

vernal crest
#

Ah lol

nova gale
#

let me pare him down to the minmum and start adding stuff back in

#

the other NPC has the same issue, but they are basically duplicates of each other so that isn't shocking

#

i think the first thing Im' giong to do is make them not speak dwarvish

vernal crest
#

Lol I had that thought too, but they didn't work when I commented that line out either

nova gale
#

since it worked with alex i'm going to just copy him whole cloth, change the name, and see what happens 😛

vernal crest
#

That is a good idea. Yup, Jakan still isn't getting location dialogue in Town either. I was wondering if it's because they are non-social NPCs but Mr Qi appears to have location dialogue so I don't think it is that.

pine elbow
nova gale
#

what command do you use to move the character to a specific spot?

#

(i assume thats how you got alex into a specific location)

brittle ledge
#

they edited his schedule to place him there

#

alternately, you can debug wctm NPCname and it'll place them on top of you iirc, so you can stand where you want them

nova gale
#

gotcha

pine elbow
#

@brittle ledge @velvet narwhal thank u both sm ❤️

vernal crest
#

Yeah, I just gave Alex a 0 schedule so he started his day at the first place in his schedule rather than at home

ashen oak
# ashen oak TFW you spend like two weeks on and off writing an IL pattern matcher and debugg...

For anyone curious, I don't know whether there's a more acceptable means of preventing JIT from inline a function and thus thwarting prefix/postfix patches, but after perusing .NET's inline policy code this appears to do the trick:

        public static IEnumerable<CodeInstruction> FishingRod_pullFishFromWater_Transpiler(IEnumerable<CodeInstruction> instructions, ILGenerator generator)
        {
            // Disable inlining by pinning a useless local variable
            generator.DeclareLocal(typeof(int), true);
            return instructions;
        }
#

(Injecting a try/catch block would probably work too but I haven't figured out how to do that yet)

nova gale
#

as far as i can see, copying Alex directly results in the same behavior

vernal crest
#

Yeah me too

#

I am so confused

fiery cobalt
ocean sailBOT
#

Log Info: SMAPI 4.0.8 with SDV 1.6.8 build 24119 on Microsoft Windows 10 Home, with 13 C# mods and 7 content packs.

fiery cobalt
#

I don't understand why it's not working with trees? The crops work perfectly

brittle pasture
#

and look at the vanilla fruit tree data to see how they're done

fiery cobalt
#

Okay thanks!

nova gale
#

changing his name from "{{ModId}}_Jakan" to "MytigioTester" seems to ahve made the dialog work

#

does Hiria's internal key have an underscore in it?

#

belay that, it was the day of week text

vernal crest
#

No, Hiria's internal name is "Aba.Hiria". I don't know if it's related, but I can't get Jakan to be considered as "met" even though I've set them as a social NPC.

nova gale
#

ok! welp i'm at a loss, at this point I am adding a direct duplicate of Alex called "Alec", I add 2 locational lines of dialog of text to both my copy Alec and the original Alex, the copy doesn't work in my custom location or on the mountain, Alex works fine in both my custom location and the mountain.

calm nebula
#

Weird

finite ginkgo
#

Does Jakan have gift tastes

nova gale
#

at this point, the only real difference i can think of is that Alex has a full dialog file, Alec starts off with a blank one

calm nebula
#

Sleep one day

vernal crest
#

Ooh

nova gale
#

no, Jakan does not (nor does the duplicate)

calm nebula
#

Hmmm

nova gale
#

I'll go try sleeping, you're thinking to reset the dialog?

calm nebula
#

If you lookup anything do you see their dialogue be sane

nova gale
#

does lookup anything show dialog?

#

if so I might need to bind a key for that

vernal crest
#

I will try giving gift tastes

finite ginkgo
#

Try giving Jakan gift tastes, i know things like CTs and "meeting" the npc don't work without the character having gift tastes, so it might be the same for location dialogue

vernal crest
#

Okay, setting gift tastes makes the location dialogue work when Jakan is set as a social NPC. Time to check if it's still necessary if they're non-social.

calm nebula
#

Make sure to test both 1.6.8 and 1.6.9

vernal crest
#

I don't have 1.6.9

nova gale
#

no joy on sleeping, interesting on the gift tastes!

#

do I just need to set one Ender?

#

(I've modified gift tastes before, but never added a set for a new NPC)

vernal crest
#

Okay even though I can't actually give a gift because they're not social, it appears they do actually need gift tastes set for the location dialogue to work.

velvet narwhal
#

(looking at SVE's camilla and i'm only seeing portraits, sprites, animation descriptions, and schedules; aside from the standard chardata edit)

vernal crest
#

Does Camilla have location dialogue though Avi?

velvet narwhal
#

squints

#

"DesertFestival_2": "0 Desert 8 2 2/610 Desert 8 2 2 \"Strings\\schedules\\Camilla:DesertFestival_Camilla\"",

rancid temple
velvet narwhal
#

lemme dig into the actual schedule.json

vernal crest
#

No it's not in schedule, it's in their dialogue

nova gale
#

that's a very strange interaction 😛

finite ginkgo
nova gale
#

alright, going to add gift tastes to both, and see if that works!

velvet narwhal
#

yeah antisocial only has 1 dialogue line from camilla, and that's not specified

rancid temple
vernal crest
#

Yup, that did it. I added gift tastes to Jakan in an otherwise completely unmodified copy of your mod, mytigio, and now Jakan's location dialogue works.

#

Dwarvish and all.

nova gale
#

interesting, so the dialog works but I didn't get the mouse hover

vernal crest
#

No, I didn't either.

nova gale
#

I'll check that in a moment, going to unwind a bunch of this testing stuff

vernal crest
#

I also don't get that for Hiria

nova gale
#

cough forgot to commit and push before I started testing cough

vernal crest
nova gale
#

while I'm here, any other random entries I should add? these NPCs aren't social or friendable/marriable, (they mostly exist so I can explain the mod contents, have a shop, and have someone to rescue you when you passout/die in the new dungeon :P)

vernal crest
#

I got the text bubble cursor when I made Jakan social, btw

nova gale
#

interesting, they get the tet bubble cursor for other dialogue types (day / schedule text)

#

even without social

#

¯_(ツ)_/¯

#

the long and short of this adventure is: location dialogue is a little weird

teal bridge
#

Oooh, sorry I wasn't paying attention to chat, I totally could have resolved this earlier since I was just looking at this code yesterday. FYI, this is the relevant code:

public bool hasPlayerTalkedToNPC(string name)
{
    if (!friendshipData.TryGetValue(name, out var friendship) && Game1.NPCGiftTastes.ContainsKey(name))
    {
        friendship = (friendshipData[name] = new Friendship());
    }
    return friendship?.TalkedToToday ?? false;
}

The same check is also done in Event.DefaultCommands.Speak.

vernal crest
#

Does that run for a non-social NPC given that they don't get friendship change on talking?

teal bridge
#

There are special checks for SimpleNonVillagerNPC in a lot of places but they don't always short-circuit the gift taste checks.

#

Essentially what it comes down to is that the existence of a Friendship is what is used to check whether player has met an NPC; and friendship only gets added when NPC has gift tastes.

vernal crest
#

Oh well, now we know. I've edited the dialogue page of the wiki with the info about needing gift tastes so hopefully nobody else has this problem in future.

teal bridge
#

So, indirectly, you can't "meet" any NPC without gift tastes.

vernal crest
#

Yeah LookupAnything was telling me I hadn't met Jakan yet and also wasn't playing their introduction dialogue.

teal bridge
#

As just another FYI, it's also in the GSQ:

public static bool PLAYER_HAS_MET(string[] query, GameStateQueryContext context)
{
    if (!ArgUtility.TryGet(query, 1, out var playerKey, out var error) || !ArgUtility.TryGet(query, 2, out var _, out error))
    {
        return Helpers.ErrorResult(query, error);
    }
    return Helpers.WithPlayer(context.Player, playerKey, (Farmer target) => Helpers.AnyArgMatches(query, 2, (string npcName) => target.friendshipData.ContainsKey(npcName)));
}

So if you use PLAYER_HAS_MET, they must have friendship data. I guess with non-social villagers, you can't use that condition at all, it'll just never return true.

nova gale
#

adding the gift tastes also completely change the lookup anything record

#

before it was a mostly blank page, now I have birthday, can romance: no, friendship, talked today, gifted today and gifted this week listed out

teal bridge
#

Yeah, all those things are gift-taste dependent.

vernal crest
#

I wonder how Mr Qi can have location dialogue without having gift tastes. Maybe it's hardcoded for him.

lucid iron
#

Is there only 1 mr qi npc?

teal bridge
#

That I don't know, it's even further outside my wheelhouse than the rest of this gifting stuff was.

#

You're sure it's "location" dialogue specifically?

vernal crest
#

No I am not completely sure but it does match the format

#

There's only one "Mister Qi" listed in Data/Characters

teal bridge
#

Hmm, but Qi appears in both the nut room and the casino and AFAIK is in both places at the same time.

#

I think he's not a "unique" NPC. The game directly adds him as a new NPC() to the nut room.

#

But that doesn't really answer the question, I suppose.

uncut viper
#

he does have a special case in AddNPCs to add him to the QiNutRoom if he isnt there

vernal crest
#

He doesn't have gift tastes listed under any name either

#

So my guess is that he has some special code for him somewhere

teal bridge
#

It adds him to the QiNutRoom and it adds him without really loading his actual character data, only his sprite with dummy NPC data.

vernal crest
#

Because I was referencing him for location dialogue for a non-social NPC and that clearly did me no favours lol

teal bridge
#
location.addCharacter(new NPC(sprite, new Vector2(448f, 256f), "QiNutRoom", 0, "Mister Qi", datable: false, content.Load<Texture2D>("Portraits\\MrQi")));
#

Whatever might be in the XNB for Qi, the Nut Room ain't havin' none of that.

lucid iron
#

We should make a mod that adds Mr Qi to every map in the game

nova gale
#

I didn't see a version for location that had day of week included, is that valid?

#

anyway, gotta run to trivia night, thanks folks!

teal bridge
#

...back to my readme, 3 hours later. Maybe I should ask Tia to write it for me under threat of using AI otherwise.

lucid iron
#

Did you set a minimum word count for your readme or something like that?

teal bridge
#

Word count? Now that's just silly, it'd be like setting a minimum LOC count for the code.

#

But I do feel like a readme is supposed to actually explain everything there is to explain about the mod and not just be like "here, I made a mod, install it now and go away"

lucid iron
#

High standards DokkanStare

teal bridge
#

Yeah, I'm a real perfectionist lol

lucid iron
#

Respectable, even if 90% of users don't read

plucky reef
#

If it has two lines in it it's more than most readme files I've seen.

vernal crest
#

Hmmm is there any advantage to loading custom tilesheets into the game? 1. Other mods can edit them... 2. ....

teal bridge
#

(That was intended as flippant; I think I'm pretty far from perfectionism)

#

Er, wouldn't the point of a custom tilesheet be that you want to use tiles from it?

vernal crest
#

Yeah but my map can just pull it from my mod folder

#

I suppose it must get into the game somehow to be visible at all, but I don't know where it ends up if I am not loading it myself

teal bridge
#

Oh, that. It's what you said; loading it into the asset pipeline means other mods can take on the responsibility of compatibility rather than you having to do it for all of them.

lucid iron
#

There's a person here trying to recolor downtown zuzu

#

And they are suffer because dtz did not load their tilesheets

#

So yeah it's best if u do

vernal crest
#

I think that's a good enough reason for me to do it. Okay, time to do some rework before I can advise @lone ice about chairtiles then.

teal bridge
#

Shouldn't be major headache, just a few lines to "register" the asset and changing some refs afterward.

lucid iron
#

When you load it yourself the target is usually Maps/*

lucid iron
#

Or wherever your tmx is

vernal crest
#

Yeah it's easy rework I just wanted to make sure I had a reason for it first and I am an external thinker xD

teal bridge
#

I've started doing it even for my totally not-asset-based mods, like the gift blacklist. I just don't want to have to keep updating the mod to "fix" "bugs" introduced by other mods adding weird items.

lucid iron
#

Oh did you make a custom asset for that DokkanStare

teal bridge
#

It's a json, yeah.

lucid iron
#

I can't think of any mod with notable weird gift/quest thing atm

teal bridge
#

(A json loaded as an asset, I mean)

#

Perhaps not, but I am willing to bet there are many.

lucid iron
#

Maybe the special bouquet for polyamory sweet?

vernal crest
#

Hmm I don't think there's a way I can make my map use a vanilla non-maps tilesheet while preserving mod compatibility for it.

lucid iron
#

Would it work if you climb out of Maps

vernal crest
#

Pretty sure it will complain about directory climbing

lucid iron
#

Yeah hm

round field
#

Hi guys, just wanna ask. Are there any mod tutorials that helps with getting an NPC to show up on Festivals?

vernal crest
round field
#

Thanks guys! I'll check them out.

vernal crest
#

/sigh/ I should really just combine my tilesheets but it will be fiddly and I don't want to >_<

lucid iron
#

What's the non map vanilla tilesheet you wanted?

vernal crest
#

furniture

velvet narwhal
#

oh i just straight up loaded it into maps under a custom .png name

vernal crest
#

Yeah and that is what I am trying to avoid, Avi xD

#

But it is what I will do if I can't find a way around it

lucid iron
#

It's kinda rare for recolor to touch those imo

velvet narwhal
#

SDVpufferclueless if someone else for some strange reason targets "pffffurn" then that's not my problem

lucid iron
#

So eh do what you gotta

vernal crest
#

I want them to be able to target it, Avi

#

Because if someone has a town interior mod that they want to have apply to Hiria's campervan (I certainly would - hiss vanilla) I would like it to be possible without them doing anything.

velvet narwhal
#

oh do you have custom created? or is it just a rip of the regular furniture
oh i see hmmmmmnmnmn

vernal crest
#

It's literally just the vanilla furniture. I have my own tilesheet for stuff I have created (which, yes, would look really out of place if someone had a town interior recolour mod that did somehow affect the vanilla furniture file xD)

#

But shhh

lucid iron
#

The thing you want definitely isn't on townInterior?

finite ginkgo
#

As far as just CP goes, it's just not possible without also asking x recolor to also recolor this new map tilesheet

vernal crest
#

To use a vanilla non-maps tilesheet in a map without loading my own copy of it, you mean Ender?

finite ginkgo
#

Yeah

#

But if you want to venture into C#, it would be pretty easy to add a new asset to the maps folder which copies the texture from the vanilla non maps tilesheet

vernal crest
#

Yeah I didn't think so but it's good to have the confirmation, thanks

calm nebula
#

Nothing ventured nothing gained

vernal crest
#

Maybe if I get far enough down the track that I make recolours of my custom tilesheets I might try that C# approach for the vanilla stuff

finite ginkgo
#

(if you ever want to try it out, should be as easy as just hooking onto the AssetRequested event and doing something like:

private void OnAssetRequested(object? sender, AssetRequestedEventArgs e)
{
    if (e.NameWithoutLocale.Name == "Maps/TilesheetName")
    {
        e.LoadFrom(() => Game1.content.Load<Texture2D>("Vanilla/Asset/Name"), AssetLoadPriority.Exclusive);
    }
}```)
pine ermine
teal bridge
#

(GitHub's previews are super lame, huh?)

pine ermine
#

(It usually works fairly well for repos)

teal bridge
#

Also, for fun, possibly my favorite commit message.

lucid iron
#

the tilesheet path validation is in smapi rather than content patcher or game itself

uncut viper
vernal crest
teal bridge
#

I think most of us use AssetLoadPriority.Low and namespace our asset.

#

Unless that doesn't work with maps or tilesheets for some reason.

lucid iron
#

no ender's idea is fine

#

since that is straight up copying the non Maps tilesheet into Maps

#

i originally thought ban on ../TileSheets/furniture is from game itself rather than smapi

#

though i imagine smapi has this check because game will just explode

vernal crest
#

Ah okay

teal bridge
#

Hmm, it would appear that bombs are giftable, which means they can now be mailed. I'm not sure if I should blacklist those, or keep them as-is for the meme value.

lucid iron
#

i think kent mails you bombs

naive wyvern
#

Thanks for being a good friend to me

Mail content: a bomb