Back to mods
Traits and Classes lib project artwork

Vintage Story Mod DB · Vintage Story mod

Traits and Classes lib

Was commissioned by: 1death39 Requires: Player Model lib, Overhaul lib Reworks how player traits and classes stored, accessed and selected on creation. Compatibility: • Sonito's Dynamic Traits - probably compatible, seems to work • MultiClass Reborn - pro

Choose a version Pick your version below, then grab the matching file.

Quick answer

Which Traits and Classes lib release should I use?

Updated last month
Latest stable file 0.0.6
Game version 1.22.0-pre.1, 1.22.0-pre.2, 1.22.0-pre.3
Loader Built-in Vintage Story mod system

Traits and Classes lib 0.0.6 targets 1.22.0-pre.1, 1.22.0-pre.2, 1.22.0-pre.3. It must be installed on the client. Installation on the dedicated server is optional. All 3 required mods have matching files.

Where it goes

Is Traits and Classes lib required on the client, server, or both?

It must be installed on the client. Installation on the dedicated server is optional.

Client Required
Dedicated server Optional
Loader for this release Built-in Vintage Story mod system
Required install it here Optional supported, not mandatory Not supported do not install here Source doesn’t say do not assume

This release supports both sides, but the source does not require it on the server.

What else does Traits and Classes lib 0.0.6 need?

0.0.6. Change the file and its required mods may change too.

All 3 required mods have matching files

Install Player Model lib, Overhaul lib, JSON Patches lib first. We found matching files for this game-version and loader setup. 18 come through another mod in the chain.

2 listed on this file 18 pulled in by those mods
Player Model lib Needed by Traits and Classes lib 0.0.6
required
Matching file found Matched file: 1.23.8
Overhaul lib Needed by Traits and Classes lib 0.0.6
required
Matching file found Matched file: 2.0.9
JSON Patches lib Needed by Player Model lib
pulled in
Matching file found Matched file: 1.5.2
Forlorn Additons Needed by Player Model lib
pulled in
Matching file found Matched file: 1.0.4
Rustbound Magic Needed by Player Model lib
pulled in
Matching file found Matched file: 3.2.5

18 extra mods were pulled in by other dependencies. Indented rows show who needs each one. We only count dependency files that match this setup. A file for another loader does not fill the gap.

Before you install it

Add Traits and Classes lib without breaking your instance.

Built for Traits and Classes lib 0.0.6. Pick another file and the loader, install side or required mods may change.

  1. 01

    Stick to this file

    Use 0.0.6. It targets 1.22.0-pre.1, 1.22.0-pre.2, 1.22.0-pre.3; another release may have different loader, side or dependency requirements.

  2. 02

    Bring the mods it needs

    Install Player Model lib, Overhaul lib, JSON Patches lib first. We found matching files for this game-version and loader setup. 18 come through another mod in the chain.

  3. 03

    Put it on the correct side

    It must be installed on the client. Installation on the dedicated server is optional.

  4. 04

    Pick the file you checked

    Use the “Get this file” button beside 0.0.6. It opens that exact file at the source.

About this project

What does Traits and Classes lib add?

Was commissioned by: 1death39

 

Requires: Player Model lib, Overhaul lib

 

Reworks how player traits and classes stored, accessed and selected on creation.

 

Compatibility:

  • Sonito's Dynamic Traits - probably compatible, seems to work
  • MultiClass Reborn - probably incompatible, traits added by the lib are not displayed, no crashes, mod seems to work

 

Allows for player to have several classes from different categories at the same time.

Classes can be chained together, allowing adding specialisations available only to specific classes. Like "armorer" and "weaponsmith" specialisations for "smith".

Classes added vanilla way will have 'vanilla' category.

To add classes and traits using new JSON api, put files containing structure from docs into 'config/classesandtraits'.

 

Docs

