Mods / Attributer

Category: #Tweak #Utility
Author: Yew
Side: Both
Created: Sep 21st 2022 at 3:57 AM
Last modified: Aug 1st 2023 at 12:34 AM
Downloads: 7576
Follow Unfollow 54

Latest file for Various v1.18.x:
attributer-1.0.5.zip 1-click install



A multi-class patch that makes lets you set attributes per item dynamically.

Basically wherever the code says "get parent object attribute" it instead "get object attribute if exists first".

Also adds a few new attributes that can be applied to items to modify their functionality.


Requirements:

  • None.

Incompatibilities:

  • Other mods which significantly overwrite base item types.

Mods requiring this:

New Attributes:

  • maxdurability.

Supported Attributes:

  • defaultProtLoss
  • protectionModifiers
    • protectionTier
    • highDamageTierResistant
    • flatDamageReduction
    • relativeProtection
  • statModifiers
    • healingeffectiveness
    • hungerrate
    • rangedWeaponsAcc
    • rangedWeaponsSpeed
    • walkSpeed
  • damage
  • attackpower
  • attackrange
  • miningspeed
  • miningtier
  • health
  • clothescategory
  • breakChanceOnImpact
  • requiresAnvilTier
  • workableTemperature

- Please note, some attributes are enabled by the api by default and do not need this mod.
- Search the official API and official survival mod github repositorys to check.

Attribute Exceptions:

  • perTierFlatDamageReductionLoss
  • perTierRelativeProtectionLoss

These aren't mirrored as other attributes are, as arrays aren't supported by the API.
Instead, they should be TreeAttributes, with the float values of "0" and "1" placed into them.
This is a workaround until the API updates.

How to use (For developers):

  1. Set an attribute on an item.
    1. Example (Set an items attack power):

      1. itemstack.Attributes.SetFloat("attackpower", 12f);

    2. Example (Set an items flat damage reduction):

      1. itemstack.Attributes.GetTreeAttribute("protectionModifiers").SetFloat("flatDamageReduction", 8f);

  2. That's it. It should work if the attribute is supported.

