#making-mods-general

1 messages · Page 615 of 1

uncut viper
#

(If SleepFrame is omitted it just defaults to 12)

#

And all the vanilla animals do set it as far as I can tell

late pewter
#

Which, sadly, for chickens, is looking to the left with their eyes open.

uncut viper
#

(Or rather they all have it on their export)

late pewter
#

Huh, the creator of the Kinder chickens mod said they copied the Chicken code verbatem for their mod, but their chickens were also sleeping with their eyes open until I pointed it out.

uncut viper
#

Well the vanilla chickens set it to 16

late pewter
#

Oh interesting

#

Nevermind that last line, then.

uncut viper
#

Assuming you don't do a "clean" unpack then every json in your unpack will always include every possible field that a piece of data can have, fur future reference

#

Sometimes it might just set them to null though because they just do whatever the default is

late pewter
#

Either way, If I had a nickel for every Modded chicken mod I have ever installed where the chickens slept with their eyes open, I would have 4 nickels.

uncut viper
#

Enough to grab a joja cola from a vending machine

#

Ignore the fact that I was confusing nickels with quarters when I typed that

ornate drift
#

okay movie theater is really confusing holy shit

torpid sparrow
scarlet temple
#

What would be the syntax to load a certain mod after "low" or "late" priorities?

#

Basically making it last.

torpid sparrow
#

late + 100

#

late + 10000000

#

late + 10000000000000

scarlet temple
#

Ooh, did not know it works like that, thank you.

#

The more you learn I guess

ornate drift
#

oh hey movie theaters have an event script

#

noice

torpid sparrow
ornate drift
#

just looking atm

torpid sparrow
#

it's not too bad just lots of stuff to edit

ornate drift
#

trying to replicate a script

torpid sparrow
#

r u changing the event script?

#

cause the dialogue is pretty straightforward just annoying

ornate drift
#

yeah editdata

torpid sparrow
#

hmm i dont know if anybody's edited the event script before

devout otter
#

I wonder if we could actually make the NPC run around the theater or something.

torpid sparrow
#

LOL

ornate drift
#

response is the reaction of the npc during the movie right?

torpid sparrow
#

yes

barren tapir
#

BTW - I fixed the bug in vanilla SV regarding ice rods

ornate drift
#

(realistically Manny would only care about the food)

floral python
#

lol

torpid sparrow
#

or just

#

NYAMNYAMNYAMNYAM

ornate drift
#

actually yeah

torpid sparrow
#

i forgot how much dialogue is actually involved for movies

#

i cant remember if there's a line before

#

before, during, and after?

