Seasons for clothes

I’ve seen the possibility to add models for each season of a model/item in the game. So i wonder if this is also possible for clothes. Wanted to test it but see quickly that it’s more complicated than i imagines.

The trees use a really simple code to add different models for each season

"model_variants": {
         "default": {
            "models": [
               {
                  "type": "one_of",
                  "items": [
                     "file(small_juniper_tree.qb)"
                  ]
               }
            ]
         },
         "autumn": {
            "models": [
               {
                  "type": "one_of",
                  "items": [
                     "file(small_juniper_tree_autumn.qb)"
                  ]
               }
            ]
         },
         "spring": {
            "models": [
               {
                  "type": "one_of",
                  "items": [
                     "file(small_juniper_tree.qb)"
                  ]
               }
            ]
         },
         "winter": {
            "models": [
               {
                  "type": "one_of",
                  "items": [
                     "file(small_juniper_tree_winter.qb)"
                  ]
               }
            ]
         }
      }

But there is already the problem. The clothes uses another function to determinate single models for the different classes (male, female, orc…). So i’m wondering how there can be added also the function of seasons on it? Was thinking that maybe something like that can work but i’m not sure. :frowning:

"default": {

          "default": {
             "layer": "clothing",
             "models": [
                "file(clothing_test_male.qb)"
             ]
          },
          "female": {
             "layer": "clothing",
             "models": [
                "file(clothing_test_female.qb)"
             ]
          },
          "rabbit_male": {
             "layer": "clothing",
             "models": [
                "file(clothing_test_rabbit_male.qb)"
             ]
          }
          
        },

        "autumn": {

          "default": {
             "layer": "clothing",
             "models": [
                "file(clothing_test_male2.qb)"
             ]
          },
          "female": {
             "layer": "clothing",
             "models": [
                "file(clothing_test_female2.qb)"
             ]
          },
          "rabbit_male": {
             "layer": "clothing",
             "models": [
                "file(clothing_test_rabbit_male2.qb)"
             ]
          }
          
        },

        … 

Could this work?? I see some problems by the default model for the male…

1 Like

It will only work for the male (default), if you use the same structure the trees used. The way you did where you put everything one level deep will not work because the lua is expecting the json like it is in the trees json.

1 Like

Mhh ok yes i understand. So for the moment you haven’t a possibility to mame it work without modifyingvthe lua code :frowning: strange…

Is there really no other way to solve this?

Mind that each entity ( a female hearthling, a male rabbit, etc) have their own model variant defined in their JSON file. This model variant name is used in clothes to determine which model variant should they use (for example bunnies are shorter so they can’t wear the same qb model than hearthlings).

So there’s no way to change the model variant that they should use without breaking all the other outfits in the game for them.

You’d have to use a custom component or something to achieve what you want.

Yes i know, also male and female have different body structures.

I wanted to add this function to some clothing models that i want to add to the game, not modify some existing ones. And was hoping that this would be easier xD

My “coding skills” are not hight enought to experiment with this unfortunately :confused:

Different approach, when i have a new clothing. Is it possible to add a code line that specifies that this clothing is only wearable for spring, autumn, … ?

So the Hearthlings have to change clotheswith a new season.

Using maybe a function like “preferred_season”, used also for the crops

1 Like

This functionality is available for equipment with ACE. Conditional values can be added to the stonehearth:equipment_piece component for seasons (with the capability to have other conditions as well, but that’s the only one implemented), allowing an equipment piece to have increased and/or decreased value during different seasons. We use this for the winter_worker_outfit in ACE.

6 Likes

Sounds great! So there is maybe a possibility to connect a mod to the ACE mod.

ACE has been designed specifically to provide easily mod-able functionality in many ways, extending base game functionality like gameplay settings, heatmaps, interaction with water, and much more beyond the restrictions of the base game.

Edit: multiple parent requirements for jobs, including “one of” functionality, is a good example of a mod-friendly feature that I don’t think we’re even using in ACE.

2 Likes

The problem here is that ace will be used as a template. Because it is optionally enabled by the user, there is no guarantee that the player will have it activated, meaning that a mod that uses its functions will be broken in that case. Modders will need to duplicate the desired function into their mods for it to always work.

I don’t think it’s a big deal for modders to say that their mod is designed to work with ACE, especially since everyone will have it.

Edit: disregard previous edit, was stuck thinking about the last example I used.

1 Like

Especially once it actually hits steam, it’s easy enough to SAY REQUIRES ACE

Saying it requires a mod is not enough. Not everyone will do that. Check dani’s mod, where it requires his core mod to work, they have way more downloads than the core meaning that there are many people out there with broken mods.

Even if the mod was on and downloaded by default, not everyone will use it. I for example will use a custom version for myself as there are so much stuff in it that I do not want, but is forced on players. Take for example the combat overhaul that breaks all the other mods that works with combat in some way. That is a change that I really do not like and I’m not willing to use just to play with dwarves.

Now, if a mod requires ace to work, it is splitting its user base. For the modder, there is no vantage in using its functions and risk his mod erroring and players going into his page to tell him the mod does not work.
The only safe option is to just copy the code from ace and adds into his own mod. For example, if I wanted the float component I would replicate the component in my mod, that way it works with or without ace.

1 Like

Yes, Bruno is right. It’s better to integrate all functions in a mod so when someone reports you a bug you are 100% sure to find it in your mod

1 Like

to be fair though, if you tell people you need a space helmet to not die out on the lunar landscape, and they elect to go I CAN DAMNWELL BREATHE WHERE I WANT, i say let them :stuck_out_tongue:

Yes, but see, the difference is that if they do that, they can’t breathe to bitch about it.

As opposed to people on Steam, who can and will do so.
Even on unrelated mods, even when you explain that there’s approaching 0 or less chance it’s caused by your mod and why (“But it only started happening after I added your mod!”).
(I may still be a little sore from this happening recently.)

1 Like

as @Kittyodoom points out, the difference is that in your example it’s not your problem if someone walks out onto the lunar surface without their space helmet; whereas if someone doesn’t read the instructions and thus starts calling your mod a broken mess all over the various forums it does become your problem. How you deal with it is up to you of course; but most modders can’t stand the idea of their work being wholesale written-off as “broken”; and the issue is doubled on the Steam workshop where a large number of people will read the latest comment/review as gospel or at least not look past it to discover that the person posting just didn’t read the instructions and the mod does, indeed, work fine.

True, maybe I have been lucky so far in that when it wasn’t my fault people took that as truth XD

1 Like