VTTAssets / vtta-party

Provides an instant overview about vital stats of the players active in the current scene
MIT License
4 stars 12 forks source link

Add stealth disadvantage tracking for 5th Edition D&D #12

Open Ktar5 opened 4 years ago

Ktar5 commented 4 years ago

Would love to see 5th Edition D&D heavy armor disadvantage on stealth checks shown.

I would happily have added a pull request, but I'm not sure what the best way to implement this would be. As far as I can think there are two options:

  1. Add a minus sign next to the number for their stealth if they have disadvantage, ex: "15-"
  2. Add a separate column for this

I took the liberty of writing and testing code that can be used to accomplish this purpose:

      let stealthDisadvantage = false;
      for(let item of actor.items){
          if(item.data.data.stealth && item.data.data.equipped){
            stealthDisadvantage = true;
          }
      }

You can put this code under the getActorDetails(actor) method, before the return, in the src/app/index.js file, and then add it to the return depending on which method you think would be best.

It kinda sucks butt having to loop through items, but I guess that's what we gotta do for now.

Ktar5 commented 4 years ago

Hello? It's been almost a month with no reply.