stardew-valley-data 0.23.0 → 0.25.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -5,6 +5,21 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project
6
6
  adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.25.0] - 2026-03-22
9
+
10
+ ### Added
11
+
12
+ - `purchasePrice: number | null` field added to `Pet` type — Cats and Dogs 40,000g, Turtle 60,000g,
13
+ Iridium Turtle 500,000g, Horse `null` (obtained via Stable building)
14
+
15
+ ## [0.24.0] - 2026-03-22
16
+
17
+ ### Added
18
+
19
+ - `parseFishPonds()` parser added — new `fishPonds` field on `SaveData` extracting fish pond
20
+ buildings with `buildingId`, `fishType` (item ID), `currentOccupants`, and `maxOccupants`
21
+ - `SaveFishPond` interface added to save file types
22
+
8
23
  ## [0.23.0] - 2026-03-22
9
24
 
10
25
  ### Added
package/data/animals.json CHANGED
@@ -4,6 +4,7 @@
4
4
  "id": "cat-1",
5
5
  "name": "Cat",
6
6
  "variant": 1,
7
+ "purchasePrice": 40000,
7
8
  "image": "images/animals/Cat 1.png"
8
9
  },
9
10
  {
@@ -11,6 +12,7 @@
11
12
  "id": "cat-2",
12
13
  "name": "Cat",
13
14
  "variant": 2,
15
+ "purchasePrice": 40000,
14
16
  "image": "images/animals/Cat 2.png"
15
17
  },
16
18
  {
@@ -18,6 +20,7 @@
18
20
  "id": "cat-3",
19
21
  "name": "Cat",
20
22
  "variant": 3,
23
+ "purchasePrice": 40000,
21
24
  "image": "images/animals/Cat 3.png"
22
25
  },
23
26
  {
@@ -25,6 +28,7 @@
25
28
  "id": "cat-4",
26
29
  "name": "Cat",
27
30
  "variant": 4,
31
+ "purchasePrice": 40000,
28
32
  "image": "images/animals/Cat 4.png"
29
33
  },
30
34
  {
@@ -32,6 +36,7 @@
32
36
  "id": "cat-5",
33
37
  "name": "Cat",
34
38
  "variant": 5,
39
+ "purchasePrice": 40000,
35
40
  "image": "images/animals/Cat 5.png"
36
41
  },
37
42
  {
@@ -39,6 +44,7 @@
39
44
  "id": "dog-1",
40
45
  "name": "Dog",
41
46
  "variant": 1,
47
+ "purchasePrice": 40000,
42
48
  "image": "images/animals/Dog 1.png"
43
49
  },
44
50
  {
@@ -46,6 +52,7 @@
46
52
  "id": "dog-2",
47
53
  "name": "Dog",
48
54
  "variant": 2,
55
+ "purchasePrice": 40000,
49
56
  "image": "images/animals/Dog 2.png"
50
57
  },
51
58
  {
@@ -53,6 +60,7 @@
53
60
  "id": "dog-3",
54
61
  "name": "Dog",
55
62
  "variant": 3,
63
+ "purchasePrice": 40000,
56
64
  "image": "images/animals/Dog 3.png"
57
65
  },
58
66
  {
@@ -60,6 +68,7 @@
60
68
  "id": "dog-4",
61
69
  "name": "Dog",
62
70
  "variant": 4,
71
+ "purchasePrice": 40000,
63
72
  "image": "images/animals/Dog 4.png"
64
73
  },
65
74
  {
@@ -67,6 +76,7 @@
67
76
  "id": "dog-5",
68
77
  "name": "Dog",
69
78
  "variant": 5,
79
+ "purchasePrice": 40000,
70
80
  "image": "images/animals/Dog 5.png"
71
81
  },
72
82
  {
@@ -74,6 +84,7 @@
74
84
  "id": "turtle",
75
85
  "name": "Turtle",
76
86
  "variant": 1,
87
+ "purchasePrice": 60000,
77
88
  "image": "images/animals/Turtle.png"
78
89
  },
79
90
  {
@@ -81,12 +92,14 @@
81
92
  "id": "iridium-turtle",
82
93
  "name": "Iridium Turtle",
83
94
  "variant": 2,
95
+ "purchasePrice": 500000,
84
96
  "image": "images/animals/Iridium Turtle.png"
85
97
  },