How to use (Standalone):

  1. Use an command that supports or sets attributes.
    1. Example (Set the weapon in your hand's attack power.):

      1. /debug heldstattr attackpower float 1000000

  2. That should do it.

Please note you must mirror attributes exactly, including trees, to how the parent item is.

Version For Game version Downloads Release date Changelog Download 1-click mod install*
v1.0.5 4237 Aug 1st 2023 at 12:34 AM Show attributer-1.0.5.zip Install now
v1.0.4 737 Jul 10th 2023 at 4:11 AM Show attributer-1.0.4.zip Install now
v1.0.3 1682 Sep 24th 2022 at 5:53 PM Show attributer-1.0.3.zip Install now
v1.0.2 261 Sep 23rd 2022 at 11:47 PM Show attributer-1.0.2.zip Install now
v1.0.1 325 Sep 22nd 2022 at 5:31 PM Show attributer-1.0.1.zip Install now
v1.0.0 290 Sep 22nd 2022 at 5:19 AM Show attributer-1.0.0.zip Install now

13 Comments (oldest first | newest first)

💬 YewAuthor, May 21st at 5:47 PM

The mod's definitely out of date and will not work properly.

💬 Ashela, Apr 19th at 7:58 AM

Crashed when I release an arrow from simple bow: 

Running on 64 bit Windows 10.0.19045.0 with 16237 MB RAM
Game Version: v1.19.7 (Stable)
19/04/2024 09:56:13: Critical error occurred in the following mod: attributer@1.0.5
Loaded Mods: aculinaryartillery@1.1.4, attributer@1.0.5, buzzwords@1.5.0, femininity@0.1.3, TA_fieldsandplateaus@1.0.2, flourbags@1.0.2, capreolinae@1.0.5, pantherinae@1.1.4, geodesandgemstones@1.1.1, HangingOilLamps@1.0.1, moreundergarments@0.0.1, moreicons@1.1.0, rooffix@0.0.1, rpgitemrarity@1.0.4, game@1.19.7, betterfirepit@1.1.4, betterruins@0.3.4, butchering@1.5.5, carryon@1.7.4, commonlib@2.3.4, expandedfoods@1.6.8, herbarium@1.1.0, hudclock@3.3.0, meteoricexpansion@1.2.5, moreanimals@1.3.3, petai@2.2.3, rustboundmagic@1.7.4, vtpp@1.1.1, creative@1.19.7, vsquest@1.2.0, survival@1.19.7, wildfarmingrevival@1.1.7, xlib@0.8.1, cats@2.0.1, wildcraftfruit@1.1.1, xskills@0.8.2
System.MissingFieldException: Field not found: 'Vintagestory.API.Common.Entities.Entity.AnimManager'.
at attributer.src.patch.ItemBowPatch.OnHeldInteractStopBow(Single secondsUsed, ItemSlot slot, EntityAgent byEntity, BlockSelection blockSel, EntitySelection entitySel)
at Vintagestory.GameContent.ItemBow.OnHeldInteractStop_Patch4(ItemBow this, Single secondsUsed, ItemSlot slot, EntityAgent byEntity, BlockSelection blockSel, EntitySelection entitySel)
at Vintagestory.Client.NoObf.SystemMouseInWorldInteractions.HandleHandInteraction(Single dt) in VintagestoryLib\Client\Systems\Player\MouseInWorldInteractions.cs:line 329
at Vintagestory.Client.NoObf.SystemMouseInWorldInteractions.OnGameTick(Single dt) in VintagestoryLib\Client\Systems\Player\MouseInWorldInteractions.cs:line 162
at Vintagestory.Common.GameTickListener.OnTriggered(Int64 ellapsedMilliseconds) in VintagestoryLib\Common\Model\GameTickListener.cs:line 27
at Vintagestory.Common.EventManager.TriggerGameTick(Int64 ellapsedMilliseconds, IWorldAccessor world) in VintagestoryLib\Common\EventManager.cs:line 57
at Vintagestory.Client.NoObf.ClientMain.MainRenderLoop(Single dt) in VintagestoryLib\Client\ClientMain.cs:line 815
at Vintagestory.Client.NoObf.ClientMain.MainGameLoop(Single deltaTime) in VintagestoryLib\Client\ClientMain.cs:line 731
at Vintagestory.Client.GuiScreenRunningGame.RenderToPrimary(Single dt) in VintagestoryLib\Client\MainMenu\Screens\GuiScreenRunningGame.cs:line 200
at Vintagestory.Client.ScreenManager.Render(Single dt) in VintagestoryLib\Client\ScreenManager.cs:line 676
at Vintagestory.Client.ScreenManager.OnNewFrame(Single dt) in VintagestoryLib\Client\ScreenManager.cs:line 651
at Vintagestory.Client.NoObf.ClientPlatformWindows.window_RenderFrame(FrameEventArgs e) in VintagestoryLib\Client\ClientPlatform\GameWindow.cs:line 88
at OpenTK.Windowing.Desktop.GameWindow.Run()
at Vintagestory.Client.ClientProgram.Start(ClientProgramArgs args, String[] rawArgs) in VintagestoryLib\Client\ClientProgram.cs:line 324
at Vintagestory.Client.ClientProgram.<>c__DisplayClass9_0.<.ctor>b__1() in VintagestoryLib\Client\ClientProgram.cs:line 128
at Vintagestory.ClientNative.CrashReporter.Start(ThreadStart start) in VintagestoryLib\Client\ClientPlatform\ClientNative\CrashReporter.cs:line 93

💬 NukoSan, Feb 3rd at 12:49 AM

Bug - when I release an arrow from a simple bow (CTD):

03/02/2024 00:44:47: Critical error occurred in the following mod: attributer@1.0.5
Loaded Mods: ATadMoreLight@1.0.0, aculinaryartillery@1.0.16, africanmonitorlizards@1.0.7, arrowrecovery@1.0.0, arrowsstayaround@1.0.0, attributer@1.0.5, autopanning@1.0.1, autowalk@1.0.4, bds@1.0.0, bedrespawner@1.0.0, betterdrifters@2.1.3, blacksmithname@1.1.6, butcheringfix@1.0.0, buzzwords@1.6.0, composter@1.0.5, conquest@0.0.21, evaporite@1.0.0, extrachests@1.8.0, fantasycreatures@0.6.4, fasterladderclimbing@1.0.0, TA_fieldsandplateaus@1.0.2, fixedpaths@1.0.1, caninae@1.0.9, machairodontinae@1.0.0, gwb@1.0.1, HangingOilLamps@1.0.1, immersivecorpsedrop@1.0.2, ingotheating@1.0.2, knappingmastery@1.0.1, millwright@1.1.4, moreicons@1.1.0, MoreTorchHolders@1.0.0, nooffhand@1.0.1, peacockbasses@1.1.0, primitivesurvival@3.4.5, qptech@1.14.2, ragnamans-lit-torch-recipe@1.0.0, richerthandirt@1.2.1, rope-bridges@1.1.0, rpgitemrarity@1.0.4, rustandrails@1.0.4, scraps@1.0.0, sortablestorage@2.2.1, speararrowheadbits@1.1.0, stackables@2.0.5, sticksfromfirewood@1.0.0, temporalstormgear@1.0.1, translocatorengineeringredux@1.4.9, game@1.19.3, zoombuttonreborn@1.6.0, abcsreborn@0.1.5, additionalmolds@1.0.1, alloycalculator@1.0.0, animalcages@3.0.2, animationmanagerlib@0.5.1, autoatlas@1.0.1, beehivekiln@1.5.1, betterfirepit@1.1.4, betterruins@0.3.2, blacksmithgloves@1.0.1, bodyheatbar@1.0.1, canbeignited@1.1.0, carryon@1.7.4, commonlib@2.3.2, darkerdrifterspawns@1.0.1, expandedaitasksloader@1.0.8, extendedhudinfo@1.0.6, extrainfo@1.7.0, fieldsofsalt@1.2.0, fishing@1.1.5, fixhandbookclutter@1.0.5, fromgoldencombs@1.4.25, glowingprojectiles@1.1.3, grassiergrass@1.0.0, herbarium@1.0.4, sailboat@1.2.7, maltiezspears@0.0.1, mapautocenter@1.1.1, meteoricexpansion@1.2.5, morepiles@1.5.0, outlawmod@1.2.0, ovenfuel@1.0.0, petai@2.2.3, pileful@1.1.2, pomshadercache@1.1.0, recyclebags@1.0.1, recycleclothes@1.0.0, recyclestorage@1.0.1, rivers@2.3.0, rotcraft@1.0.1, simplestep@1.1.4, spawnhighlight@1.2.0, stonebakeoven@1.1.3, storagecontroller@1.0.6, storageoptions@1.0.2, strspawnchances@0.1.2, th3dungeon@0.2.1-rc.1, tieredsuperiority@1.1.1, useplanksinpitkiln@1.1.1, creative@1.19.3, survival@1.19.3, xlib119@0.7.4-dev.119, metalrecovery@0.1.19-pre.1, betterruinslootchanges@0.0.3, bugnetcompatibility@1.0.1, chemistrylib@1.1.5, cobvoices@1.0.0, tradercamps@1.0.8, em@2.5.0, extraoverlays@1.4.0, feverstonewilds@1.4.5, moreropeplease@1.0.0, pickupartist@0.2.0, playercorpse@1.9.0, shellpan@1.0.0, simplewinddirection@1.0.2, stonequarry@3.2.1, tallowcandles@0.1.0, wildcraftfruit@1.1.0, wildcrafttree@1.0.0, wolftaming@2.0.2, xskills119@0.7.5-dev.1191
System.MissingFieldException: Field not found: 'Vintagestory.API.Common.Entities.Entity.AnimManager'.
at attributer.src.patch.ItemBowPatch.OnHeldInteractStopBow(Single secondsUsed, ItemSlot slot, EntityAgent byEntity, BlockSelection blockSel, EntitySelection entitySel)
at Vintagestory.GameContent.ItemBow.OnHeldInteractStop_Patch4(ItemBow this, Single secondsUsed, ItemSlot slot, EntityAgent byEntity, BlockSelection blockSel, EntitySelection entitySel)
at Vintagestory.Client.NoObf.SystemMouseInWorldInteractions.HandleHandInteraction(Single dt) in VintagestoryLib\Client\Systems\Player\MouseInWorldInteractions.cs:line 329
at Vintagestory.Client.NoObf.SystemMouseInWorldInteractions.OnGameTick(Single dt) in VintagestoryLib\Client\Systems\Player\MouseInWorldInteractions.cs:line 162
at Vintagestory.Common.EventManager.TriggerGameTick(Int64 ellapsedMilliseconds, IWorldAccessor world) in VintagestoryLib\Common\EventManager.cs:line 57
at Vintagestory.Client.NoObf.ClientMain.MainRenderLoop(Single dt) in VintagestoryLib\Client\ClientMain.cs:line 808
at Vintagestory.Client.NoObf.ClientMain.MainGameLoop(Single deltaTime) in VintagestoryLib\Client\ClientMain.cs:line 724
at Vintagestory.Client.GuiScreenRunningGame.RenderToPrimary(Single dt) in VintagestoryLib\Client\MainMenu\Screens\GuiScreenRunningGame.cs:line 200
at Vintagestory.Client.ScreenManager.Render(Single dt) in VintagestoryLib\Client\ScreenManager.cs:line 675
at Vintagestory.Client.ScreenManager.OnNewFrame(Single dt) in VintagestoryLib\Client\ScreenManager.cs:line 650
at Vintagestory.Client.NoObf.ClientPlatformWindows.window_RenderFrame(FrameEventArgs e) in VintagestoryLib\Client\ClientPlatform\GameWindow.cs:line 88
at OpenTK.Windowing.Desktop.GameWindow.Run()
at Vintagestory.Client.ClientProgram.Start(ClientProgramArgs args, String[] rawArgs) in VintagestoryLib\Client\ClientProgram.cs:line 318
at Vintagestory.Client.ClientProgram.<>c__DisplayClass9_0.<.ctor>b__1() in VintagestoryLib\Client\ClientProgram.cs:line 128
at Vintagestory.ClientNative.CrashReporter.Start(ThreadStart start) in VintagestoryLib\Client\ClientPlatform\ClientNative\CrashReporter.cs:line 93

💬 CrusadingPriest, Jan 20th at 11:03 PM

Is this Mod going to be updated for 1.19 Stable. Would love to use it in the new Stable version of VS.

💬 YewAuthor, Jul 10th 2023 at 4:04 AM

Whoops! I accidentally zipped them wrong. Extracting each mod will fix the issue, but I will update the actual downloads momentarily. Thanks for the catch NyanScout!

💬 NyanScout, Jul 9th 2023 at 6:51 PM

Using attributer version 1.0.4 on Vintage Story v1.18.6, I get this error.

9.7.2023 13:47:41 [Error] [attributer-1.0.4.zip] Missing modinfo.json
9.7.2023 13:47:41 [Error] [rpgitemrarity-1.0.3.zip] Missing modinfo.json

💬 YewAuthor, Jul 9th 2023 at 1:59 AM

I will be updating both Attributer (and RPGItemRarity) soon. Sorry for the delay, but I've been busy.

💬 JuniferBerries, Jun 23rd 2023 at 12:36 AM

RPG Item Rarity would be awesome to use. Is there another space to track mod progress and/or if someone has made or is working on a patch?

💬 john_alcatraz, Jun 7th 2023 at 1:04 AM

Crashing with the lastest update, along with the RPG Item Rarity. Any plans to update?

💬 Corvie, Apr 21st 2023 at 4:50 PM

Will we see an update soon?

💬 Streetwind, Mar 13th 2023 at 8:34 PM

In case anyone is wondering - no, the current version (1.0.3) does not work with 1.18. The server thread freezes as soon as the game tries to apply damage from a creature to the player.

💬 YewAuthor, Sep 22nd 2022 at 3:18 PM

Not yet Craluminum! Working on it though. 

💬 DanaCraluminum, Sep 22nd 2022 at 10:26 AM

Can it be used to change transformations? E.g. groundStorageTransform

(edit comment delete)