SANDBOX — this is a test environment. No servers are actually deployed and no real payments are charged.
Back to NxLabs

NxLabs / Vintage Story

Trait Acquirer

ABy Arkhael

Allows you to acquire additional traits through gameplay

Trait Acquirer

Description

Adds trait manuals that can be found in various game structures or purchased from the Treasure Trader to acquire the exclusive crafting recipes from each class.

Also adds two server commands to add or remove any extra traits, though this has no effect on class traits.

Config allows setting permission level for the commands as well as disabling the manuals altogether.

 

To make your own items that add and remove Extra Traits the item needs the class "traitacquirer.ItemTraitManual" and the attribute "traitdata" containing the arrays "add" and "remove" with all lowercase trait names in the relevant array for what you want. See the source for the trait-manual.json that does this for the mod.

<span style="color: #e74c3c;">New 0.9.4: Trait Exclusivity &amp; ListTraits Command</span>

<span style="color: #000000;">Traits can be made exclusive with one another by adding to the trait the "ExclusiveWith" array containing the trait codes for exclusive traits. This can be added to new traits or patched onto the default ones as needed.</span>

<span style="color: #000000;">Example:</span>

{
&nbsp; "file": "game:config/traits",
&nbsp; "op": "addmerge",
&nbsp; "path": "/-",
&nbsp; "value": {
&nbsp; &nbsp; "code": "testExclusive",
&nbsp; &nbsp; "type": "mixed",
&nbsp; &nbsp; "attributes": {},
&nbsp; &nbsp; "exclusivewith": ["clothier", "technical"]
&nbsp; }
}

Be warned that the prevention mechanism is unable to be bypassed so items that add mutually exclusive traits will be unusable, it does take into account removals however so removing an exclusive trait at the same time as you add the other is possible.

<span style="text-decoration: line-through;">All currently loaded traits can be listed alphabetically with the "/listtraits" command, this is a lot of text even with just the default 26. Will be replaced in future with a handbook page that lists trait properties as well as exclusivities to make it easier to keep track from in-game. </span>Replaced with the custom handbook pages in 0.9.6

<span style="color: #e74c3c;">New 0.9.5: Trader &amp; Loot Configurability</span>

Quite simple really (Though implementing it isn't), trader price and stock for manuals is configurable and as are the odds and rates of their appearing in the gear randomizer. Currently all manuals are treated the same to not bloat the config file or require too much work as the manuals aren't anywhere close to their final form.

<span style="color: #e74c3c;">New 0.9.6: Handbook Update</span>

A new Handbook tab has been added which contains automatically generated pages for each trait giving details as to what effects it has, which traits it is exclusive with and the code needed for use with the commands. It also generates a page for each type of trait: Positive, Mixed and Negative. This page links to all of the traits in that type for easier navigation.

Also in this update are:
Fixes for the application of trait effects, as well as a simplification of the code that does this to hopefully improve stability in multiplayer
Improvement of the commands, including a new flag to allow forced bypassing of the exclusivity rules (Note that if you have a non-compatible trait until it is removed you will not be able to gain new traits without forcing it)
Updating trader patches for 1.20, this unfortunately breaks the trader patches on older versions of the game so if you're running 1.19 and desperately want the patches to work use the old ones from 0.9.5 instead, the error messages from the patch won't break anything else just the trader stuff

&nbsp;

ToDo:

Class Manual Models and Textures

Particle &amp; Sound effects when using a manual

More manuals to acquire the non-crafting traits through gameplay, likely with custom traits to balance addition and removal of powerful traits.

<span style="text-decoration: line-through;">Configurable prices and drop rates for manuals</span>

In-game class changing items

<span style="text-decoration: line-through;">Handbook page listing traits and their details</span>

Proper Documentation on making new content intended for this mod

Randomizer item to make acquiring traits more interesting &lt;== Currently Working On

<span style="text-decoration: line-through;">Issue Tracker</span>

&nbsp;

Compatability Confirmed with:

Division of Labour https://mods.vintagestory.at/divisionoflabor&nbsp;
More Class Traits https://mods.vintagestory.at/show/mod/15539&nbsp;
Combat Overhaul https://mods.vintagestory.at/combatoverhaul&nbsp;

Incompatible (Cannot load traits, not is unusable) with:

Gardenerz https://mods.vintagestory.at/show/mod/11187&nbsp;

&nbsp;

Shoutout to the TraitLearner mod for having and achieving the idea in an earlier version. I considered taking over maintenance of it but the mod system has changed so much since then it was easier to just start from scratch.
https://mods.vintagestory.at/show/mod/1119

Ratings & reviews

No ratings yet

Sign in to leave a rating or comment.