Mods / RPG Item Rarity

Category: #Magic #Other #Weapons
Author: Yew
Side: Both
Created: Sep 21st 2022 at 4:54 AM
Last modified: Sep 23rd 2022 at 8:40 PM
Downloads: 2055
Follow Unfollow 35

Latest file:
rpgitemrarity-1.0.2.zip



Makes weapons, tools, and armor get assigned a rpg-esque rarity which improves their stats.

It is written in a way that should ensure compatibility with modded items as well.

Partially an example mod for my patch I'm working on called Attributer.

How to use:

Items when obtained automatically have rarity generated, this includes loot drops and chests.

Items that don't have rarity need to be "appraised" by dropping them and picking them back up, or using them.

The mod does work on existing worlds, and can be safely removed as well.

Requirements:

Attributer

Features:

Six different item raritys that modify stats:

Rarity: Stat Modifier: Rarity Chance:
Common   0% Stat Bonus. 50%
Uncommon 10% Stat Bonus. 20%
Rare 20% Stat Bonus. 15%
Epic 30% Stat Bonus. 10%
Legendary 40% Stat Bonus. ~5%
Unique 50% Stat Bonus. ~1%

Stats Modified:

Tools:

  • Durability.
  • Attack Power.
  • Mining Speed.

Weapons:

  • Durability.
  • Attack Power.
  • Ranged Damage.

Shields:

  • Durability.
  • Damage Absorption.

Armor:

  • Durability.
  • Flat Damage Reduction.

Clothes:

  • Durability.
  • Warmth.

Planned Features (Maybe):

  • Configuration File.
    • % Chance.
    • Modifier %.
    • Tiers.
    • Names.
  • Localization Support.
Spoiler!
Will eventually be developed into a prefix/suffix system. (e.g. Terraria.)

Please report any bugs!

Version For Game version Downloads Release date Changelog Download
v1.0.2 1773 Sep 23rd 2022 at 8:40 PM Show rpgitemrarity-1.0.2.zip
v1.0.1 164 Sep 22nd 2022 at 5:30 PM Show rpgitemrarity-1.0.1.zip
v1.0.0 118 Sep 22nd 2022 at 5:17 AM Show rpgitemrarity-1.0.0.zip

17 Comments (oldest first | newest first)

💬 RianAshes, 3 days ago

Hello. Here is a conflict with xSkill. You can't break grass with any tool, exept knife or hand, or locust nest with pickaxe. Seems like you can't destroy blocks with "wrong" tools, i.e. break planks with shovel or dirt with pickaxe. Problem occurs right after you "appraise" tool, until that - any tool can break any block. But appraise it - and you curse it, so it can break only tool-related blocks.

I have installed only xSkills + xlib and attributer + rpg item rarity. Because problem occurse only after appraising of item - i think that problem can be on your side.

There is nothing interesting in game logs, no errors or even warnings.
This is great mod, but this conflict is a big pain. Espessialy locust nests, whitch can be broken only by bare hands.

💬 Seiyria, 3 days ago

I'm enjoying this mod so far, but I ran into a crash when I interact with our beehives. Any time angry bees spawn the server crashes: 

 

1.2.2023 20:44:13 [Fatal] System.NullReferenceException: Object reference not set to an instance of an object
at attributer.src.patch.WearableStatsPatch.handleDamagedWearableStats (Vintagestory.API.Common.IPlayer player, System.Single damage, Vintagestory.API.Common.DamageSource dmgSource, Vintagestory.API.Common.ICoreAPI& ___api, System.Single& __result) [0x0099f] in <eea4f6c535c743898b0cd7360e22c393>:0
at (wrapper dynamic-method) Vintagestory.GameContent.ModSystemWearableStats.Vintagestory.GameContent.ModSystemWearableStats.handleDamaged_Patch2(Vintagestory.GameContent.ModSystemWearableStats,Vintagestory.API.Common.IPlayer,single,Vintagestory.API.Common.DamageSource)
at Vintagestory.GameContent.ModSystemWearableStats+<>c__DisplayClass8_0.<Event_PlayerJoin>b__1 (System.Single dmg, Vintagestory.API.Common.DamageSource dmgSource) [0x00000] in <7256d91810284f579e2e7941793953ac>:0
at Vintagestory.GameContent.EntityBehaviorHealth.OnEntityReceiveDamage (Vintagestory.API.Common.DamageSource damageSource, System.Single& damage) [0x00021] in <9c38126554f4487fb83f000702c9438e>:0
at Vintagestory.API.Common.Entities.Entity.ReceiveDamage (Vintagestory.API.Common.DamageSource damageSource, System.Single damage) [0x00047] in <91db2521046c453ea2051bafcf1a8522>:0
at Vintagestory.API.Common.EntityAgent.ReceiveDamage (Vintagestory.API.Common.DamageSource damageSource, System.Single damage) [0x00000] in <91db2521046c453ea2051bafcf1a8522>:0
at Vintagestory.GameContent.AiTaskMeleeAttack.ContinueExecute (System.Single dt) [0x0013d] in <9c38126554f4487fb83f000702c9438e>:0
at Vintagestory.GameContent.AiTaskManager.OnGameTick (System.Single dt) [0x000e4] in <9c38126554f4487fb83f000702c9438e>:0
at Vintagestory.GameContent.EntityBehaviorTaskAI.OnGameTick (System.Single deltaTime) [0x00076] in <9c38126554f4487fb83f000702c9438e>:0
at Vintagestory.API.Common.Entities.Entity.OnGameTick (System.Single dt) [0x00100] in <91db2521046c453ea2051bafcf1a8522>:0
at Vintagestory.API.Common.EntityAgent.OnGameTick (System.Single dt) [0x007a0] in <91db2521046c453ea2051bafcf1a8522>:0
at Vintagestory.GameContent.EntityBeeMob.OnGameTick (System.Single dt) [0x0005e] in <7256d91810284f579e2e7941793953ac>:0
at Vintagestory.Server.ServerSystemEntitySimulation.TickEntities (System.Single dt) [0x00035] in <ff0c509c81c540cc89f5bdcbaf20f7cf>:0
at Vintagestory.Server.ServerSystemEntitySimulation.OnServerTick (System.Single dt) [0x00167] in <ff0c509c81c540cc89f5bdcbaf20f7cf>:0
at Vintagestory.Server.ServerMain.Process () [0x001ba] in <ff0c509c81c540cc89f5bdcbaf20f7cf>:0

 

