Mods / Skillbooks: Stats

Tags:
Loot Gameplay
Author:
Eironae
Side:
Both
Created:
Aug 15th at 3:01 AM
Last modified:
3 days ago
Downloads:
1530
Recommended download (for Vintage Story 1.21.0-pre.1 - 1.22.7):
skillbooksstats_0.7.2.zip  1-click install

Skillbooks: Stats

Skillbooks: Stats

Skillbooks: Stats does for stat-modifying traits what Skillbooks Core does for crafting traits: every trait that grants a stat bonus - walkspeed, damage, drop rates, and so on - gets its own lore-styled book, generated automatically when the server starts. Reading one permanently grants the trait it teaches.

Works entirely on its own. Skillbooks core is not required. If it's also installed, Stats detects it automatically and shares its trait registry and flavour text instead of duplicating anything, but neither mod ever forces the other to exist.

Known Compatibility Issues

  • XSkills (1.21) - All books register as aged books and give no boosts. This is likely due to the game version: Skillbooks is developed and tested for 1.22, so adding compatibility for 1.21 would mean developing backwards. If this is something you want, let me know in the comments. In the meantime, the XSkills fork should work. As of v0.6.0, xskills skillbooks should no longer have issues.

Found another conflict? Please open an issue on GitHub with which mod and what you're seeing.

How it works

At server start, Skillbooks: Stats scans every trait your mods define for a non-empty stat-modifier block and generates a book for each one it finds, including traits added by other class mods. Install a new class mod, restart the server, and its stat traits already have books waiting to be found.

A Skillbooks: Stats book's in-game tooltip, showing the trait it grants and its exact effects

Features

  • Dynamic discovery. No per-trait setup. New stat traits from other mods pick up books automatically.
  • Curated flavour text for every supported trait, whether or not core is installed.
  • Tooltips show exactly what you're getting. Which trait, and its precise stat effects.
  • Negative traits excluded by default (configurable). Reading a book is framed as a reward, so a pure downside showing up in that pool would be a mismatch most players won't expect. Mixed traits (tradeoffs, not pure downsides) stay included either way.
  • Vessel loot and trader offers, each independently configurable.

Traits with curated flavour

Every vanilla stat trait, plus every stat trait from these class mods, has hand-written flavour text rather than the procedural fallback:

  • Vanilla (11 traits)
  • Aldi's Classes (59 traits)
  • Rustbound Magic (4 traits)

A trait from any other installed mod still gets a book automatically (see "How it works" above), just with a plainer procedural description until flavour's written for it either here or by the mod's own author (see "Making a class mod?" below).

Configuration

A config file is generated on first run with control over:

  • Loot spawn chance and which block codes can drop a book
  • Trader spawn chance, which trader types offer books, and their price
  • An allowlist or blacklist to include or exclude specific traits
  • Whether negative-typed traits are included

Making a class mod?

Stats discovers your stat traits automatically, but if you'd rather write your own flavour text for your own trait's book instead of using the procedural fallback, just ship a file at assets/<yourmoddomain>/config/skillbooksstats/<traitcode>.json in your own mod:

{
  "title": "Your Book's Title",
  "blurb": "The in-world description shown when the book is read or inspected."
}

That one file takes priority over the curated list and works the same whether or not Skillbooks core happens to be installed on a given server; no need to coordinate with this repo, and no need to duplicate the file anywhere else.

Part of a family

Stats is the standalone addon to Skillbooks Core, which does the same thing for crafting traits. Install either on its own, or both together for the full set.

Open source

Skillbooks: Stats is developed in the open under the GPL-3.0 license. Source, issue tracker, and releases are all on GitHub. Bug reports, feature requests, and pull requests are welcome, see CONTRIBUTING.md to get started.

AI Disclaimer

AI assistance has been used in the creation of flavour text for some of the books, documentation within the GitHub repository, comment writing within the codebase and repetitive tasks during development. The generated output was personally checked, modified and thoroughly tested by me for quality and accuracy and is subject to change at any time.

Mod Version Mod IdentifierFor Game version Downloads Released Changelog Download 1-click mod install*
0.7.2 skillbooksstats
1.21.0-pre.1 - 1.22.7
210 3 days ago skillbooksstats_0.7.2.zip 1-click install

Fixed

  • A crash when viewing Leather in the handbook, on worlds that have never discovered a real stat trait.
0.7.2-dev.1 skillbooksstats
1.21.0-pre.1 - 1.22.7
55 4 days ago skillbooksstats_0.7.2-dev.1.zip 1-click install

Fixed

  • A crash when viewing Leather in the handbook, on worlds that have never discovered a real stat trait. The salvage recipe referenced an item wildcard that matched nothing.
