[MOD] Faewood Biome [COMING SOON]

Version 2: [WIP]

Version 1

There are tales of a land, that embodied the four elements and was blessed by the fae folk…

Autumn (Default)

19 Likes

Hype on new biomes :smiley:

PS:
Love the 2D Art! <3

2 Likes

Thank you! I was super pleased with how those came out :smiley:

2 Likes

What new flora/fauna will we see in this AWESOME setting? I’m super excited it’s very pretty :slight_smile:

Not a whole lot, if any; right now I’m having trouble even getting my Maple Trees to work. I’m really not much with code, so I can’t really do anything fancy on my own.

Have you figured out how to make the tree models change with the seasons?!

1 Like

I haven’t tested it, but, yea, I think I saw the method for that in the game code;

From large_oak_tree.json:

"model_variants": {
     "default": {
        "models": [
           {
              "type": "one_of",
              "items": [
                 "file(large_oak_tree.qb)",
                 "file(large_oak_tree_2.qb)",
                 "file(large_oak_tree_3.qb)"
              ]
           }
        ]
     },
     "autumn": {
        "models": [
           {
              "type": "one_of",
              "items": [
                 "file(large_oak_tree_autumn.qb)",
                 "file(large_oak_tree_autumn_2.qb)",
                 "file(large_oak_tree_autumn_3.qb)"
              ]
           }
        ]
     },
     "spring": {
        "models": [
           {
              "type": "one_of",
              "items": [
                 "file(large_oak_tree_spring.qb)",
                 "file(large_oak_tree_spring_2.qb)",
                 "file(large_oak_tree_spring_3.qb)"
              ]
           }
        ]
     },
     "winter": {
        "models": [
           {
              "type": "one_of",
              "items": [
                 "file(large_oak_tree_winter.qb)",
                 "file(large_oak_tree_winter_2.qb)",
                 "file(large_oak_tree_winter_3.qb)"
              ]
           }
        ]
     }
  },

  "stonehearth:seasonal_model_switcher": {
     "stonehearth:biome:temperate": {
        "spring": "spring",
        "summer": "default",
        "autumn": "autumn",
        "winter": "winter"
     }
  }

image

So based on that, it’s my presumption the tree controls its changes

1 Like

Yes, this is the important bit:

"stonehearth:seasonal_model_switcher": {
     "stonehearth:biome:temperate": {
        "spring": "spring",
        "summer": "default",
        "autumn": "autumn",
        "winter": "winter"
     }
  }

These have to be set up on a per-biome basis and the left row refers to the season names (on that biome) and the second row refers to the model variants names (on the model_variants component)

So if your Biome has 3 seasons, for example: Lunar Season, Sun Season, Shadow Season (named lunar, sun and shadow) your seasonal_model_switcher component would look like this:

"stonehearth:seasonal_model_switcher": {
     "my_mod:biome:my_biome": {
        "lunar": "default",
        "sun": "sun",
        "shadow": "shadow"
     }
  }

And then I’d need the model_variants component to have models for “default”, “sun” and “shadow”.

Oh! Thank you, @DaniAngione!

So I’ll need to write a mix-in for my biome to add those to the tree, correct?

1 Like

If you use any default trees, yes, you’ll need to write a mixin to add your own biome to the seasonal_model_switcher component on the trees.
(And if you use different season names or models, you’ll also have to mixin the model_variants component with your new models)
Please note that this has to be done to each tree size :stuck_out_tongue: so… :forlorn:

…well, once I finish my supper this evening, think my daily modding will be attempting to make a quick template for that and post it to my Kitty Corner to make life a little easier on biome modders!

1 Like

Alternatively (might even be easier) you could make all the trees new. Even if just recolors (like the “gold juniper”, “silver pine”, etc… in arctic)
But at least gives you more control over their files without needing a ton of mixins :merry:

…help!

release-893 (x64)[M]

…arth/services/server/world_generation/landscaper.lua:37: attempt to index field ‘water’ (a nil value)

stack traceback: [C]: ? …arth/services/server/world_generation/landscaper.lua:37: in function ‘__user_init’ radiant/lib/unclasslib.lua:270: in function ‘__init’ radiant/lib/unclasslib.lua:201: in function ‘Landscaper’ …server/world_generation/world_generation_service.lua:66: in function ‘create_new_game’ …vices/server/game_creation/game_creation_service.lua:143: in function ‘create_new_world’ …vices/server/game_creation/game_creation_service.lua:178: in function <…vices/server/game_creation/game_creation_service.lua:162>

You set an unacceptable value for shallow water depth

(or removed it entirely, maybe?)

2 Likes

Okay, I take it back. I became inspired to play around with some concepts for unique plants for the Faewood. Here’s the first up, the Fairy Acacia Tree:

large_acacia_tree_spring

large_acacia_tree_spring2

large_acacia_tree

large_acacia_tree2

large_acacia_tree_autumn

large_acacia_tree_winter

Shown per season; Spring, Spring variant 2, Summer, Summer variant 2, Autumn, and Winter. This includes previews of the glow of the leaf-pods; no glow picture for winter because the Fairy Acacia stops glowing in the winter.

6 Likes

So I will ask again, have you figured out how to get the seasonal model switcher to work? I have variants for all my trees yet they do not change with the season.

Also your models are beautiful!!!

As discussed above;

You need to the seasonal model switcher on the tree files themselves. This would presumably be done with a mixin that adds your biome where it normally says “stonehearth:biome:temperate”.

I created a kit with all the ones I found and extracted, though as I state there, I have NOT actually tested it; I haven’t sat and played through the game until a season change yet:

1 Like

I’m so sorry, I guess you misunderstood me. That kit allows you to put stock Stonehearth trees into your custom biome that “may” switch with the seasons. I was referring to making your own custom trees that have multiple variants (like your fairy acacia) that change with the seasons. attached is my .json for “small_willow_tree” in my biome. I’m not sure if I need to add the lines from your kit to the manifest because I don’t use any of those trees. I’ll also attach the manifest for you to look at. This results in the tree variant that is labeled “default” to show up in game no matter what season and never change.
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": {
         "unicorn_biome:biome:unicorn": {
            "spring": "spring",
            "summer": "default",
            "autumn": "autumn",
            "winter": "winter"
            }
         },
      "stonehearth:resource_node": {
      "resource": "unicorn_biome:resources:wood:willow_log",
      "durability": 12
      },
      "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:trees:willow:medium",
         "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
         }
      }
   }

manifest :

{
	"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": {}
}

Thanks!

I’m honestly not sure; your tree is set up a bit differently than the standard ones, so I don’t know if that’s changing the tree’s behavior. At a glance, it looks more like an item than a tree, which might not utilize the method correctly for all I know.

I presume you’re using the placement data because you’re not using Qubicle; if you’d like, you can send me your tree models in a zip or such over a private message, and I can convert them for you so can try dropping those lines?

-edit-
Or I’m just a mook using old data as a reference… >.<