Coder Social home page Coder Social logo

Comments (5)

Silvertower avatar Silvertower commented on August 16, 2024

Thanks for the report. The problem is not with versatile, per se, because it works on normal weapons. Something to do with how Living Weapon is implemented. I am investigating.

from fvtt-token-action-hud-pf2e.

vaguelyof avatar vaguelyof commented on August 16, 2024

I initially noticed this bug when implementing the following AdjustStrike rule for unarmed attacks in my own game. Putting it here in case it helps.

{
  "key": "AdjustStrike",
  "definition": [
    "item:trait:unarmed"
  ],
  "mode": "add",
  "value": "versatile-cold",
  "property": "weapon-traits"
}

from fvtt-token-action-hud-pf2e.

Silvertower avatar Silvertower commented on August 16, 2024

The Living Weapon "weapon" doesn't have the weapon.system.traits.toggles (toggles is missing) object, so the code fails to obtain the versatile information. This is different than how objects, such as a dagger, work. This will take some investigation of how upstream does it via the character sheet.

from fvtt-token-action-hud-pf2e.

Silvertower avatar Silvertower commented on August 16, 2024

Not sure how to resolve yet, but the problem is that the ID of the feat and of the weapon are the same:

Feat Object:
image

Weapon Object:
image

At first glance, this appears to be an upstream flaw from PF2e system.

The only item on the actor with the ID is the feat item, not the weapon item. The weapon item doesn't actually exist in actor.items.

So, in this case, when the following code is called:

const weapon = coreModule.api.Utils.getItem(actor, itemId)

It is getting the feat object, not the weapon object.

I am not yet sure how to handle this. A fix may take some time.

from fvtt-token-action-hud-pf2e.

Silvertower avatar Silvertower commented on August 16, 2024

Token Action HUD code will need to change from the current method of obtaining the weapon by ID to instead using multiple elements, similar to how rollStrike() handles it.

from fvtt-token-action-hud-pf2e.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.