{
  // Player will be able to select only one class from each category
  "classCategories": [
    {
      // category with no currently avaiable classes will be hidden
      "code": "mycategory", // category code, including domain; if domain is missing, asset domain will be added
      "order": 0 // order in which categories follow, vanilla is always 0
    }
  ],
  "classes": [
    {
      "enabled": false, // use to disable
      "code": "myclass", // class code, including domain; if domain is missing, asset domain will be added
      "category": "game:vanilla", // category of this class; if domain is missing, asset domain will be added
      "requiredTraitsAndClasses": ["anothermod:another-class", "game:hunter"], // if specified, player should have these classes or traits present to be able to select this class; only traits and classes from previous categories count
      "forbiddenTraitsAndClasses": ["anothermod:yet-another-class", "game:resourcefull"], // same as requiredTraitsAndClasses but inverted
      // if none of requiredTraitsAndClasses and forbiddenTraitsAndClasses specified, class if always available
      "traits": ["resourceful", "game:forager"], // same as vanilla classes
      "gear": [],// same as vanilla classes; only gear from last category that have it specified will be used
      "additionalGear": [] // same as 'gear', but will be added to player regardless of other gear and wont be overriden
    }
  ],
  "traits": [
    {
      "code": "resourceful", // trait code, including domain; if domain is missing, asset domain will be added
      "type": "positive", // same as vanilla
      "persistsOnDeath": true, // if set to false, will be removed from player on death, use this field in cases when you give it to player programmatically, setting it to false for classes will result in undefined behavior
      "persistsOnWorldReload": true, // if set to false, will be removed from player on death, use this field cases when you give it to player programmatically, setting it to false for classes will result in undefined behavior
      "attributes": { // same as vanilla
        "animalLootDropRate": 0.1 // same as vanilla
      }
    }
  ]
}

 

Example

{
  "classCategories": [
    {
      "code": "game:vanilla",
      "order": 0
    },
    {
      "code": "t-1",
      "order": 1
    },
    {
      "code": "t-1.5",
      "order": 1.5
    },
    {
      "code": "t-2",
      "order": 2
    }
  ],
  "classes": [
    {
      "enabled": false,
      "code": "c-1",
      "category": "t-1",
      "traits": [],
      "gear": []
    },
    {
      "enabled": false,
      "code": "c-2",
      "category": "t-1",
      "traits": [],
      "gear": []
    },
    {
      "enabled": false,
      "code": "c-3",
      "category": "t-1",
      "traits": [],
      "gear": []
    },
    {
      "enabled": false,
      "code": "c-4",
      "category": "t-1.5",
      "requiredTraitsAndClasses": ["c-2"],
      "traits": [],
      "gear": []
    },
    {
      "enabled": false,
      "code": "c-5",
      "category": "t-1.5",
      "requiredTraitsAndClasses": ["c-2"],
      "traits": [],
      "gear": []
    },
    {
      "enabled": false,
      "code": "c-6",
      "category": "t-1.5",
      "requiredTraitsAndClasses": ["c-3"],
      "traits": [],
      "gear": [],
      "additionalGear": []
    },
    {
      "enabled": false,
      "code": "c-7",
      "category": "t-2",
      "traits": [],
      "gear": []
    },
    {
      "enabled": false,
      "code": "c-8",
      "category": "t-2",
      "traits": [],
      "gear": []
    },
    {
      "enabled": false,
      "code": "c-9",
      "category": "t-2",
      "traits": [],
      "gear": []
    }
  ],
  "traits": [
    {
      "code": "resourceful",
      "type": "positive",
      "persistsOnDeath": true,
      "persistsOnWorldReload": true,
      "attributes": {
        "animalLootDropRate": 0.1,
        "animalHarvestingTime": -0.25
      }
    }
  ]
}

Project description from Vintage Story Mod DB.

Pick your setup

Traits and Classes lib releases for each Vintage Story version.

Choose the version and loader you play, then open the matching release.

22 available setups

Showing the newest 12 of 22 game versions. Older files are in the list below.

Check the dependencies, then try the file in a copied instance before changing a world you care about.

Recent files

Traits and Classes lib versions and loaders

6 of 6 releases match

Looking for an older file? The official Vintage Story Mod DB project page is in Resources.