Biomes and Seasons


#1

Is anyone else trying to add seasons to their biomes? Are you having any luck? I added the color palettes and the seasons to my .json files and made new models for autumn spring and winter trees. Now the seasons change, the ground changes color, and the weather is correct, but the trees never change. (BTW speaking of Tropic of Unicorn biome). My small_willow_tree.json looks just like SH small_oak_tree.json but they are always the default .qb’s. Any ideas?


#2

You need to edit the tree json to tell the game which model to use in each season. It will not guess only based on your model files.

Here the acacia as an example:

      "model_variants": {
         "default": {
            "models": [
               {
                  "type": "one_of",
                  "items": [
                     "file(small_acacia_tree.qb)",
                     "file(small_acacia_tree_2.qb)"
                  ]
               }
            ]
         },
         "autumn": {
            "models": [
               {
                  "type": "one_of",
                  "items": [
                     "file(small_acacia_tree_autumn.qb)"
                  ]
               }
            ]
         },
         "spring": {
            "models": [
               {
                  "type": "one_of",
                  "items": [
                     "file(small_acacia_tree_spring.qb)",
                     "file(small_acacia_tree_spring_2.qb)"
                  ]
               }
            ]
         },
         "winter": {
            "models": [
               {
                  "type": "one_of",
                  "items": [
                     "file(small_acacia_tree_winter.qb)"
                  ]
               }
            ]
         }
      },
      "stonehearth:seasonal_model_switcher": {
         "stonehearth:biome:desert": {
            "spring": "spring",
            "summer": "default",
            "autumn": "autumn",
            "winter": "winter"
         }
      },

#3

Here is my small willow tree .json

{
   "mixins": [
      "stonehearth:mixins:tree",
      "stonehearth:mixins:align_to_grid"
   ],
   "type": "entity",
   "components": {
      "model_variants": {
         "default": {
            "models": [{
               "type": "one_of",
               "items": [
                  "file(small_willow_tree_01.qb)",
                  "file(small_willow_tree_02.qb)",
                  "file(small_willow_tree_03.qb)"
               ]
            }]
         },
         "autumn": {
            "models": [{
               "type": "one_of",
               "items": [
                  "file(small_willow_tree_autumn_01.qb)",
                  "file(small_willow_tree_autumn_02.qb)",
                  "file(small_willow_tree_autumn_03.qb)"
               ]
            }]
         },
         "spring": {
            "models": [{
               "type": "one_of",
               "items": [
                  "file(small_willow_tree_spring_01.qb)",
                  "file(small_willow_tree_spring_02.qb)",
                  "file(small_willow_tree_spring_03.qb)"
               ]
            }]
         },
         "winter": {
            "models": [{
               "type": "one_of",
               "items": [
                  "file(small_willow_tree_winter_01.qb)",
                  "file(small_willow_tree_winter_02.qb)"
               ]
            }]
         },
      "stonehearth:seasonal_model_switcher": {
         "stonehearth:biome:unicorn": {
            "spring": "spring",
            "summer": "default",
            "autumn": "autumn",
            "winter": "winter"
         }
      }
   },
   "stonehearth:resource_node": {
      "resource": "unicorn_biome:resources:wood:willow_log",
      "durability": 8
   },
   "mob": {
      "model_origin": {
         "x": 0,
         "y": 0,
         "z": 0
      },
      "region_origin": {
         "x": 0,
         "y": 0,
         "z": 0
      },
      "align_to_grid": [
         "x",
         "z"
      ]
   },
   "destination": {
      "region": [{
         "min": {
            "x": -1,
            "y": 0,
            "z": 0
         },
         "max": {
            "x": 2,
            "y": 4,
            "z": 4
         }
      }]
   },
   "region_collision_shape": {
      "region": [{
         "min": {
            "x": 1,
            "y": 0,
            "z": 1
         },
         "max": {
            "x": 2,
            "y": 4,
            "z": 2
         }
      }]
   }
},
   "entity_data": {
      "stonehearth:evolve_data": {
         "next_stage": "unicorn_biome:entities:trees:willow_tree:medium_willow_tree:medium_willow_tree.json",
         "evolve_time": "2d"
      },
      "stonehearth:catalog": {
         "display_name": "i18n(unicorn_biome:entities.trees.willow_tree.small_willow_tree.display_name)",
         "description": "i18n(unicorn_biome:entities.trees.willow_tree.small_willow_tree.description)"
      },
      "stonehearth:appeal": {
         "appeal": 2
      }
   }
}

Sorry I don’t know how to paste it so it looks like Sublime Text.
You see I have made models and set it up like the small oak or acacia. I’m sure it’s just a comma somewhere but I have spent hours trying to get it to work.

Thanks for replying, by the way!


#4

That stonehearth:biome:unicorn should be the URI of your biome in your mod, so something like unicorn_biome:biome:unicorn.


#5

I changed that and I’m still getting the default small_willow_01.qb


#6

So far I have:

  • Made madels for small willow for spring, autumn , and winter
  • Added models to small_willow_tree.json
  • Added seasonal weather patterns to unicorn.json
  • Added seasonal palettes to unicorn_generation_data.json

Is there anywhere else I need to edit?

I have NOT done this for the rest of the trees yet. Is that making the small willow not work? I didn’t want to change them all until I knew it would work.

All of that is in the Steam workshop version of my biome if anyone want to look at any other files.


#7

The stonehearth:seasonal_model_switcher block should be outside the model_variants block.


#8