ornate drift
#
        "Tag": "spring_movie_0",
        "Response": "like",
        "Whitelist": [],
        "SpecialResponses": {
          "BeforeMovie": {
            "ResponsePoint": null,
            "Script": null,
            "Text": "What movie are we watching?#$b#Is the food any good?"
          },
          "DuringMovie": {
            "ResponsePoint": null,
           "Script": null,
            "Text": "Aww, they look so tiny!$1"
          },
          "AfterMovie": {
            "ResponsePoint": null,
            "Script": null,
            "Text": "That sapling was adorable!$1#b#Thank you for inviting me."
          }
        },
        "Id": "reaction_1"
      },```
#

this should be it

#

what is the ID at the bottom used for though?

latent mauve
#

Per the wiki: A unique identifier in the form of reaction_<index>, where <index> is, counting from 0, what number block this is within the Reactions list.

#

so reaction_1 means it's the first reaction block in their list of all possible responses to any movie.

ornate drift
#

an NPC can have multiple responses to the same movie?

latent mauve
#

The movie you respond to is inside the data model, so the reaction ID/identifier is technically read before that.

#

It's just how the game knows that each block is different

#

So reaction_1 might be for Brave Little Sapling, and reaction_2 might be for a liked movie, etc.

ornate drift
#

ohhh

#

okok

#

ty

latent mauve
#

I was trying to think of a better way to explain it, LOL

#

You could technically make multiple responses for the same movie as well if you wanted, but the reaction ID isn't relevant to that.

#

(Like how Penny has a special response if Pam is there too)

floral python
#

are npc schedules are already set before DayStarted? figuring out when to remove a mail flag

latent mauve
#

Fast mods today, I didn't even have time to ping!

scarlet temple
#

@torpid sparrow so setting a mod's priority to "Late + 100000" did not make it load after another mod that was set to "Late", would I have to set that other mod to "Late + 10" to make it load before the 100000 one?

latent mauve
scarlet temple
#

Would the dependency have to be for SVE then? Or the other mod?

uncut viper
#

A false dependency will make the mod load first but it will not alter the order of patches if the other mod is using priority

#

But in the absence of any and all priorities set specifically, a false dependency does determine the order in which patches apply

#

If you set a dependency on another mod (false or otherwise), your mod will always load after the dependency

scarlet temple
#

So it'll load SVE first if I set the dependency in the mod I'm editing

uncut viper
#

Also, in case you might be confusing them, Load patches use a different priority system than EditData patches

scarlet temple
#

Ahah, that might be the case then

uncut viper
#

It will load SVE first, yes. But if SVE has any patches that specifically set their priority to "Late" then they will still apply after your mod if you are just using default priorities

scarlet temple
#

From a quick search, SVE doesn't have anything set to Late except for portraits

#

I actually didn't know load and editdata had different priority lists, this helps

uncut viper
#

Load: Low, Medium, High
EditData/EditImage/EditMap: Early, Default, Late

#

All of them can have numbers added on like Wem showed

scarlet temple
#

Any way to just fully override, or is it just priority lists? I can't get the SVE portrait to be overwritten

devout otter
#

If SVE's Load doesn't have priority, then you can't override it with your Load. You'd need to Edit instead.

latent mauve
#

Is the string where Jas and Vincent win the egg hunt by combining their eggs unused in the base game? (Event.cs.1862)

#

(want to double check before I go and make a personal mod to let the kids win, LOL)

uncut viper
scarlet temple
#

Would this be specific per-character then for the portraits? They're set to Load and Low for portraits and sprites.

#

In SVE

#

So I'm assuming the EditData would be executed after the Load actions? Or is that irrelevant?

uncut viper
#

If they have a priority of Low then you can override them with a higher priority

#

All Load patches are applied before any EditWhatever patches

scarlet temple
#

Ah, so set the SVE Low priorities to High and then the EditData patches would overwrite those?

uncut viper
#

Any EditData patch is already applied on top of any Load

scarlet temple
#

Oh, I misread it then

uncut viper
#

Only a single Load for any asset is ever chosen to be used. All edits are then applied to whatever the chosen Load is

safe badge
#

Hey, anyone willing to look over some code for me? Making my first mod…

scarlet temple
#

Hmmm, then something must be off with the EditImage stuff

devout otter
#

So for example, first you Load an image, right. When two different mods tries to Load to the same asset, the game would basically choose only one of them, the one with the highest priority. And then if there's an EditImage for that asset, the game would put it on top of the loaded asset. If there's multiple EditImage for that asset, the game would apply them all in order or priority, Early to Late.

scarlet temple
#

Can EditImage not have a priority?

ornate locust
#

Yes

scarlet temple
#

That would then make it default?

devout otter
#

It can not have a Priority field, but the game would still order-priority them based on various factor.

devout otter
uncut viper
#

(to be clear: you CAN omit the priority for editimage, not "it is unable to have one at all")

scarlet temple
#

So I can still include a priority then even if it has none.

uncut viper
#

Correct, you can add a Priority line to any patch

#

Well, you can add it to your own patches. Can't give a different mod a different priority for one of its patches unless you edit their mod yourself

devout otter
#

An Edit__ action with no priority field defaults to Default. A Load action with no priority field defaults to Exclusive.

#

(If you want to check if your patch apply, you can try putting it into SMAPI log.)

scarlet temple
#

Does Update matter then if it's set to OnLocationChange? The mod I'm changing has Load priority set to Early at the bottom, with the update under it

#

(I'm sorry if I'm getting a bit annoying here, SVD modding is fresh to me)

barren tapir
#

I'm almost done the modified anvil logic for the vanilla trinkets (minus the basilisk paw)! I just need to handle the frog egg.

Currently, the stats of trinkets are rerolled a certain number of times, and whichever trinket is best is the anvil output!

I was originally going to add a config option to set that number, but very quickly realized that certain trinkets would need more rerolls than others (the fairy box and quiver being prime examples).

So, I instead plan on adding a checkbox to (almost) guarantee perfect trinkets (it'll multiply the number of rerolls by 100)

still osprey
#

Hello, I'm hoping someone could help me!
Im looking to convert a custom animal mod that was made before the 1.6 overhaul. The mod uses BFAV, JA, and PFM. Are there any guides or tutorials on how to migrate from these?
Thanks!

verbal glacier
#

!converters

still osprey
#

Thank you!

barren tapir
#

After I have some dinner, I'm going to finish adding some config options related to the anvil, then I want to tackle the mannequin logic

#

I asked this earlier, but I don't think I ever got a response. How does the game determine the color of dyeable clothes dropped from monsters?

torpid sparrow
#

just realized i will eventually have to make a minimap and tooltips and stuff for expansion map

#

problem for future wem but she's going to be soooo upset about it

barren tapir
ornate locust
barren tapir
#

Yeah, that one!

half tangle
barren tapir
#

Huh

#

I could've sworn they were dyed.

Whelp, less work for me then!

#

I play my uno reverse card on you, scope creep!

#

Scope creep retaliated with "New Trinket and lore idea"

#

It was super effective

#

I feel like with every new thing I add, I both stray further and further away from an add-on mod that "just adds more books", as well as stretch what constitutes a book a little further.

It's also ironic, bc this add on is way bigger than the original mod at this point

fair totem
#

Hello, I'm trying to make a mod that adds 3 skins to birdb's alpacas. I basically followed the format of another mod, and it seems to match other things here people are posting, but SMAPI keeps giving me this message:

[Content Patcher] Can't apply data patch "Alpaca Facelift - Skins > Alpaca Skin - cream" to Data/FarmAnimals: the field 'Alpaca' doesn't match an existing target

The seemingly offending section:

       "LogName": "Alpaca Skin - cream",
       "Action": "EditData",
       "Target": "Data/FarmAnimals",
       "TargetField": ["Alpaca", "Skins"],
       "Entries": {
       "emjess.AlpacaFacelift_alpaca_cream": {
           "Id": "emjess.AlpacaFacelift_alpaca_cream",
               "Texture": "Mods\\emjess.AlpacaFacelift\\alpaca\\cream",
               "BabyTexture": "Mods\\emjess.AlpacaFacelift\\alpaca\\cream_baby",
               "HarvestedTexture": "Mods\\emjess.AlpacaFacelift\\alpaca\\cream_sheared",
               "Weight": "1.0",
               },
           },
       "When": {"Alpaca Skins": "cream"},
   },```
