Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Homebrew Monsters Attacks #1

Open
mouse0270 opened this issue Jan 19, 2018 · 1 comment
Open

Homebrew Monsters Attacks #1

mouse0270 opened this issue Jan 19, 2018 · 1 comment
Assignees
Labels
as is bug Something isn't working not supported

Comments

@mouse0270
Copy link
Owner

Homebrew Monsters Attacks do not always get properly detected. Take for example the Goblin Archer This creature has the following attacks

Scimitar. Melee Weapon Attack: +4 to hit, reach 5 ft., one target. Hit: 5 (1d6 + 2) slashing damage.
Shortbow. Ranged Weapon Attack: +4 to hit, range 80/320 ft., one target. Hit: 5 (1d6 + 2) piercing damage.

However, the script only picks up the Scimitar attack and rolls for both the Scimitar and Shortbow damage when you click on it.

This is because of how my script loops through all of the children under the actions of a monsters stat block. However, since Homebrew monsters are not subject to the same formatting as official monsters, these attacks are not separated they are right next to each other. My script is unable to determine when one attack ends and the next starts.

Currently, I do not know how to work around this type of issue. If I figure out how I will update this issue.

@mouse0270 mouse0270 added the bug Something isn't working label Jan 19, 2018
@mouse0270 mouse0270 self-assigned this Jan 19, 2018
@mouse0270
Copy link
Owner Author

mouse0270 commented Jan 19, 2018

Through some ghetto code, I have been able to provide better support to homebrewed monsters. Basically, I parse out the code and replace break lines with an ending and closing paragraph tag. This way my script can more easily identify different attacks.

In short, if people would freaking hit enter instead of shift+enter this code wouldn't even be needed, but if you let people enter stuff, they're going to screw it up.

This is still considered not supported and as is. This is because I am sure people will screw up the formatting in new and creative ways. I am not going to code for every outcome, instead, I am going to do my best to support as much as possible and have the creators of the homebrew content police their own formatting otherwise it simply won't work.

mouse0270 pushed a commit that referenced this issue Jul 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
as is bug Something isn't working not supported
Projects
None yet
Development

No branches or pull requests

1 participant