rpgtex / DND-5e-LaTeX-Template

LaTeX package to typeset material for the fifth edition of the "world's greatest roleplaying game".
MIT License
1.45k stars 311 forks source link

Discussion of alterations to generation of monster attacks. #160

Closed BrianCriswell closed 5 years ago

BrianCriswell commented 5 years ago

This is for discussion of the proposed changes by @Girsi in #159.

Changed parameters in monsterattack:

  • type can now also be a spell attack
  • removed default values for dmg and dmgtype, since there can be attacks which do not deal damage (see Rug of Smothering)

New parameters in monsterattack:

  • minrange (e.g. "can't hit targets within 60 feet of it", see trebuchets)
  • dmgwhen (e.g. "in melee", can be combined with ordmgwhen "at range", see Bugbear)
  • ordmgtype (see Goblin Projectile from Storm King's Thunder. Default value is dmgtype)
  • hiteffect (e.g. "and the target must make ...". This could be done with extra but it felt somehow dirty to me.)
  • miss and hitormiss (full sentences)

Other changes:

  • \dnd@damage considers all possible (sensible) combinations i encountered so far. For that I also changed the punctuation a bit. Now there shouldn't be any need to fudge in any commas from outside. On the other hand, all parameters which get one or more full sentences (extra, miss, hitormiss) require a full stop at the end.
  • The spell lists have been changed to look more like in the books.
  • Changed 1/10 CR to 1/16. It fits more into the pattern that way.

Open questions:

  • Should the distinction melee/ranged be seperate from weapon/spell?
  • monstermelee and monsterranged have not been adapted because of the point above. Also i would be fine with just monsterattack. That seems the simplest option at this point.
  • How to treat extra? In case a hit or hitormiss exists, should the extra part come after all of that? Or should it come directly after hit? In that case, should it be named hitextra (or something better)?
  • hiteffect and extra might be combined, but i like the distinction that hiteffect is never a full sentence, but extra is.
  • dmgtype should be the default value for ordmgtype, but somehow i couldn't get it working in the parameter list, so i used ifcommandkey.

Closing remarks: I'm not well versed in LaTeX, so any feedback on that front is welcome. Also, this is my first contribution to an open source project. Hooray!

BrianCriswell commented 5 years ago

I like a lot of the ideas that @Girsi came up with but I am leery of hardcoding options that only support single edge cases (and leads to bloated macros). A user can always just explicitly code a single attack that does not conform to a supplied macro.

With that in mind, how can we incorporate some handling of edge cases in a way that is straightforward and keeps the code as simple as possible?

  1. Spell Attacks - I can only think of the lich as a WotC monster that has a "melee spell attack". The branching logic of the rest of the attack does not change based on whether it is a spell or weapon attack. I could see this going one of two ways. If we are confidant that we will only have weapon or spell attacks (and can't think up something else), we could change the type enum (both, melee, ranged) to something like distance and use type for (melee, spell). Then we don't have duplication of the text determined by whether its melee, ranged, or both.
    % Switch on range
    % Both - choose weapon or spell text, display reach and range text
    % Melee - choose weapon or spell text, display reach text
    % Ranged - choose weapon or spell text, display range text.

    If we aren't sure that the options here are a closed set of 2 (weapon and spell), then I would instead suggest we let the user overwrite the text used for the type of attack. Then for the lich's attack, the user would choose type=melee and type-text=Melee~Spell~Attack:, overriding the text that would normally be displayed.

  2. min-range - This isn't used often but does have an established text pattern (trebuchet, ogre with goblin hucker). The text is normalized enough that min-range could just take a number and pass that on to a caption macro that takes a single parameter.
  3. dmg and dmg-type no default values - I originally thought it might be nice to have a dagger if the macro is called with no parameters, but I like the handling of the damage here. No damage means we skip the entirety of the damage text on a hit.
  4. hit-effect, miss, hit-or-miss - I think everything here should be handled by extra. Its purpose is to hold all the optional text that occurs after the damage and before the final full stop. Putting all of these other options in, while handling their individual situations well, looks like it is causing feature bloat. In the end, they do the same things as extra, and the user still has to type everything sans a comma or full stop.
  5. CR 1/10 to 1/16 - originally I couldn't come up with a better idea than 1/10 to establish it as less than 1/8. The "10" was because it is worth 10 XP. Taking another look, I think that "0/10" might make more sense for "Challenge 0 (10 XP)". Another possibility that shouldn't affect too many people would be have "0" represent "0 (10 XP)" and "00" represent "0 (0 XP)". Either way, we should probably have a deprecated statement in the altered blocks to change it over as this option has been around for a while (and unlike calling the function directly, people might actually use the value by setting the key in the details macro).
  6. Spell line spacing - The removal of \smallskip between spell lines looks good; good catch. The gap had been there because it is in the SRD stat blocks. Whether a small skip is included could be handled by the the bg=print package option in the short term and by themes (i.e. D&D print vs SRD/printer friendly) in the long term.
  7. or-dmg-type - I got rid of my physical copy of Storm King's Thunder when I moved, and the Roll20 version has separate attacks for the ogre with goblin hucker for with and without the spiked helmet. Would you be able to post the attack so I can see what it looks like? I think I can guess, but it would be nice to see it.
  8. dmg-when - this seems like a very edge case caused by the bugbear's Brute trait. I think this is one of the cases where we are better served by having the user write up the full attack. The increased complexity does not seem worth it for something that will be used very rarely.

Maybe that is the primary decision point on whether we include something or not: how much it is actually going to get used vs how much it increases code complexity. There are many things here which we can include, but should they be included?

tl;dr

A. I can see a change to the text to invoke "Challenge 0 (10 XP)", removing \smallskip from the spell level lines, and removing the default damage/damage type. B. Including support for min range on attacks and including spell attacks in some form may be possibilities that do not seem to increase complexity too much and could save a user some writing. C. However I feel that the other cases happen so seldom that the added complexity to the macros outweighs the benefit of saving the user having to write out an attack in full every once in a while.

What do others think?

Girsi commented 5 years ago

I agree that the frequency of occurence should be a factor what options are included. To that end, some data that should help make these decisions:

Girsi commented 5 years ago

One additional remark: The change in the spell list was not just the \smallskip, it was also that only the spell names are in italic, the commas seperating them are not. There is quite a visible difference in the positioning of the commas in the output.

BrianCriswell commented 5 years ago

One additional remark: The change in the spell list was not just the \smallskip, it was also that only the spell names are in italic, the commas seperating them are not. There is quite a visible difference in the positioning of the commas in the output.

Interesting, I wonder if the box (LaTeX positioning construct) is built after the line finishes. Your version has the comma as part of the line, so it is included in the box. My old version had the box built around just the spell name and then added the comma later if needed, so the comma was added on the outside border of the slanted word. Thankfully, the new version I am working on uses built in functions and builds the string in a single go, so there are no gaps around the spaces.

\NewDocumentCommand {\DndEmphSpellString} { m }
  {
    \group_begin:
      \seq_set_from_clist:Nn \l_tmpa_seq { #1 }
      \seq_set_map:NNn \l_tmpb_seq \l_tmpa_seq { \exp_not:n { \emph { ##1 } } }
      \seq_use:Nn \l_tmpb_seq { ,~ }
    \group_end:
  }

\exp_not:n prevents an expansion of its argument, something needed in this particular situation.

BrianCriswell commented 5 years ago

Excellent research, @Girsi. Based on that, we definitely need to include spell attacks as an option. I will add this to #153.

  1. What do others think of which option should be used for the odd CR option?

    • Keep as is (1/10).
    • Use the numbers to create the fraction (0/10).
    • Half of 1/8 (1/16).
    • Switch the default 0 to represent 0 (10 XP) and use 00 to represent 0 (0 XP).
  2. What should we name the keys for {both,melee,ranged} (currently 'type') and for {weapon,spell}? I think type should be moved to {weapon,spell}. Maybe distance would work for {both,melee,ranged}?

  3. Finally, now that we are including spell attacks as well should we drop \DndMonsterMelee and \DndMonsterRanged in favor of only using \DndMonsterAttack? Originally they were saving a few keystrokes, but that is becoming less of the case.

Any option we choose will become what people are used to using (for the once in a while they actually need a CR 0 creature), but which is most intuitive?

BrianCriswell commented 5 years ago

Okay, I added the spell attacks and formatting fixes to #153.

Girsi commented 5 years ago

Maybe {weapon,spell} could be called the nature of the attack?

BrianCriswell commented 5 years ago

The conversation seems to have moved to #153, so I am going to close this down.