Allow alternate livestock (farm animal) vendors, revamp livestock menu.
To add a custom livestock vendor, add entry to Data/FarmAnimals
normally, then:
- Add
Data/FarmAnimals
CustomFields entry"mushymato.LivestockBazaar/BuyFrom.{{ModId}}_MyVendor": true
to the farm animal.{{ModId}}_MyVendor
is value that will be referred to asshopName
in following parts of this guide. Prefix this with your mod id when your vendor is a vanilla NPC. - (Optional) Add CustomFields entry
"mushymato.LivestockBazaar/BuyFrom.Marnie": false
to prevent Marnie from selling this animal. Marnie is the special hardcodedshopName
this mod uses to refer to the vanilla animal shop. Unlike all otherBuyFrom
fields,BuyFrom.Marnie
defaults totrue
and need to be explicitly set to false. - Use map tile action
mushymato.LivestockBazaar_Shop
to create a shop.
Usage: mushymato.LivestockBazaar_Shop \<shopName\> [direction] [openTime] [closeTime] [ownerRect: [X] [Y] [Width] [Height]]
The arguments of this tile action is identical to "OpenShop" from vanilla.
shopName
: Name of shopdirection
: Which direction of the tile is valid for interaction, one ofdown
,up
,left
,right
for direction, orany
to allow interaction from all directions.openTime
:0600
time code format for shop open time, or -1 to skip.closeTime
:2200
time code format for shop close time, or -1 to skipownerRect
: 4 consecutive number arguments forX
,Y
,Width
,Height
of a rectangle. If defined, there must be amushymato.LivestockBazaar/Shops
entry for"shopName"
, and that NPC must be within this rectangle in order to open the shop. Must specify all 4 arguments, or none of them.
Asset defining the properties of a LivestockBazaar shop. Accepts all fields in Data/Shops, as well as:
Property | Type | Default | Notes |
---|---|---|---|
BazaarOpenFlag |
OpenFlagType | "Stat" | What flag will allow this shop to ignore open/close time and owner checks.
|
BazaarOpenKey |
string | "Book_AnimalCatalogue" | Key to use with BazaarOpenFlag . The default values combined makes the shop always open once the player has read the Animal Catalogue book. |
Making one of these is mandatory if your shop owner is a real NPC and need to be checked for with ownerRect
.