Difference between revisions of "Modding:Blueprint data"

From Stardew Valley Wiki
Jump to navigation Jump to search
Line 55: Line 55:
 
! index
 
! index
 
! field
 
! field
 +
! type
 
! example
 
! example
 
! explanation
 
! explanation
Line 77: Line 78:
 
| <tt>itemsRequired</tt>
 
| <tt>itemsRequired</tt>
 
| ''388 350 390 150''
 
| ''388 350 390 150''
 +
| int int
 
| The items required for purchase, consisting of {{t|item ID}} {{t|amount}} pairs. The example specifies 350 Wood (item ID 338) and 150 Stone (item ID 390).
 
| The items required for purchase, consisting of {{t|item ID}} {{t|amount}} pairs. The example specifies 350 Wood (item ID 338) and 150 Stone (item ID 390).
 
|-
 
|-
 
| 1
 
| 1
 
| <tt>tilesWidth</tt>
 
| <tt>tilesWidth</tt>
 +
| int
 
| ''7''
 
| ''7''
 
| The number of tiles ''wide''(''x'') the building will be when placed on a map. This does not change the size of the image placed, but rather the "walkable" area.
 
| The number of tiles ''wide''(''x'') the building will be when placed on a map. This does not change the size of the image placed, but rather the "walkable" area.
Line 86: Line 89:
 
| 2
 
| 2
 
| <tt>tilesHeight</tt>
 
| <tt>tilesHeight</tt>
 +
| int
 
| ''4''
 
| ''4''
 
| The number of tiles ''high''(''y'') the building will be when placed on a map. This does not change the size of the image placed, but rather the "walkable" area.
 
| The number of tiles ''high''(''y'') the building will be when placed on a map. This does not change the size of the image placed, but rather the "walkable" area.
Line 91: Line 95:
 
| 3
 
| 3
 
| <tt>humanDoor</tt>
 
| <tt>humanDoor</tt>
 +
| int
 
| ''1''
 
| ''1''
 
| ''x'' location, in tiles, of the clickable ''human'' door.
 
| ''x'' location, in tiles, of the clickable ''human'' door.
Line 96: Line 101:
 
| 4
 
| 4
 
| <tt>humanDoor</tt>
 
| <tt>humanDoor</tt>
 +
| int
 
| ''3''
 
| ''3''
 
| ''y'' location, in tiles, of the clickable ''human'' door.
 
| ''y'' location, in tiles, of the clickable ''human'' door.
Line 101: Line 107:
 
| 5
 
| 5
 
| <tt>animalDoor</tt>
 
| <tt>animalDoor</tt>
 +
| int
 
| ''3''
 
| ''3''
 
| ''x'' location, in tiles, of the clickable ''animal'' door.
 
| ''x'' location, in tiles, of the clickable ''animal'' door.
Line 106: Line 113:
 
| 6
 
| 6
 
| <tt>animalDoor</tt>
 
| <tt>animalDoor</tt>
 +
| int
 
| ''3''
 
| ''3''
 
| ''y'' location, in tiles, of the clickable ''animal'' door.
 
| ''y'' location, in tiles, of the clickable ''animal'' door.
Line 111: Line 119:
 
| 7
 
| 7
 
| <tt>mapToWarpTo</tt>
 
| <tt>mapToWarpTo</tt>
 +
| string
 
| ''Barn''
 
| ''Barn''
 
|  
 
|  
Line 116: Line 125:
 
| 8
 
| 8
 
| <tt>displayName</tt>
 
| <tt>displayName</tt>
 +
| string
 
| ''Barn''
 
| ''Barn''
 
|  
 
|  
Line 121: Line 131:
 
| 9
 
| 9
 
| <tt>description</tt>
 
| <tt>description</tt>
 +
| string
 
| ''Houses 4 barn-dwelling animals.''
 
| ''Houses 4 barn-dwelling animals.''
 
| The description of the building used in locations such as the ''Carpenter's Menu''.
 
| The description of the building used in locations such as the ''Carpenter's Menu''.
Line 126: Line 137:
 
| 10
 
| 10
 
| <tt>blueprintType</tt>
 
| <tt>blueprintType</tt>
 +
| string
 
| ''Buildings''
 
| ''Buildings''
 
| Type of BluePrint. The current (as of 1.2.29) types are: {{t|Buildings}} {{t|Upgrades}} {{t|Decorations}} {{t|Demolish}} {{t|Animals}} though, currently, only {{t|Buildings}} {{t|Upgrades}} and {{t|Animals}} are used in code.
 
| Type of BluePrint. The current (as of 1.2.29) types are: {{t|Buildings}} {{t|Upgrades}} {{t|Decorations}} {{t|Demolish}} {{t|Animals}} though, currently, only {{t|Buildings}} {{t|Upgrades}} and {{t|Animals}} are used in code.
Line 131: Line 143:
 
| 11
 
| 11
 
