pafvel / dragonbane

Other
11 stars 6 forks source link

Enhancement: Sub Catagorize Rolls #39

Closed jacobwojoski closed 4 months ago

jacobwojoski commented 4 months ago

There's no way to tell if a roll was related to a weapon skill vs Core skill vs Secondary. (Attributes vs skills are fine from parsing the flavor text)

I know PF2e adds it as a rolls.options.domains field but other systems just describe it in the rolls.flavor text like DnD5e.

I would like to use this to help categorize rolls for the Dice Stats module.

Add the skills related Skill Type to the flavor text or the roll object could be an great way to resolve the issue rather then all skills just saying Skill

Current Roll object with no way to see the type of skill: image

pafvel commented 4 months ago

I have considered adding info in msg.content to identify skill rolls, e.g. add classes "skill-roll" / "attribute-roll" and "data-skill-id" / "data-attribute", etc. Would that do the job?

jacobwojoski commented 4 months ago

Looks like it could do the job. I guess big thing is seeing the different types of skill rolls. Weapon skills vs secondary skills, vs primary skills. Dont quite know if the msg.content would get that granular or not.

Currently there’s no way to tell the difference.

jacobwojoski commented 4 months ago

Doing a Bit more testing I can parse by checking the flavor string for Attack, Topple, Disarm, and Parry to partially solve the issue. Rolling a weapon skill from the Skills Tab will always just say "... Skill ..." with no way to tell what type of skill was rolled though.

pafvel commented 4 months ago

I would not recommend parsing localized text. Adding the skillId would let you find the skill and check skill type on the item in a language independent way.

jacobwojoski commented 4 months ago

True, Forgot entirely about text being localized. That would def could fix the skill issue.

Although it would have issues telling if it was a damage roll or Attack roll at that point though as both of those wouldn't have any skill associated.

jacobwojoski commented 4 months ago

I have considered adding info in msg.content to identify skill rolls, e.g. add classes "skill-roll" / "attribute-roll" and "data-skill-id" / "data-attribute", etc. Would that do the job?

Actually, then this could def work. I could just pull the skill ID from here and see the type, Otherwise see if its attack vs Attribute. Temp solution of text parsing and will update if this gets implemented.

pafvel commented 4 months ago

Resolved in https://github.com/pafvel/dragonbane/commit/06573f0963ea5b6268fc1845beb6d897e1b7e970