86
98
  {
87
99
  "type": "pet",
88
100
  "id": "horse",
89
101
  "name": "Horse",
102
+ "purchasePrice": null,
90
103
  "image": "images/animals/horse.png"
91
104
  },
92
105
  {
package/dist/index.d.mts CHANGED
@@ -79,6 +79,7 @@ interface Pet {
79
79
  id: string;
80
80
  name: string;
81
81
  variant?: number;
82
+ purchasePrice: number | null;
82
83
  image: string;
83
84
  }
84
85
  interface FarmAnimal {
@@ -2637,6 +2638,7 @@ interface SaveData {
2637
2638
  stardrops: SaveStardropEntry[];
2638
2639
  stats: SaveStats;
2639
2640
  animals: SaveAnimal[];
2641
+ fishPonds: SaveFishPond[];
2640
2642
  buildings: SaveBuilding[];
2641
2643
  cookingRecipes: SaveRecipeEntry[];
2642
2644
  craftingRecipes: SaveRecipeEntry[];
@@ -2777,6 +2779,13 @@ interface SaveAnimal {
2777
2779
  age: number;
2778
2780
  hasAnimalCracker: boolean;
2779
2781
  }
2782
+ /** A fish pond building with the fish species and population. */
2783
+ interface SaveFishPond {
2784
+ buildingId: string;
2785
+ fishType: number;
2786
+ currentOccupants: number;
2787
+ maxOccupants: number;
2788
+ }
2780
2789
  /** A farm building with its type, position, and current animal count. */
2781
2790
  interface SaveBuilding {
2782
2791
  id: string;
package/dist/index.d.ts CHANGED
@@ -79,6 +79,7 @@ interface Pet {
79
79
  id: string;
80
80
  name: string;
81
81
  variant?: number;
82
+ purchasePrice: number | null;
82
83
  image: string;
83
84
  }
84
85
  interface FarmAnimal {
@@ -2637,6 +2638,7 @@ interface SaveData {
2637
2638
  stardrops: SaveStardropEntry[];
2638
2639
  stats: SaveStats;
2639
2640
  animals: SaveAnimal[];
2641
+ fishPonds: SaveFishPond[];
2640
2642
  buildings: SaveBuilding[];
2641
2643
  cookingRecipes: SaveRecipeEntry[];
2642
2644
  craftingRecipes: SaveRecipeEntry[];
@@ -2777,6 +2779,13 @@ interface SaveAnimal {
2777
2779
  age: number;
2778
2780
  hasAnimalCracker: boolean;
2779
2781
  }
2782
+ /** A fish pond building with the fish species and population. */
2783
+ interface SaveFishPond {
2784
+ buildingId: string;
2785
+ fishType: number;
2786
+ currentOccupants: number;
2787
+ maxOccupants: number;
2788
+ }
2780
2789
  /** A farm building with its type, position, and current animal count. */
2781
2790
  interface SaveBuilding {
2782
2791
  id: string;
package/dist/index.js CHANGED
@@ -700,6 +700,7 @@ var animals_default = [
700
700
  id: "cat-1",
701
701
  name: "Cat",
702
702
  variant: 1,
703
+ purchasePrice: 4e4,
703
704
  image: "images/animals/Cat 1.png"
704
705
  },
705
706
  {
@@ -707,6 +708,7 @@ var animals_default = [
707
708
  id: "cat-2",
708
709
  name: "Cat",
709
710
  variant: 2,
711
+ purchasePrice: 4e4,
710
712
  image: "images/animals/Cat 2.png"
711
713
  },
712
714
  {
@@ -714,6 +716,7 @@ var animals_default = [
714
716
  id: "cat-3",
715
717
  name: "Cat",
716
718
  variant: 3,
719
+ purchasePrice: 4e4,
717
720
  image: "images/animals/Cat 3.png"
718
721
  },
719
722
  {
@@ -721,6 +724,7 @@ var animals_default = [
721
724
  id: "cat-4",
722
725
  name: "Cat",
723
726
  variant: 4,
727
+ purchasePrice: 4e4,
724
728
  image: "images/animals/Cat 4.png"
725
729
  },
726
730
  {
@@ -728,6 +732,7 @@ var animals_default = [
728
732
  id: "cat-5",
729
733
  name: "Cat",
730
734
  variant: 5,
735
+ purchasePrice: 4e4,
731
736
  image: "images/animals/Cat 5.png"
732
737
  },
733
738
  {
@@ -735,6 +740,7 @@ var animals_default = [
735
740
  id: "dog-1",
736
741
  name: "Dog",
737
742
  variant: 1,
743
+ purchasePrice: 4e4,
738
744
  image: "images/animals/Dog 1.png"
739
745
  },
740
746
  {
@@ -742,6 +748,7 @@ var animals_default = [
742
748
  id: "dog-2",
743
749
  name: "Dog",
744
750
  variant: 2,
751
+ purchasePrice: 4e4,
745
752
  image: "images/animals/Dog 2.png"
746
753
  },
747
754
  {
@@ -749,6 +756,7 @@ var animals_default = [
749
756
  id: "dog-3",
750
757
  name: "Dog",
751
758
  variant: 3,
759
+ purchasePrice: 4e4,
752
760
  image: "images/animals/Dog 3.png"
753
761
  },
754
762
  {
@@ -756,6 +764,7 @@ var animals_default = [
756
764
  id: "dog-4",
757
765
  name: "Dog",
758
766
  variant: 4,
767
+ purchasePrice: 4e4,
759
768
  image: "images/animals/Dog 4.png"
760
769
  },
761
770
  {
@@ -763,6 +772,7 @@ var animals_default = [
763
772
  id: "dog-5",
764
773
  name: "Dog",
765
774
  variant: 5,
775
+ purchasePrice: 4e4,
766
776
  image: "images/animals/Dog 5.png"
767
777
  },
768
778
  {
@@ -770,6 +780,7 @@ var animals_default = [
770
780
  id: "turtle",
771
781
  name: "Turtle",
772
782
  variant: 1,
783
+ purchasePrice: 6e4,
773
784
  image: "images/animals/Turtle.png"
774
785
  },
775
786
  {
@@ -777,12 +788,14 @@ var animals_default = [
777
788
  id: "iridium-turtle",
778
789
  name: "Iridium Turtle",
779
790
  variant: 2,
791
+ purchasePrice: 5e5,
780
792
  image: "images/animals/Iridium Turtle.png"
781
793
  },
782
794
  {
783
795
  type: "pet",
784
796
  id: "horse",
785
797
  name: "Horse",
798
+ purchasePrice: null,
786
799
  image: "images/animals/horse.png"
787
800
  },
788
801
  {
@@ -40660,6 +40673,33 @@ function parseAnimals(root) {
40660
40673
  }
40661
40674
  return result;
40662
40675
  }
40676
+ function parseFishPonds(root) {
40677
+ const result = [];
40678
+ const locations2 = ensureArray(root.locations?.GameLocation);
40679
+ for (const loc of locations2) {
40680
+ const l = loc;
40681
+ if (str(l.name) !== "Farm") continue;
40682
+ const buildings2 = ensureArray(l.buildings?.Building);
40683
+ for (const building of buildings2) {
40684
+ const b = building;
40685
+ const xsiType = str(
40686
+ b["@_xsi:type"] ?? b["@_type"]
40687
+ );
40688
+ if (xsiType !== "FishPond") continue;
40689
+ const fishTypeRaw = b.fishType;
40690
+ const fishType = num(fishTypeRaw?.int);
40691
+ if (fishType === 0) continue;
40692
+ result.push({
40693
+ buildingId: str(b.id),
40694
+ fishType,
40695
+ currentOccupants: num(b.currentOccupants),
40696
+ maxOccupants: num(b.maxOccupants)
40697
+ });
40698
+ }
40699
+ break;
40700
+ }
40701
+ return result;
40702
+ }
40663
40703
 
40664
40704
  // src/save-file/parsers/v1/buildings.ts
40665
40705
  function parseBuildings(root) {
@@ -41566,6 +41606,7 @@ var v1 = (ctx) => ({
41566
41606
  stardrops: parseStardrops(ctx.player.mailReceived),
41567
41607
  stats: parseStats(ctx.player),
41568
41608
  animals: parseAnimals(ctx.root),
41609
+ fishPonds: parseFishPonds(ctx.root),
41569
41610
  buildings: parseBuildings(ctx.root),
41570
41611
  cookingRecipes: parseCookingRecipes(ctx.player.cookingRecipes, ctx.player.recipesCooked),
41571
41612
  craftingRecipes: parseCraftingRecipes(ctx.player.craftingRecipes),