0.7.1 skillbooksstats
1.21.0-pre.1 - 1.22.7
90 4 days ago skillbooksstats_0.7.1.zip 1-click install

Fixed

  • Stat books could fail to register if Skillbooks core happened to finish loading after Skillbooks: Stats once your load order was dependency sorted.
0.7.0 skillbooksstats
1.21.0-pre.1 - 1.22.7
122 5 days ago skillbooksstats_0.7.0.zip 1-click install

Added

  • New admin commands to clear a player's learned stat book traits, letting them be relearned. Works for a single player or everyone on the server, restricted by rank (Creative Player or higher for your own traits, Survival Moderator or higher for other players'). Only available when Skillbooks core isn't installed -- use core's own command instead if it is.
  • A way to write your own title and description for any stat book, overriding the built-in text (uses Skillbooks core's own override list instead, if core is installed).
  • Book descriptions now note which mod (or Vintage Story itself) a trait came from.
  • Stat books now show up when searching "skillbooks" in the handbook.

Changed

  • Stat books now appear in the handbook by default. A new config option brings back the previous behavior of keeping them hidden.

Fixed

  • Rerolling a book (holding a temporal gear while reading) could occasionally grant you the newly-rerolled trait immediately instead of giving you a fresh book to read.
0.6.0 skillbooksstats
1.21.0-pre.1 - 1.22.7
291 Aug 31st at 6:27 PM skillbooksstats_0.6.0.zip 1-click install

Added

  • Support for Vintage Story 1.21.
  • Compatibility for XLib & XSkills
  • Salvage: turn a stat book you don't want into leather with a knife.
  • Reroll: hold a temporal gear in your offhand while reading to trade a book for a different random trait.
  • Illegible books: a stat book whose trait's mod is removed becomes a distinct illegible item instead of vanishing, matching core's existing behavior.

Fixed

  • A rare crash when rerolling a book while your inventory is full.
  • Renamed an internal item registration key to fix a conflict with XLib's own skillbooks.
0.5.1 skillbooksstats
1.22.0-pre.1 - 1.22.7
112 Aug 30th at 2:24 PM skillbooksstats_0.5.1.zip 1-click install

Fixed

  • Learned Traits no longer shows traits from a previous character after using the admin charsel command.

Added

  • New config option KeepTraitsOnCharSel (default true), restoring skillbook-granted trait bonuses charsel would otherwise drop. Ignored when Skillbooks core is also installed -- core's own setting covers both mods.
0.4.0 skillbooksstats
1.22.0-pre.1 - 1.22.7
338 Aug 19th at 8:06 PM skillbooksstats_0.4.0.zip 1-click install

Added

  • Learned Traits tab in the character screen, alongside Character and Traits. Lists every trait learned from a stat book, including any stat bonuses, with a working scrollbar (vanilla's own Traits tab has a pre-existing bug with overflowing content). Skipped automatically when Skillbooks core is also installed as core's own tab already covers both mods.
0.3.1 skillbooksstats
1.22.0-pre.1 - 1.22.6
301 Aug 15th at 3:15 AM soundbyter-skillbooksstats-v0.3.1_v1.22.6.zip 1-click install

Changed

  • modinfo.json's website field now points at this mod's ModDB page.
  • Pinned against Skillbooks.Core 0.3.1.

No functional changes.

0.3.0 skillbooksstats
1.22.0-pre.1 - 1.22.6
11 Aug 15th at 3:02 AM Empty soundbyter-skillbooksstats-v0.3.0_v1.22.6.zip 1-click install

31 Comments (oldest first | newest first) (threaded | flat)

maculator, 5 days ago

Since the latest update it throws erros when loading a world "instance not bound to an object".

Eironae , 4 days ago
@maculator: Since the latest update it throws erros when loading a world "instance not bound to an object".

Do you have a server log for me I could use? I'll be bugfixing blind otherwise.

Eironae , 4 days ago
@maculator: Hope thats what you need: https://filebin.net/orvz540txio2z7ji

This is exactly what I need, thank you! I'll look into this now and see what it could be.

Eironae , 4 days ago
@maculator: Hope thats what you need: https://filebin.net/orvz540txio2z7ji

It was a simple error, just released a patch now.

Modlists are sorted by dependency order in terms of when something loads, if Skillbooks: Stats happens to load before Skillbooks Core then it tried and failed to find its config to latch onto.

 

Let me know if it happens again with a new log :)

Aodhwyn, 6 days ago

Not sure if it would be for here or not, I posted over on the new magic mod RunicMagic moddb, but there seems to be a confliction, skillbooks is trying to create something for it possibly and is causing a client crash when pressing H on leather

Eironae , 3 days ago
@Aodhwyn: Not sure if it would be for here or not, I posted over on the new magic mod RunicMagic moddb, but there seems to be a confliction, skillbooks is trying to create something for it possibly and is causing a client crash when pressing H on leather

Hello! Just informing you that the error you have been experiencing may not be related to RunicMagic at all as I have just patched an issue regarding the leather recipe. Could you download the recent version and let me know if it fixes the issue? Thank you :)

