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

Display proficiency bonus in Monster statblock #319

Open
Darkade opened this issue Apr 29, 2021 · 9 comments
Open

Display proficiency bonus in Monster statblock #319

Darkade opened this issue Apr 29, 2021 · 9 comments

Comments

@Darkade
Copy link

Darkade commented Apr 29, 2021

Hi! I'm just now realizing there's no option to add the proficiency bonus of a monster in the \DndMonsterDetails neither is it automatically calculated from the Challenge rating. Is this possible to add?

Thanks!

@BrianCriswell
Copy link
Member

BrianCriswell commented Apr 29, 2021

It's possible, but automation on that level runs the risk of losing flexibility for the times when a monster does not follow the general rules of monster building.

Proficiency is not displayed anywhere. It is just built into other numbers for attacks, ability checks, saving throw bonuses or DCs. Because of the way function arguments work in LaTeX, it would not save the end user much typing anyway, but it could help automate the calculation.

Thinking aloud: Implementing this would likely require adding a concept of state to the DndMonster environment. This would allow any DndMonster-related options to be set and stay in place for the duration of the environment and be cleared when the environment is closed. Most of our DndMonster-related functions are somewhat stateless at the moment where the options passed to, say, DndMonsterBasics are used and then forgotten.

@Darkade
Copy link
Author

Darkade commented Apr 29, 2021

Gotcha. I've made an small path that adds this and was about to make a pull request and then I realized.

In my writing process the easiest way to check for statblocks is in DnD Beyond and their statblocks do display the proficiency bonus. While the books themselves do not. I hadn't noticed this difference and now I'm wondering why the decision to show them on dndbeyond.

Thank you!

@Darkade Darkade closed this as completed Apr 29, 2021
@Darkade
Copy link
Author

Darkade commented Apr 29, 2021

Just as I was writing this, I was informed that Candlekeep mysteries was the first book to officially print the proficiency bonus. I don't know why the chance.

Let me know if you'd like me to make a pull request. :3

@BrianCriswell
Copy link
Member

I just looked on dndbeyond.com and saw the new Proficiency section on the stat block. It seems weird to me and not very useful, but I have seen plenty of people post that they like it.

If you do add this in, it would need to be an option in DndSetOptions (I don't remember if that function has even been set up yet). The option would need to default to off at least in the short term for backwards compatibility.

You can also include it right now by including the full text of the line after the word "Challenge", and this could all be wrapped into some sort of function that you personally use.

%pseudocode "DndMonsterListFont" is not the right name
4 (1,100 XP) \vfill {\DndSetMonsterListFont {Proficiency Bonus }} +2

@Darkade
Copy link
Author

Darkade commented Apr 29, 2021

For the record.

The monster manual in "Compendium Mode" does not show you the proficiency bonus
https://www.dndbeyond.com/sources/mm/monsters-o#Orcs

But when you look at a monster it does display
https://www.dndbeyond.com/monsters/orc

And I don't have Candlekeep, but I understand it was added to print, so I'd expect for the proficiency bonus to bedisplayed in compendium mode for that book.

I'll take your notes into account and will make the proper patch over the weekend.

Thank you!

@Darkade
Copy link
Author

Darkade commented May 2, 2021

\DndOptions hasn't been implemented so I'm checking the \DndSetFonts function to base it from there. But It's the first time I develop something for tex, to I'm not 100% clear yet on how it works.

In the mean time the basic functionality works, but it's not optional yet. I'll be looking into how Document Functions work to implement \DndOptions

Anyway, you can check the simple proficiency bonus function here if you'd like and I'll open the pr as soon as I figure the rest out

dev...Darkade:feature/proficiencybonus

Thank you!

@Darkade Darkade reopened this May 2, 2021
kbriggs added a commit to kbriggs/DND-5e-LaTeX-Template that referenced this issue Sep 1, 2021
Adds a `proficiency-bonus` detail that will be displayed next to the
monster or NPC's challenge rating, as is the style in Candlekeep Mysteries
and dndbeyond listing.
kbriggs added a commit to kbriggs/DND-5e-LaTeX-Template that referenced this issue Sep 1, 2021
Adds a `proficiency-bonus` detail that will be displayed next to the
monster or NPC's challenge rating, as is the style in Candlekeep Mysteries
and dndbeyond.
@kbriggs
Copy link

kbriggs commented Sep 1, 2021

Came here to see if anyone else had requested the proficiency bonus detail...

I took a less smart approach, simply adding another optional detail item proficiency-bonus like the immunities ones. So the author has to explicitly specify it for each stat block, but on the plus side means existing documents won't change: dev...kbriggs:npcprofbonus

I'll open a PR but feel free to reject if e.g. you prefer a different approach.

kbriggs added a commit to kbriggs/DND-5e-LaTeX-Template that referenced this issue Sep 2, 2021
Specifying no `proficiency-bonus` with no value or the special value `*`
will calculate the proficiency bonus from the challenge rating.

Co-authored-by: I Reyes <4106546+Darkade@users.noreply.github.com>
kbriggs added a commit to kbriggs/DND-5e-LaTeX-Template that referenced this issue Sep 2, 2021
Specifying `proficiency-bonus` with no value or the special value `*`
will calculate the proficiency bonus from the challenge rating.

Co-authored-by: I Reyes <4106546+Darkade@users.noreply.github.com>
@kbriggs
Copy link

kbriggs commented Sep 2, 2021

I integrated @Darkade's calculation of the proficiency bonus from the challenge rating with my PR #329; specifying the special value * or no value at all (e.g. challenge-rating = 5, proficiency-bonus, skills = …) will display the calculated value.

In the future to make displaying the proficiency bonus the default, we would just have to add to the keys definition:

  proficiency-bonus .initial:n = *,

(possibly along with a flag to suppress it for individual stat blocks:

  no-proficiency-bonus .meta:n = { proficiency-bonus = {} },
  noproficiencybonus .meta:n = { no-proficiency-bonus },

), which presumably could be conditional on a package option.

(@Darkade, I credited you as Co-authored-by: I Reyes <4106546+Darkade@users.noreply.github.com> which is what shows up when I pull your branch from github, let me know if that isn't correct)

@Darkade
Copy link
Author

Darkade commented Sep 2, 2021

That's correct! Thank you. I haven't had a change to get back around to this so this. Your solution seems very neat :3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants