javierriveracastro / betteroll-swade

A Better Rolls port for SWADE
GNU General Public License v3.0
15 stars 31 forks source link

If a character does not have the associated trait for an item, the card does not render correctly #594

Closed ddbrown30 closed 1 year ago

ddbrown30 commented 1 year ago
  1. Add a ranged weapon that uses shooting to a character
  2. Ensure that character does not have the shooting skill
  3. Attack with the weapon
  4. The item card will be empty

If a character does not have the associated skill, it should fall back to unskilled. The fix for this could maybe just be limited to fighting and shooting since powers can't be used unskilled.

javierriveracastro commented 1 year ago

It seems to work on my side.

A couple of questions:

ddbrown30 commented 1 year ago

If you have the pathfinder module, you can do the exact same test as me by dragging the long or short bow from the gear compendium. If you have the SWADE module, the bow from there has the same problem.

Actually, I just tested renaming (Unskilled) to be just Unskilled and that fixed it. Probably just a bug with your regex or string compare logic. FYI, that seems to be the what unskilled is named when importing characters from savaged.us.

javierriveracastro commented 1 year ago

Ahhhhhh.... I'll add (Unskilled) to the array.