Line 5: |
Line 5: |
| This page explains how the game uses blueprints to construct buildings. This is an advanced guide for mod developers. | | This page explains how the game uses blueprints to construct buildings. This is an advanced guide for mod developers. |
| | | |
− | ==Data==
| + | ==Raw data== |
− | ===Raw data===
| + | Blueprint data is stored in <samp>Content\Data\Blueprints.xnb</samp>, which can be [[Modding:Editing XNB files#unpacking|unpacked for editing]]. Here's the raw data as of {{version|1.5.1}} for reference: |
− | Blueprints are stored in <tt>Content\Data\Blueprints.xnb</tt>, which can be [[Modding:Creating an XNB mod#unpacking|unpacked using XNB Extract]]. Here's the raw data (as of 1.2.29) for reference:
| |
| | | |
− | {{collapse|Code|content=<source lang="yaml"> | + | {{collapse|Data|content=<syntaxhighlight lang="json"> |
− | 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
| + | "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", |
− | 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
| + | "Mill": "388 150 390 50 428 4/4/2/-1/-1/-2/-1/null/Mill/Allows you to mill wheat, beets and rice./Buildings/none/64/128/-1/null/Farm/2500/false", |
− | 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
| + | "Earth Obelisk": "337 10 86 10/3/2/-1/-1/-2/-1/null/Earth Obelisk/Warps you to the mountains./Buildings/none/48/128/-1/null/Farm/500000/true", |
− | 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
| + | "Water Obelisk": "337 5 372 10 393 10/3/2/-1/-1/-2/-1/null/Water Obelisk/Warps you to the beach./Buildings/none/48/128/-1/null/Farm/500000/true", |
− | 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
| + | "Desert Obelisk": "337 20 88 10 90 10/3/2/-1/-1/-2/-1/null/Desert Obelisk/Warps you to the desert./Buildings/none/48/128/-1/null/Farm/1000000/true", |
− | 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
| + | "Island Obelisk": "337 10 852 10 91 10/3/2/-1/-1/-2/-1/null/Island Obelisk/Warps you to Ginger Island./Buildings/none/48/128/-1/null/Farm/1000000/true", |
− | 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
| + | "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", |
− | 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
| + | "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", |
− | 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
| + | "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", |
− | 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
| + | "Well": "390 75/3/3/-1/-1/-1/-1/null/Well/Provides a place for you to refill your watering can./Buildings/none/32/32/-1/null/Farm/1000/false", |
− | 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
| + | "Shipping Bin": "388 150/2/1/-1/-1/-1/-1/null/Shipping Bin/Throw items inside to sell them overnight./Buildings/none/48/80/-1/null/Farm/250/false/0", |
− | 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
| + | "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", |
− | 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
| + | "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", |
− | 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
| + | "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", |
− | 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
| + | "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", |
− | 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
| + | "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", |
− | 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
| + | "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", |
− | 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
| + | "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", |
− | Chicken: "animal/500/64/64/Chicken/Lays delicious eggs. Comes in two colors./null/Farm" #!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", |
− | Duck: "animal/1000/64/64/Duck/Lays eggs and occasionally drops feathers./null/Farm" #!String
| + | "Big Shed": "388 550 390 300/7/3/3/2/-1/-1/Shed2/Big Shed/Doubles the size of the shed. The interior can be decorated./Upgrades/Shed/96/96/20/null/Farm/20000/false", |
− | Rabbit: "animal/1500/64/64/Rabbit/These are wooly rabbits!/null/Farm" #!String
| + | "Stone Cabin": "390 10/5/3/2/1/-1/-1/Cabin/Cabin/A home for a friend! Subsidized by the town agricultural fund./Buildings/none/96/96/20/null/Farm/100/false/0", |
− | Cow: "animal/1000/64/96/Cow/Produces rich, creamy milk./null/Farm" #!String
| + | "Plank Cabin": "388 5 771 10/5/3/2/1/-1/-1/Cabin/Cabin/A home for a friend! Subsidized by the town agricultural fund./Buildings/none/96/96/20/null/Farm/100/false/0", |
− | Sheep: "animal/1500/64/96/Sheep/Can be sheared for valuable wool./null/Farm" #!String
| + | "Log Cabin": "388 10/5/3/2/1/-1/-1/Cabin/Cabin/A home for a friend! Subsidized by the town agricultural fund./Buildings/none/96/96/20/null/Farm/100/false/0", |
− | Goat: "animal/1500/64/96/Goat/Produces tasty goat's milk!/null/Farm" #!String
| + | "Greenhouse": "/7/6/3/5/-1/-1/null/Greenhouse/A place to grow crops from any season, year round!/Buildings/none/64/96/-1/null/Farm/-1/false/0/2 6 3 6 4 6 2 7 3 7 4 7", |
− | Pig: "animal/2000/64/96/Pig/These are specially trained to find truffles./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", |
− | </source> | + | "Fish Pond": "390 200 152 5 153 5/5/5/-1/-1/-2/-1/null/Fish Pond/Raise fish and harvest their produce. Fish multiply over time./Buildings/none/76/78/10/null/Farm/5000/false/2", |
− | }} | + | "Chicken": "animal/500/64/64/Chicken/Lays delicious eggs. Comes in two colors./null/Farm", |
| + | "Duck": "animal/1000/64/64/Duck/Lays eggs and occasionally drops feathers./null/Farm", |
| + | "Rabbit": "animal/1500/64/64/Rabbit/These are wooly rabbits!/null/Farm", |
| + | "Cow": "animal/1000/64/96/Cow/Produces rich, creamy milk./null/Farm", |
| + | "Sheep": "animal/1500/64/96/Sheep/Can be sheared for valuable wool./null/Farm", |
| + | "Goat": "animal/1500/64/96/Goat/Produces tasty goat's milk!/null/Farm", |
| + | "Pig": "animal/2000/64/96/Pig/These are specially trained to find truffles./null/Farm" |
| + | } |
| + | </syntaxhighlight>}} |
| | | |
− | ===Format===
| + | ==Format== |
| The file contains data fields delimited by <code>/</code>, with two formats: | | The file contains data fields delimited by <code>/</code>, with two formats: |
| | | |
| <ul> | | <ul> |
− | <li>Animal buildings (denoted by the first field being <tt>animal</tt>), like this entry: | + | <li>Animal buildings (denoted by the first field being <samp>animal</samp>), like this entry: |
| | | |
− | <source lang="yaml"> | + | <syntaxhighlight lang="json"> |
− | Chicken: "animal/500/64/64/Chicken/Lays delicious eggs. Comes in two colors./null/Farm" | + | "Chicken": "animal/500/64/64/Chicken/Lays delicious eggs. Comes in two colors./null/Farm" |
− | </source> | + | </syntaxhighlight> |
| | | |
| The fields for animal buildings are... | | The fields for animal buildings are... |
Line 55: |
Line 62: |
| ! index | | ! index |
| ! field | | ! field |
| + | ! type |
| ! example | | ! example |
| ! explanation | | ! explanation |
| |- | | |- |
− | |colspan="4"| TODO | + | | 0 |
| + | | <samp>null</samp> |
| + | | string |
| + | | ''animal'' |
| + | | Used by the code to denote it's an animal type BluePrint. |
| + | |- |
| + | | 1 |
| + | | <samp>moneyRequired</samp> |
| + | | int |
| + | | ''500'' |
| + | | The amount required to purchase. |
| + | |- |
| + | | 2 |
| + | | <samp>sourceRectForMenuView</samp> |
| + | | int |
| + | | ''64'' |
| + | | |
| + | |- |
| + | | 3 |
| + | | <samp>sourceRectForMenuView</samp> |
| + | | int |
| + | | ''64'' |
| + | | |
| + | |- |
| + | | 4 |
| + | | <samp>displayName</samp> |
| + | | string |
| + | | ''Chicken'' |
| + | | |
| + | |- |
| + | | 5 |
| + | | <samp>description</samp> |
| + | | string |
| + | | ''Lays delicious eggs. Comes in two colors.'' |
| + | | The description of the animal. |
| + | |- |
| + | | 6 |
| + | | <samp></samp> |
| + | | |
| + | | ''null'' |
| + | | Unused by the code. |
| + | |- |
| + | | 7 |
| + | | <samp></samp> |
| + | | |
| + | | ''Farm'' |
| + | | Unused by the code. |
| |}</li> | | |}</li> |
| | | |
| <li>Any other entry, like this one: | | <li>Any other entry, like this one: |
| | | |
− | <source lang="yaml"> | + | <syntaxhighlight lang="json"> |
− | 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" | + | "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" |
− | </source> | + | </syntaxhighlight> |
| | | |
| {| class="wikitable" | | {| class="wikitable" |
Line 76: |
Line 130: |
| |- | | |- |
| | 0 | | | 0 |
− | | <tt>itemsRequired</tt> | + | | <samp>itemsRequired</samp> |
| + | | int int |
| | ''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 388) 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> | + | | <samp>tilesWidth</samp> |
| | int | | | int |
| | ''7'' | | | ''7'' |
Line 88: |
Line 142: |
| |- | | |- |
| | 2 | | | 2 |
− | | <tt>tilesHeight</tt> | + | | <samp>tilesHeight</samp> |
| | int | | | int |
| | ''4'' | | | ''4'' |
Line 94: |
Line 148: |
| |- | | |- |
| | 3 | | | 3 |
− | | <tt>humanDoor</tt> | + | | <samp>humanDoor</samp> |
| | int | | | int |
| | ''1'' | | | ''1'' |
Line 100: |
Line 154: |
| |- | | |- |
| | 4 | | | 4 |
− | | <tt>humanDoor</tt> | + | | <samp>humanDoor</samp> |
| | int | | | int |
| | ''3'' | | | ''3'' |
Line 106: |
Line 160: |
| |- | | |- |
| | 5 | | | 5 |
− | | <tt>animalDoor</tt> | + | | <samp>animalDoor</samp> |
| | int | | | int |
| | ''3'' | | | ''3'' |
Line 112: |
Line 166: |
| |- | | |- |
| | 6 | | | 6 |
− | | <tt>animalDoor</tt> | + | | <samp>animalDoor</samp> |
| | int | | | int |
| | ''3'' | | | ''3'' |
Line 118: |
Line 172: |
| |- | | |- |
| | 7 | | | 7 |
− | | <tt>mapToWarpTo</tt> | + | | <samp>mapToWarpTo</samp> |
| | string | | | string |
| | ''Barn'' | | | ''Barn'' |
Line 124: |
Line 178: |
| |- | | |- |
| | 8 | | | 8 |
− | | <tt>displayName</tt> | + | | <samp>displayName</samp> |
| | string | | | string |
| | ''Barn'' | | | ''Barn'' |
Line 130: |
Line 184: |
| |- | | |- |
| | 9 | | | 9 |
− | | <tt>description</tt> | + | | <samp>description</samp> |
| | string | | | string |
| | ''Houses 4 barn-dwelling animals.'' | | | ''Houses 4 barn-dwelling animals.'' |
Line 136: |
Line 190: |
| |- | | |- |
| | 10 | | | 10 |
− | | <tt>blueprintType</tt> | + | | <samp>blueprintType</samp> |
| | string | | | 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 as of (as of 1.2.29) only {{t|Buildings}} {{t|Upgrades}} and {{t|Animals}} are used in code. | + | | Type of BluePrint. The current (as of 1.2.29) types are: <code>Buildings</code>, <code>Upgrades</code>, <code>Decorations</code>, <code>Demolish</code>, <code>Animals</code> though (as of 1.2.29) only <code>Buildings</code>, <code>Upgrades</code>, and <code>Animals</code> are used in code. |
| |- | | |- |
| | 11 | | | 11 |
− | | <tt>nameOfBuildingToUpgrade</tt> | + | | <samp>nameOfBuildingToUpgrade</samp> |
| | string | | | string |
| | ''none'' | | | ''none'' |
− | | Only used for {{t|Upgrades}} BluePrint types. This allows you to choose which building/blueprint you want to replace/upgrade. | + | | Only used for <code>Upgrades</code> BluePrint types. This allows you to choose which building/blueprint you want to replace/upgrade. |
| |- | | |- |
| | 12 | | | 12 |
− | | <tt>sourceRectForMenuView</tt> | + | | <samp>sourceRectForMenuView</samp> |
| | int | | | int |
| | ''96'' | | | ''96'' |
Line 154: |
Line 208: |
| |- | | |- |
| | 13 | | | 13 |
− | | <tt>sourceRectForMenuView</tt> | + | | <samp>sourceRectForMenuView</samp> |
| | int | | | int |
| | ''96'' | | | ''96'' |
Line 160: |
Line 214: |
| |- | | |- |
| | 14 | | | 14 |
− | | <tt>maxOccupants</tt> | + | | <samp>maxOccupants</samp> |
| | int | | | int |
| | ''4'' | | | ''4'' |
Line 166: |
Line 220: |
| |- | | |- |
| | 15 | | | 15 |
− | | <tt>actionBehavior</tt> | + | | <samp>actionBehavior</samp> |
| | string | | | string |
| | ''null'' | | | ''null'' |
Line 172: |
Line 226: |
| |- | | |- |
| | 16 | | | 16 |
− | | <tt>namesOfOkBuildingLocations</tt> | + | | <samp>namesOfOkBuildingLocations</samp> |
| | string | | | string |
| | ''Farm'' | | | ''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. | + | | Game Locations where this building is allowed to build. The game only uses <code>Farm</code> and as far I can tell (as of 1.2.29) it's never used. |
| |- | | |- |
| | 17 | | | 17 |
− | | <tt>moneyRequired</tt> | + | | <samp>moneyRequired</samp> |
| | int | | | int |
| | ''6000'' | | | ''6000'' |
Line 184: |
Line 238: |
| |- | | |- |
| | 18 | | | 18 |
− | | <tt>magical</tt> | + | | <samp>magical</samp> |
| | boolean | | | boolean |
| | ''false'' | | | ''false'' |
− | | Allow the building will build instantly/magically. | + | | Allow the building to build instantly/magically. |
| |}</li> | | |}</li> |
| </ul> | | </ul> |
| | | |
| [[Category:Modding]] | | [[Category:Modding]] |
| + | |
| + | [[ru:Модификации:Чертежи]] |