VidRyan, Sep 2nd at 12:57 PM

What is the drop rate for these skill books? After installing the mod, I went on a crusade to check every trader I could find, and after about two dozen, I still had not found a single skill book. I assume they also drop from ruins, but I didnt find any there either. I went a little crazy and turned on fly/noclip to try to check as many underground ruins as possible. Is this a mod that requires tinkering with the config file before it actually works? I can't tell if Im looking in the wrong places or if it's just a string of bad rolls.

Eironae , Sep 2nd at 7:16 PM
@VidRyan: What is the drop rate for these skill books? After installing the mod, I went on a crusade to check every trader I could find, and after about two dozen, I still had not found a single skill book. I assume they also drop from ruins, but I didnt find any t

From the sounds of it, you had some bad rolls, but the chances are quite low by default. I did this because if you are playing with vanilla traits only and you have good drop chances, you could exhaust all the skillbooks very quickly. Vintage Story doesn't add many traits on its own.

 

In terms of traders, by default only treasure hunters can carry skillbooks. They also can't spawn with a skillbook in their initial stock, because the mod waits for a trader's inventory to refresh (usually once every 7 in-game days) so it can inject a percentage chance of a book being in their stock. This means if you've visited each trader only once then you won't see it. This is down to Vintage Story not exposing an easy method to inject items for traders to sell, but I am looking into alternatives for it.

 

As for ruins, books have a small chance of dropping when you break any type of cracked vessel.

 

The chances for each roll, as mentioned above, is intentionally low by default: cracked vessels have a 0.1% of dropping a book, and traders have a 0.5% chance to sell one per restock. Even in ideal conditions, it can take many restocks and cracked vessels to get a book. They're permanent character upgrades so rarity is intentional for balancing purposes.

 

That being said I tried to make as much as I could configurable, so here's a quick guide for you.

 

Config files for the mod can be found in the following locations, assuming your installation is default:

  • Windows: %appdata%\VintagestoryData\ModConfig\skillbooks.json
  • Linux: ~/.config/VintagestoryData/ModConfig/skillbooks.json
  • macOS: ~/Library/Application Support/VintagestoryData/ModConfig/skillbooks.json

 

The LootSpawnChance and TraderSpawnChance variables are percentage decimals, so for example if you wanted the cracked vessel chance set to 0.5% and the trader spawn chance as 2.5%, you would write it as so:

"LootSpawnChance": 0.005,
"TraderSpawnChance": 0.025

To make a specific trait's book easier to find without touching the rest of the books, you can set an individual override per trait code:

"PerTraitOverrides": {
  "bowyer": { "LootSpawnChance": 0.02 }
}

To let more trader types sell the book you can add them in the TraderOffers array, like this:

"TraderOffers": [ "treasurehunter", "artisan", "luxuries" ]

(Alternatively you can grant every trader a chance to sell a book by defining this instead:)

"TraderOffers": [ "trader" ]

 

If you just want to make sure it works, then you can set it to this to guarantee a book drop on your next restock and cracked vessel:

"LootSpawnChance": 1.0,
"TraderSpawnChance": 1.0

 

Hope this helps! If you have any suggestions for config additions or you find a bug during use then please do let me know. 

VidRyan, Sep 3rd at 12:23 AM
@Eironae: From the sounds of it, you had some bad rolls, but the chances are quite low by default. I did this because if you are playing with vanilla traits only and you have good drop chances, you could exhaust all the skillbooks very quickly. Vintage Story doesn'

I appreciate the thorough response! I wrote that while at work, so I didn't have access to my computer to check anything, but when I got home I did find the config file. I just bumped everything up by a factor of 10. 1% out of cracked vessels and 5% off traders seems reasonable for my mellow solo survival world. I am curious to find out how it works with Aldi's Classes, particularly since I have the version that disables classes and only enables the craftable items. I'm not sure if that disables the traits as well, or if I have to disable that mod (hopefuly without breaking anything). Maybe I'll test it in a creative world first just in case.

Eironae , Sep 3rd at 9:27 AM
@VidRyan: I appreciate the thorough response! I wrote that while at work, so I didn't have access to my computer to check anything, but when I got home I did find the config file. I just bumped everything up by a factor of 10. 1% out of cracked vessels and 5% off t

When I was playing with Aldi's Classes I had the classes enabled and it worked like a dream, so I couldn't tell you how it works otherwise. I actually designed the mod around it, since my friends and I loved the class system but could never get enough people to cover all our bases and needs, so we figured a way to learn traits from other classes would help.

 