| <tt>nameOfBuildingToUpgrade</tt>
 
| <tt>nameOfBuildingToUpgrade</tt>
 +
| string
 
| ''none''
 
| ''none''
| Only used for {{t|Upgrades}} BluePrint types. This allows you to choose which building you want to replace/upgrade.
+
| Only used for {{t|Upgrades}} BluePrint types. This allows you to choose which building/blueprint you want to replace/upgrade.
 
|-
 
|-
 
| 12
 
| 12
 
| <tt>sourceRectForMenuView</tt>
 
| <tt>sourceRectForMenuView</tt>
 +
| int
 
| ''96''
 
| ''96''
 
|  
 
|  
Line 141: Line 155:
 
| 13
 
| 13
 
| <tt>sourceRectForMenuView</tt>
 
| <tt>sourceRectForMenuView</tt>
 +
| int
 
| ''96''
 
| ''96''
 
|  
 
|  
Line 156: Line 171:
 
| 16
 
| 16
 
| <tt>namesOfOkBuildingLocations</tt>
 
| <tt>namesOfOkBuildingLocations</tt>
 +
| string
 
| ''Farm''
 
| ''Farm''
| Game Locations where this building is allowed to build. The game only uses {{t|Farm}.
+
| Game Locations where this building is allowed to build. The game only uses {{t|Farm} and as far a I can tell it's never used.
 
|-
 
|-
 
| 17
 
| 17
 
| <tt>moneyRequired</tt>
 
| <tt>moneyRequired</tt>
 +
| int
 
| ''6000''
 
| ''6000''
 
| Amount of money required to purchase from the Carpenter.
 
| Amount of money required to purchase from the Carpenter.
Line 166: Line 183:
 
| 18
 
| 18
 
| <tt>magical</tt>
 
| <tt>magical</tt>
 +
| boolean
 
| ''false''
 
| ''false''
 
| Allow the building will build instantly/magically.
 
| Allow the building will build instantly/magically.

Revision as of 17:37, 4 May 2017

Index

Axe.png
Article Stub

This article is a stub and is missing information. You can help Stardew Valley Wiki by expanding it!

This page explains how the game uses blueprints to construct buildings. This is an advanced guide for mod developers.

Data

Raw data

Blueprints are stored in Content\Data\Blueprints.xnb, which can be unpacked using XNB Extract. Here's the raw data (as of 1.2.29) for reference:

Code 
content:  #!Dictionary<String,String>
    Silo: "390 100 330 10 334 5/3/3/-1/-1/-2/-1/null/Silo/Allows you to cut and store grass for feed./Buildings/none/48/128/-1/null/Farm/100/false" #!String
    Mill: "388 150 390 50 428 4/4/2/-1/-1/-2/-1/null/Mill/Allows you to create flour from wheat and sugar from beets./Buildings/none/64/128/-1/null/Farm/2500/false" #!String
    Earth Obelisk: "337 10 86 10/3/3/-1/-1/-2/-1/null/Earth Obelisk/Warps you to the mountains./Buildings/none/48/128/-1/null/Farm/1000000/true" #!String
    Water Obelisk: "337 5 372 10 393 10/3/3/-1/-1/-2/-1/null/Water Obelisk/Warps you to the beach./Buildings/none/48/128/-1/null/Farm/1000000/true" #!String
    Junimo Hut: "390 200 268 9 771 100/3/2/-1/-1/-2/-1/null/Junimo Hut/Junimos will harvest crops around the hut for you./Buildings/none/48/64/-1/null/Farm/20000/true" #!String
    Gold Clock: "/3/2/-1/-1/-2/-1/null/Gold Clock/Prevents debris from appearing on your farm. Keeps fences from decaying./Buildings/none/48/80/-1/null/Farm/10000000/true" #!String
    Stable: "709 100 335 5/4/2/-1/-1/-2/-1/null/Stable/Allows you to keep and ride a horse. Horse included./Buildings/none/64/96/-1/null/Farm/10000/false" #!String
    Well: "390 75/3/3/-1/-1/-1/-1/null/Well/Provides a place for you to refill your watering can./Buildings/none/48/80/-1/null/Farm/1000/false" #!String
    Coop: "388 300 390 100/6/3/1/2/2/2/Coop/Coop/Houses 4 coop-dwelling animals./Buildings/none/64/96/4/null/Farm/4000/false" #!String
    Big Coop: "388 400 390 150/6/3/1/2/2/2/Coop2/Big Coop/Houses 8 coop-dwelling animals. Comes with an incubator. Unlocks ducks./Upgrades/Coop/64/96/8/null/Farm/10000/false" #!String
    Deluxe Coop: "388 500 390 200/6/3/1/2/2/2/Coop3/Deluxe Coop/Houses 12 coop-dwelling animals. Comes with an auto-feed system. Unlocks rabbits./Upgrades/Big Coop/64/96/12/null/Farm/20000/false" #!String
    Barn: "388 350 390 150/7/4/1/3/3/3/Barn/Barn/Houses 4 barn-dwelling animals./Buildings/none/96/96/4/null/Farm/6000/false" #!String
    Big Barn: "388 450 390 200/7/4/1/3/4/3/Barn2/Big Barn/Houses 8 barn-dwelling animals. Allows animals to give birth. Unlocks goats./Upgrades/Barn/96/96/8/null/Farm/12000/false" #!String
    Deluxe Barn: "388 550 390 300/7/4/1/3/4/3/Barn3/Deluxe Barn/Houses 12 barn-dwelling animals. Comes with an auto-feed system. Unlocks sheep and pigs./Upgrades/Big Barn/96/96/12/null/Farm/25000/false" #!String
    Slime Hutch: "390 500 338 10 337 1/11/6/5/5/-1/-1/SlimeHutch/Slime Hutch/Raise up to 20 slimes. Fill water troughs and slimes will create slime balls./Buildings/none/96/96/20/null/Farm/10000/false" #!String
    Shed: "388 300/7/3/3/2/-1/-1/Shed/Shed/An empty building. Fill it with whatever you like! The interior can be decorated./Buildings/none/96/96/20/null/Farm/15000/false" #!String
    Greenhouse: "388 500 390 200 337 1/4/2/2/1/-1/-1/FarmGreenHouse/Greenhouse/A place to grow crops from any season, year round!/Buildings/none/64/96/-1/null/Farm" #!String
    Mine Elevator: "388 30 390 15 334 5/4/2/1/1/-1/-1/null/Mine Elevator/Quickly travel between any mine elevators you construct. You can only build one per mine level./Buildings/none/64/64/-1/MineElevator/UndergroundMine" #!String
    Chicken: "animal/500/64/64/Chicken/Lays delicious eggs. Comes in two colors./null/Farm" #!String
    Duck: "animal/1000/64/64/Duck/Lays eggs and occasionally drops feathers./null/Farm" #!String
    Rabbit: "animal/1500/64/64/Rabbit/These are wooly rabbits!/null/Farm" #!String
    Cow: "animal/1000/64/96/Cow/Produces rich, creamy milk./null/Farm" #!String
    Sheep: "animal/1500/64/96/Sheep/Can be sheared for valuable wool./null/Farm" #!String
    Goat: "animal/1500/64/96/Goat/Produces tasty goat's milk!/null/Farm" #!String
    Pig: "animal/2000/64/96/Pig/These are specially trained to find truffles./null/Farm" #!String

Format

The file contains data fields delimited by /, with two formats:

  • Animal buildings (denoted by the first field being animal), like this entry:
    Chicken: "animal/500/64/64/Chicken/Lays delicious eggs. Comes in two colors./null/Farm"
    

    The fields for animal buildings are...

    index field type example explanation
    TODO
  • Any other entry, like this one:
    Barn: "388 350 390 150/7/4/1/3/3/3/Barn/Barn/Houses 4 barn-dwelling animals./Buildings/none/96/96/4/null/Farm/6000/false"
    
    index field example explanation
    0 itemsRequired 388 350 390 150 int int The items required for purchase, consisting of <item ID> <amount> pairs. The example specifies 350 Wood (item ID 338) and 150 Stone (item ID 390).
    1 tilesWidth int 7 The number of tiles wide(x) the building will be when placed on a map. This does not change the size of the image placed, but rather the "walkable" area.
    2 tilesHeight int 4 The number of tiles high(y) the building will be when placed on a map. This does not change the size of the image placed, but rather the "walkable" area.
    3 humanDoor int 1 x location, in tiles, of the clickable human door.
    4 humanDoor int 3 y location, in tiles, of the clickable human door.
    5 animalDoor int 3 x location, in tiles, of the clickable animal door.
    6 animalDoor int 3 y location, in tiles, of the clickable animal door.
    7 mapToWarpTo string Barn
    8 displayName string Barn
    9 description string Houses 4 barn-dwelling animals. The description of the building used in locations such as the Carpenter's Menu.
    10 blueprintType string Buildings Type of BluePrint. The current (as of 1.2.29) types are: <Buildings> <Upgrades> <Decorations> <Demolish> <Animals> though, currently, only <Buildings> <Upgrades> and <Animals> are used in code.
    11 nameOfBuildingToUpgrade string none Only used for <Upgrades> BluePrint types. This allows you to choose which building/blueprint you want to replace/upgrade.
    12 sourceRectForMenuView int 96
    13 sourceRectForMenuView int 96
    14 maxOccupants 4 Max Number of Animals allowed to be placed in the building.
    15 actionBehavior null
    16 namesOfOkBuildingLocations string Farm Farm} and as far a I can tell it's never used.
    17 moneyRequired int 6000 Amount of money required to purchase from the Carpenter.
    18 magical boolean false Allow the building will build instantly/magically.