Mods / Trait Acquirer
Author: Arkhael
Side: Both
Created: Aug 9th at 7:53 PM
Last modified: Oct 9th at 3:36 PM
Downloads: 2145
Follow Unfollow 88
Latest file for v1.19.8:
traitacquirer_0.9.5.zip
1-click install
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.
New 0.9.4: Trait Exclusivity & ListTraits Command
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.
Example:
{
"file": "game:config/traits",
"op": "addmerge",
"path": "/-",
"value": {
"code": "testExclusive",
"type": "mixed",
"attributes": {},
"exclusivewith": ["clothier", "technical"]
}
}
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.
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.
New 0.9.5: Trader & Loot Configurability
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.
ToDo:
Class Manual Models and Textures
Particle & 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.
Configurable prices and drop rates for manuals
In-game class changing items
Handbook page listing traits and their details <== Currently Working On
Proper Documentation on making new content intended for this mod
Randomizer item to make acquiring traits more interesting
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
Version | For Game version | Downloads | Release date | Changelog | Download | 1-click mod install* |
---|---|---|---|---|---|---|
v0.9.5 | 692 | Oct 9th at 3:36 PM | Show | traitacquirer_0.9.5.zip | Install now | |
v0.9.4 | 115 | Oct 7th at 4:15 PM | Show | traitacquirer_0.9.4.zip | Install now | |
v0.9.3 | 599 | Sep 18th at 12:03 PM | Show | traitacquirer_0.9.3.zip | Install now | |
v0.9.2 | 739 | Aug 13th at 1:04 PM | Show | traitacquirer_0.9.2.zip | Install now |
Love this mod, a definite must have. Seems to work fine in my SP games but when Ive added it to a 1.19.8 server players readyling the trait books get a CTD and the stack trace seems to be release to a collection being modified while read.
I understand that you've got a lot going on so I'm happy to wait for you to have free time and the inclination to work on this more, just thought I'd let you know what I saw in the logs.
I closed PR just because of me being stupid and I was still working on the mod on the same branch I wanted to push fixes for yours. So now it would change too much with your mod. But glad to hear you're back, and that you gonna push some fixes soon ^^
propaneko Rhayvhenn SalazarWindriver
Apologies for the disappearing act, a combination of a death in the family and the Factorio expansion releasing isn't condusive to me spending much time in social spaces.
To answer all the comments in chronological order:
Propaneko: I'll send you my discord via Github, thank you for the contribution. Stacking traits was implemented in 0.9.4, your mod fork seems to revert some of what made that work, either way I'll double check again when I go hunting all these bugs. Not quite sure what exactly you mean by "all the traits seems not to make any effect, only after applying class it works" all the methods the mod give to add traits should (assuming I didn't miss anything) only add traits when they can be applied and then apply them immediately after, if something is going wrong with the application still I'll hunt it down
Rhayvhenn: Thanks for trying the mod, I'll see what I can do to get that one. If possible can you confirm if Propaneko's fork fixed that for you or not?
SalazarWindriver: Vintage Story's logs are good but not all powerful so there's probably nothing you can do to get me anything useful as it's probably an issue with the variable states. My guess is that the difference in the way I've been applying the traits between versions has messed something up in your game state as far as the mod works. No need to worry it won't break the game in any way, I'll add something in the next update to ensure the variable is properly rebuilt on startup. Alternatively what's been happening with you could be some odd mod conflict as I've tried a few times and never been able to replicate this problem so if you could drop your modlist here I'd appreciate it and will take a look-see for potential issues.
ETA on fixes: A few days
ETA on Handbook update: Possibly at the same time as fixes, maybe a day or two more.
I may also set up a proper issue tracker so I can keep on top of all of this.
Thanks for your patience.
https://mods.vintagestory.at/edenvalrptraitacquirer Rhayvhenn
so I was able to get the tailor-specific recipe to work. but I just tried to repair a translocator with the technical but it cost me 3 gears which I believe I had working at one point after getting all of them. It's very weird how it keeps changing and I'm not sure there is any way to get a log of what it is doing since it is not crashing.
propaneko Im having the same issue. Found this mod, seeing it could solve my single player fashion issues, and then hits me with the "An Exception was throwing in while executing this command".
You said you have a workaround, would you be down to share?
Hi there, is there any chance I could contact you on discord? We're trying to figure out your mod and we have some small issues with it. Also will post a small PR for your mod on github as it fixes errors that occures when using commands. If not... any ETA for the stacking trait mechanism being pushed here or on the github? Also all the traits seems not to make any effect, only after applying class it works.
Arkhael Sweet!
SalazarWindriver What Arkhael said. You can have the 4 books provided by this mod, my issue was my expansion to the system where I ran into issues.
SalazarWindriver
Class crafting traits will all work together, as will the Technical trait, it's just stat traits that don't stack for the moment. It's actually already fixed on my end I'm just still working on the trait exclusivity, the game is set up to handle it just fine but the game stores the effect to a stat under the name "trait" which overrides every time a trait affects that stat, just had to give them all a unique name.
I did a quick test to confirm that the mod works with the Tailor's Delight crafting recipes and it did on my end, check to be sure you've used the book and have the trait in the Character Traits tab.
So, if I'm reading the last 2 comments correctly, only one class trait at a time? I have 4 traits and, starting with the clothier trait, I can't seem to make the flax twine with the wooden spindle. is there a way to make it so you can have all the traits active? if not is there a way to keep the books and only show what trait is active?
Blackmare
No there isn't, but I can add it as a feature. I'll also make the stat applications cumulative as that's gonna be a requirement if all traits are by default non-exclusive.
Arkhael is there any way to prevent the use of a book if they already have a different trait? Realized that the trait system isnt cumulative but rather it takes the latest effect.
Blackmare
Glad it worked out, I check in on the page every now and again so feel free to share any more issues you may have here.
The item randomiser is a great idea, tbh adding them to the gear randomizer was very much a stopgap measure so they're acquirable through exploration somehow. The eventual plan is their own set of custom ruins for the class ones, rarely from the trader and an option to craft them bound to each class for servers. Still, the idea behind the mod is flexibility for others to do fun stuff like you are as my time and ideas are ultimately limited.
@Arkhael you are not wrong in the trouble shooting being a pain haha
Somehow it got fixed. I want to say it was the lowercasing of all my stuff that fixed it. However I'm not super certain as I tried like 5 different ideas all at once. But now it works and is doing everything I needed on 1.20! Got them in traders and created a new scrapweaponkit type item so that my 400 or so traits dont create a huge burden on the gear randomizer haha.
Blackmare
Hey Blackmare, glad to see you're having fun making your own items, it can be a bit of a pain to troubleshoot by yourself so I'll try my best to help you out.
From the sets you've shared below the only difference I can see is that the former has an "i" at the end of "animalharvestingspeed" that the latter doesn't. Which is correct will depend on how you've set the "variantgroups" element up.
As for the black square thing, I have no idea what's up from just that much information, only thing I can tell is that it isn't an unloaded item as they come out as white cubes with a red question mark.
Is the issue with the restart consistent? If not, next time it happens go to the logs folder "AppData\Roaming\VintagestoryData\Logs" and copy the text files in there to somewhere else to preserve them as they're refreshed every time you load a world
Are your items patched into the trader's buy or sell lists? If not then them not recognising them is expected behaviour
If you want to catch me to chat and try and sort this out I'm usually active in the Solstin discord so if you show up there and holler I'll likely notice
New issue I'm running into where my items just become a black square after a restart and are not recognized by traders.
If you happen to have some time to chat let me know as everything seems to be done correctly both as a patch and as a wholely new item using the class but both are giving me the same result.
Interesting addition after trying a couple of things i thought might be the issue, i found that these two sets are somehow fundamentally different
"*-animalharvestingspeedi": {
"traitdata": {
"add": [ "animalHarvestingSpeedI" ],
"remove": []
}
},
"*-animalharvestingspeed": {
"traitdata": {
"add": [ "animalHarvestingSpeedI" ],
"remove": []
}
},
The first one being my own written out addition and the second being a copy and paste of your hunter and replacing it with the animal harvesting speed information.
which gives me a path for a fix on my end, albeit a slow one but just thought I'd let you know something wonky is occuring.
Figured it out! I had to patch out the default to make my choices show up instead
"*": {
"all": {"base": "game:item/lore/{type}"}
}
{
"op": "add",
"path": "/texturesByType/*-walkspeed*",
"value": {
"cover": {
"base": "game:item/lore/normal-teal"
}
},
"file": "traitacquirer:itemtypes/utility/trait-manual.json"
},
I'm running into an issue patching traitacquierer. My patch currently is allowing my books to show up and will give traits but they arent chaning to the book type I have marked. Do you happen to know why that might be?
It works fine if I edit the traitacquirer files directly so unsure why the patch isnt working
Sylvi
There are no separate commands to remove traits, both of the commands to add traits can be used to remove traits you just have to add the optional argument "rm"
Examples:
/acquiretrait frail rm
/givetrait frail Arkhael rm
Sweet, thank you much for the advice. I noticed the commands to add a trait doesn't have a reverse option that I can find, is the only way to remove the added trait with an item?
Sylvi
Should do, there won't be any items to add them unless you make them though. Because of how classes work they're currently unmodifiable so you'll always have those traits no matter what you do with this mod so if you want custom classes the best way to do it is start with a Commoner and add all the traits you want via the mod
ah man this is awsome I've really wanted a trait buy system for custome class setups for awhile now. Its cool to have an option that doesn't just involve disabling class recipes.
Does this work with modded traits?
Works great. Thanks for the help.
neobit
Thanks for the heads up about that incompatability issue, the issue was on my end as the mod hijacks the game's Traits tab the original tab isn't rendered however depending on the order the game loads things additional tabs added by other mods could in turn be taken over by the default traits tab. I have now added a step to remove the original tab at the end of the loading process so it should be compatible with any mods that add more character tabs.
As for the issue of finding the trait items, I intend to properly balance the methods to find or even create the books when I put together a 1.0 version, for now the simplest method is to buy one from a Treasure Trader.
Hello, I really like the idea of this mod. We started using it on our server, but still noone has found the book.
General guestion: is this compatible with Level up (mods.vintagestory.at/show/mod/11856)? I think we stopped seeing level up window after adding your mod.
EDIT: checked it out only with these two mods and yes, definately dont work together.
Arkhael That sounds really promising. Please keep this coming. It looks like this mod would fit both a modded and vanilla playstyle quite well. Imagine how much more of a progression it would give the game if you could not only find trait books like tinkerer and such, but also the likes of forager, soldier, hardy, etc. As I said, this looks pretty promising, and I hope you can bring these goals to life. To give a little example, we play on a server with Xskills and usually most people tend to use the commoner since you can already learn new skills with Xskills. But with an addition like that it would give even more progression till the endgame.
@dashr I'm glad you like it, that was part of my motivation but I mainly want to add to the game's exploration loop and give me a reason to start a world without ticking the box to unlock all recipes. I haven't ever played with Xskills but it does seem a good combination to test with and may give me more ideas. I'm itching a bit to add to this but getting my debug environment to work with the config loading and making the scrollbar for the traits menu took as long as the whole rest of the mod and tired me the hell out so I'm working on somethig else that should help with my understanding of the visual code stuff, so look forward to that being next giving this some polish.
Idk why I never thought of this but it's perfect for a server in combination with Xskills to allow additional progression. Thank you so much for making this :)