I would imagine it disables the traits on the crafting recipes, but let me know how it goes. Depending on if it still declares trait codes before disabling them I may need to do a patch for it.

FatRefrigerator, Sep 1st at 11:35 PM

Will this grab the proficiency traits from Combat Overhaul and turn them into books, too?

Eironae , Sep 2nd at 12:48 AM
@FatRefrigerator: Will this grab the proficiency traits from Combat Overhaul and turn them into books, too?

Combat Overhaul was incompatible with some of my mods during my playthrough so haven't had the opportunity to test that yet. If it registers the traits the same way races and classes do then it should. If you find it doesn't then please do let me know and I'll work on compatibility for it:)

Eironae , Sep 2nd at 10:07 AM
@FatRefrigerator: Is there a way to debug/test the mod? Like make it spawn procedural books in an easy to check way?

The best way to check is to enable Creative mode, all Skillbooks that are registered appear in a tab in the inventory. If you can't find the traits there, then they didn't get picked up on server start.

FatRefrigerator, 6 days ago (modified 6 days ago)
@Eironae: The best way to check is to enable Creative mode, all Skillbooks that are registered appear in a tab in the inventory. If you can't find the traits there, then they didn't get picked up on server start.

For those who come after, Combat Overhaul does indeed work.

Although some of the books are named the code name like "combatoverhaul:trait-armorproficiency", instead of "Armor Proficiency".

 

Also no clue the feasibility on this, but adding some way to edit the flavor text on the books (even mod added) would be nice. Not sure if thats the sort of thing that you can have the config pick up once the game is run with both mods active.

Eironae , 6 days ago
@FatRefrigerator: For those who come after, Combat Overhaul does indeed work. Although some of the books are named the code name like "combatoverhaul:trait-armorproficiency", instead of "Armor Proficiency". Also no clue the feasibility on this, but adding some way to edit

Should be doable. I'll just give the option to specify custom names and descriptions that takes priority over other definitions.

 

Thanks for testing that, good to know it works at least!

Magula, Aug 30th at 6:54 PM

This is awesome! It plugs the gap in singleplayer for all the different class-crafting recipes added by class mods without being broken (disabling the requirements) or awkward/cheaty (charsel via command or other mechanism). Thank you for making this.

DrWrights, Aug 27th at 3:20 AM (modified Aug 27th at 8:01 AM)

Very awesome mod, I really hope you make that xskills compatibility patch soon

Edit: Testing around, it workswith xskills fork  , tho the learned traits tab still shows all the traits you learned even after you charsel and lose access to those bonuses. 

Eironae , Aug 30th at 1:43 PM
@DrWrights: Very awesome mod, I really hope you make that xskills compatibility patch soonEdit: Testing around, it workswith xskills fork , tho the learned traits tab still shows all the traits you learned even after you charsel and lose access to those bonuses.

Thanks for the report. From what I can find, the original xskills is developed up to 1.21 while Skillbooks is built for 1.22, so there's likely an engine conflict that's causing Skillbooks to misbehave. I am a new player, so I've never used 1.21.

Only thing I can realistically do for that is develop a build for 1.21. I don't usually build backwards but if there is enough demand from people using this mod then I am happy to do it.

 

In the meantime though I'll work on compatibility for xskills fork seeing as it's the same version.

Eironae , Aug 30th at 5:32 PM
@DrWrights: it only renders the xskills exp books useless, everything else with the mod works like clockwork.

Ahh okay! Shouldn't be too difficult to sort out then. I will see what I can do o7

Eironae , Aug 31st at 6:29 PM
@DrWrights: it only renders the xskills exp books useless, everything else with the mod works like clockwork.

0.6.0 should be compatible with xskills & 1.21 now! Both my mod and XLib registered items under "ItemSkillbook" so they were overriding each other.

moneymanwill, Aug 25th at 1:36 AM

all of my books are just like dark olive aged book or whatever variant there are no boosts though

Eironae , Aug 26th at 12:06 AM
@moneymanwill: all of my books are just like dark olive aged book or whatever variant there are no boosts though

What is your modlist? There is an existing incompatibility with xskills that I am currently working on but without your modlist I can't say for sure.

Eironae , Aug 27th at 12:53 AM
@moneymanwill: damnnn yeah i have x skills

I figured as much! I am working on a compatibility patch for it but I've never used xskills before so I'm familiarising myself with it. I'll post an update once there's progress.

Ashleyyy33, Aug 15th at 7:16 PM (modified Aug 15th at 7:49 PM)

Are there books that remove negatives?

Eironae , Aug 16th at 12:56 AM
@Ashleyyy33: Are there books that remove negatives?

Currently no, but that is an interesting idea. I might add that in a future update as a toggleable feature.