Hope this helps at all! It looked like it was an issue with attributer but since this is the only mod that uses it (AFAIK) I wasn't sure if this was the right place to report or not.

💬 Wenex, Jan 1st at 4:07 PM

Hello Yew

Apologies, I'm new to modding Vintage Story, I haven't noticed you need Attributer as required mod for this to work. I installed Attributer and now it works without issues.

💬 Lexingtondavid, Dec 29th 2022 at 2:39 AM

Agreed. It's a shame to get an Epic or Unique spear or knife only for it to be the same as a common tool of the same kind

💬 Wenex, Dec 29th 2022 at 2:06 AM

Hey. I have been using this mod for around 15ish hours and it feels like it doesn't work? I mean no matter what type I get, even Legendary, the stats don't change when you hover on items and they dont "feel" like they last longer.

17.9 here

💬 Yew, Dec 16th 2022 at 9:56 PM

Krieden

Interesting, I have not tested it with xskills. I will check it out when I have time! Thanks for letting me know.
I plan on eventually officially adding full xskills and other mod support for it, so maybe this is a good time to start!

💬 Krieden, Dec 12th 2022 at 6:24 PM

@Yew

I have this installed on a hosted server with xskills and eveything seems ok except the daggers. I cant seem to harvest with them sometimes. Now I am fairly new so I dont know if it could be an issue with snow (wich sux lol) but I cant harvest trees or bushes and grass only when its not in a snow block. I guess I need to know if its an issue with the mod or an issue with snow or snow with the mod. Otherwise its a really nice mod. Thanks

Edit: Started a single player game and tried using the knife in the snow and in temperate...seems the knife can not harvest tress or bushes, it can harvest grass as long as its not on a snow tile. Doubt thats intended but there ya go :)

💬 Craluminum, Nov 25th 2022 at 6:34 PM

Does it have source code somewhere? I know how to make it apply rarity when you holding it in hands instead of dropping etc.

💬 Yew, Nov 24th 2022 at 12:36 AM

PeterSanderson

There is not. I had the mod work that way at some point, but ran into the issue of shift clicking the output assigning all crafted items the same rarity. I could not make a workaround for it because the required functions don't seem to be exposed.

💬 PeterSanderson, Nov 2nd 2022 at 3:46 PM

Is there any way to offer a config option that only makes "items of quality" for loot drops and treasure? Or to ensure player crafted items don't have values assigned merely by dropping and picking up?

 

💬 Yew, Sep 24th 2022 at 5:53 PM

Jaloopy

The problem is fixed! Thanks for letting me know!
You just need to download the newest version of  Attributer.

💬 Jaloopy, Sep 24th 2022 at 2:40 AM

Running into some weird problems where my game crashes because of attributer,
"9/23/2022 10:33:37 PM: Critical error occurred in the following mod: attributer@1.0.2"
"System.ArgumentException: Empty name is not legal. Parameter name: oldValue"

Not too sure why this is happening, any ideas?

💬 Yew, Sep 23rd 2022 at 12:08 AM

xCoiotex
It could be integrated with both.
With Bullseye you would need to write a compatibility mod for Attributer, and with Xskills you could just write a compatibility mod for this mod.
I plan on atleast poking around with xskills compatibility for this mod. Maybe. Currently spending time expanding Attributer so its more useful.
This is already somewhat compatible with Bullseye, Bullseye weapons don't get any bonus though, it's purely visual as far as I'm aware.
It would probably help once I put these mods up on GitHub.

💬 xCoiotex, Sep 22nd 2022 at 8:03 PM

Is it possible to integrate this with this mods: Bullseye and Xlibs/ Xskills?

💬 Yew, Sep 22nd 2022 at 4:12 PM

@1618 Yep! You just have to use the item afterward or drop it on the ground and pick it up again.

 

💬 1618, Sep 22nd 2022 at 3:42 PM

One of my favorite features.

Will Quality be applied to Crafted items?

💬 MrBadWithNames, Sep 22nd 2022 at 9:54 AM

Looks awesome! 

Definitely going to give it a try :D

(edit comment delete)