So I have poured over this code for about 5 hours today. I somehow can not make the seasons work! I have changed both things that max99x suggested (thank you so much!!!)
Here is my code as it stands now. It always generates the summer options for trees no matter what season it is. Any help would be appreciated so much. I just want to make this available for everyone on the Steam workshop!

{
   "mixins": [
      "stonehearth:mixins:tree",
      "stonehearth:mixins:align_to_grid"
   ],
   "type": "entity",
   "components": {
      "model_variants": {
         "default": {
            "models": [
               {
                  "type": "one_of",
                  "items": [
                     "file(small_willow_tree_01.qb)",
                     "file(small_willow_tree_02.qb)",
                     "file(small_willow_tree_03.qb)"
                  ]
               }
            ]
         },
         "autumn": {
            "models": [
               {
                  "type": "one_of",
                  "items": [
                     "file(small_willow_tree_autumn_01.qb)",
                     "file(small_willow_tree_autumn_02.qb)",
                     "file(small_willow_tree_autumn_03.qb)"
                  ]
               }
            ]
         },
         "spring": {
            "models": [
               {
                  "type": "one_of",
                  "items": [
                     "file(small_willow_tree_spring_01.qb)",
                     "file(small_willow_tree_spring_02.qb)",
                     "file(small_willow_tree_spring_03.qb)"
                  ]
               }
            ]
         },
         "winter": {
            "models": [
               {
                  "type": "one_of",
                  "items": [
                     "file(small_willow_tree_winter_01.qb)",
                     "file(small_willow_tree_winter_02.qb)"
                  ]
               }
            ]
         }
      },
      "stonehearth:seasonal_model_switcher": {
         "unicorn_biome:biome:unicorn": {
            "spring": "spring",
            "summer": "default",
            "autumn": "autumn",
            "winter": "winter"
         }
      },
      "stonehearth:resource_node": {
      "resource": "unicorn_biome:resources:wood:willow_log",
      "durability": 8
      },
      "mob": {
      "model_origin": {
         "x": 0,
         "y": 0,
         "z": 0
      },
      "region_origin": {
         "x": 0,
         "y": 0,
         "z": 0
      },
      "align_to_grid": [
         "x",
         "z"
      ]
   },
   "destination": {
      "region": [{
         "min": {
            "x": -1,
            "y": 0,
            "z": 0
         },
         "max": {
            "x": 2,
            "y": 4,
            "z": 4
         }
      }]
   },
   "region_collision_shape": {
      "region": [{
         "min": {
            "x": 1,
            "y": 0,
            "z": 1
         },
         "max": {
            "x": 2,
            "y": 4,
            "z": 2
            }
         }
      ]
   }
   },
   "entity_data": {
      "stonehearth:evolve_data": {
         "next_stage": "unicorn_biome:entities:trees:willow_tree:medium_willow_tree:medium_willow_tree.json",
         "evolve_time": "2d"
      },
      "stonehearth:catalog": {
         "display_name": "i18n(unicorn_biome:entities.trees.willow_tree.small_willow_tree.display_name)",
         "description": "i18n(unicorn_biome:entities.trees.willow_tree.small_willow_tree.description)"
      },
      "stonehearth:appeal": {
         "appeal": 2
      }
   }
}

#9
"unicorn_biome:biome:unicorn": {
    "spring": "spring",
    "summer": "default",
    "autumn": "autumn",
    "winter": "winter"
}

And if you change the “default” season to something else, does it switch to that as you expect?


#10

Paul,
If I change that specific default to say “winter:default” and I dont change the model variant then no small willow trees appear. The same goes for changing “model variant” from “winter” to “default”. No small willow trees.

Now if I change both “winter:default” and the model variant from “winter” to “default” then small willow trees show up as the winter model no matter what season it is.

It seems as if the “stonehearth:seasonal_model_switcher”: will only point to the default season regardless of which season I choose.


#11

Can you post your manifest?


#12

Here you go:

{
	"info": {
		"name": "Tropic of Unicorn",
		"namespace": "unicorn_biome",
		"version": 3,
		"steam_file_id" : "1390587585"
	},
	"default_locale": "en",
	"aliases": {
	"biome:unicorn": "file(data/biome/unicorn.json)",

	 "resources:wood:maple_log": "file(entities/resources/wood/maple_log)",
	 "resources:wood:willow_log": "file(entities/resources/wood/willow_log)",

	"trees:palm:small": "file(entities/trees/palm_tree/small_palm_tree)",
	"trees:palm:medium": "file(entities/trees/palm_tree/medium_palm_tree)",
	"trees:palm:large": "file(entities/trees/palm_tree/large_palm_tree)",
	"trees:willow:small": "file(entities/trees/willow_tree/small_willow_tree)",
	"trees:willow:medium": "file(entities/trees/willow_tree/medium_willow_tree)",
	"trees:willow:large": "file(entities/trees/willow_tree/large_willow_tree)",
	"trees:maple:small": "file(entities/trees/maple_tree/small_maple_tree)",
	"trees:maple:medium": "file(entities/trees/maple_tree/medium_maple_tree)",
	"trees:maple:large": "file(entities/trees/maple_tree/large_maple_tree)"
	},
	"mixintos": {
		"stonehearth:biome:index" : "file(data/biome/index.json)"
	},
	"overrides": {},
	"components": {},
	"controllers": {}
}

#13

So I got it so the terrain colors change with the seasons, and the weather follows the seasonal patterns, but still no luck with the tree models changing.