This happens even when I change the TargetField to birdb.CP.Alpaca_Alpaca
orchid glade
#

Have you done an export of Data/FarmAnimals to check the entry?

brittle pasture
#

Alpaca is the correct ID (just checked)
did you add a false dependency to the Alpacas mod?

orchid glade
#

(And are you testing with the alpaca mod installed)

fair totem
#

I don't think so? At least I don't know how I would have since I don't know what this is

#

yes i have it installed

brittle pasture
#

a dependency makes it so that your edits apply after theirs

orchid glade
#

(Just checking)

brittle pasture
#

currently SMAPI is likely loading your mod before Alpacas, so the Alpaca farm animal doesn't exist when your mod loads

fair totem
#

no dependencies!

#

OH could I use one to make mine load after the Alpaca mod?

brittle pasture
#

a "false" dependency means your mod doesn't strictly require Alpacas to function; if this mod just retextures the alpaca feel free to make it a "true" dependency

#

yes

fair totem
#

That worked! Thank you so much

barren tapir
#

I've got the pants and shirt logic working!

#

The boot logic was throwing an error, so I disabled it. Depending on what happens with work, I plan on fixing it tomorrow

#

This means that the brunt of my remaining TODO list before I'm allowing myself to add more books is going to be monster logic and figuring out the spike shooting class. Of those, the spike shooting class is almost certainly going to be the more difficult one to figure out

signal nova
#

How do I set the minimum required fishing level in order for a fish to be caught?

brittle pasture
vernal crest
#

Hey just wanted to check if you saw Esca's response to this in the support thread? I'm not sure if you're in there and pings don't work if you aren't already there

slim marlin
#

Does anyone have a written tutorial for making a mod page? I think I will publish the eel mod I made. I see there is a video tutorial but I learn better when it's written.

proven spindle
#

hmm i should probably update the mod page section in modder's pie

#

most of what's in there should be the same other than what buttons/tabs you click on tho

slim marlin
#

Oh great! I'll follow that then.

fierce vault
#

I think I finally get Trello now

#

It’s great for keeping track of all the things I plan to update my mod with

#

It was harder for me to get into before I had a finished mod. I think I better understand now how I want to describe my goals in each card. I didn’t really get into it when I was adding a ton of basic first steps to accomplish, but the more niche, fix this issue and add this mechanic when the mod’s foundation was already there helped me get into it.

#

I’m actually going to remember what to add and what to put in my update notes

fast plaza
#

hey guys, i want to learn how to mod for some things in SV
but I wanted to know, what would be more difficult? character portraits (for an already existing mod, I just want to offer and alternative portrait) or a customizable scarecrow?

#

with customizable I mean, I create a new type of scarecrow for the game, not that is like a character customization mod

royal stump
#

adding an extra scarecrow can be done too (iirc), it just also involves creating new item data & adding it to a shop or some such

half tangle
royal stump
#

SDVpufferheart cool, I couldn't remember if anything was still hardcoded with those

half tangle
#

yeah, much simpler now. You can even customize the radius with the context tag crow_scare_radius_<radius>

#

(else it just uses the default)

fast plaza
royal stump
#

e.g. custom NPCs added by other mods just have image targets like Portraits/Author.ModName_MyCharacter instead of Portraits/Abigail

#

(the portrait-swapping mod would probably have a guide in its description, if needed, but somebody else here will probably know about it too)

fast plaza
royal stump
#

you can open up the custom NPC mod's own content.json and look for the right target, once you've got things set up