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

Add Monster Armor Types #297

Closed
wants to merge 2 commits into from
Closed

Conversation

txtsd
Copy link

@txtsd txtsd commented Oct 11, 2020

What does this do?

This adds monster armor types.

How was it tested?

No tests. It was manually entered.

Is there a Github issue this is resolving?

Yes #280

Did you update the docs in the API? Please link an associated PR if applicable.

No

More

So right now it's a straight rip from the PDF. Let me know how you want the data actually formatted.
Here are the unique entries:

{'10 in humanoid form, 11 (natural armor) in bear and hybrid form',
 '10 in humanoid form, 11 (natural armor) in boar or hybrid form',
 '11 in humanoid form, 12 (natural armor) in wolf or hybrid form',
 '14 (natural armor), 11 while prone',
 '15 with _mage armor_',
 '16 with _barkskin_',
 'armor scraps',
 'barding scraps',
 'breastplate',
 'chain mail',
 'chain mail, shield',
 'chain shirt',
 'chain shirt, shield',
 'hide armor',
 'hide armor, shield',
 'leather armor',
 'leather armor, shield',
 'natural armor',
 'natural armor, shield',
 'patchwork armor',
 'plate',
 'scale mail',
 'scale mail, shield',
 'splint',
 'studded leather',
 'studded leather, shield'}

Words surrounded by underscores are in italics.

Comment on lines 6264 to +6265
"armor_class": 14,
"armor_type": "14 (natural armor), 11 while prone",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Things like this point out that our AC structure might be flawed?

@@ -6418,6 +6442,7 @@
"subtype": "any race",
"alignment": "any alignment",
"armor_class": 12,
"armor_type": "15 with _mage armor_",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't even an armor type?

@@ -13507,6 +13573,7 @@
"subtype": "any race",
"alignment": "any alignment",
"armor_class": 11,
"armor_type": "16 with _barkskin_",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't an armor type.

@@ -13663,6 +13730,7 @@
"subtype": null,
"alignment": "neutral",
"armor_class": 11,
"armor_type": "16 with _barkskin_",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't an armor type.

@@ -24239,6 +24359,7 @@
"subtype": "any race",
"alignment": "any alignment",
"armor_class": 12,
"armor_type": "15 with _mage armor_",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't an armor type.

@@ -36716,6 +36909,7 @@
"subtype": "human",
"alignment": "neutral good",
"armor_class": 10,
"armor_type": "10 in humanoid form, 11 (natural armor) in bear and hybrid form",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't an armor type? Though is a bit more confusing.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The whole were* are confusing and barely possible to write in our structure.

@@ -36870,6 +37064,7 @@
"subtype": "human",
"alignment": "neutral evil",
"armor_class": 10,
"armor_type": "10 in humanoid form, 11 (natural armor) in boar or hybrid form",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same with this.

@@ -37226,6 +37421,7 @@
"subtype": "human",
"alignment": "chaotic evil",
"armor_class": 11,
"armor_type": "11 in humanoid form, 12 (natural armor) in wolf or hybrid form",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And this.

@bagelbits
Copy link
Collaborator

I think all of these:

'10 in humanoid form, 11 (natural armor) in bear and hybrid form',
 '10 in humanoid form, 11 (natural armor) in boar or hybrid form',
 '11 in humanoid form, 12 (natural armor) in wolf or hybrid form',
 '14 (natural armor), 11 while prone',
 '15 with _mage armor_',
 '16 with _barkskin_',

mean that how we do AC is flawed for monsters.

@txtsd
Copy link
Author

txtsd commented Oct 12, 2020

Those are all how it is in the SRD, so suggestions as to how we should handle them are welcome!

For example: The Archmage entry says Armor Class 12 (15 with mage armor)

So should we drop these and add them later as a special case, or take care of them in this PR itself?

@txtsd
Copy link
Author

txtsd commented Oct 12, 2020

Maybe we can do something like this:

{
  "armor_class": 12,
  "armor_special": [
    {
      "type": "spell",
      "spell": "mage armor",
      "armor_class": 15
    }
  ]
}

{
  "armor_class": 14,
  "armor_type": "natural armor",
  "armor_special": [
    {
      "type": "condition",
      "condition": "prone",
      "armor_class": 11
    }
  ]
}

{
  "armor_class": 10,
  "armor_special": [
    {
      "type": "form",
      "form": "humanoid",
      "armor_class": 10
    },
    {
      "type": "form",
      "form": "bear",
      "armor_class": 11,
      "armor_type": "natural armor"
    },
    {
      "type": "form",
      "form": "hybrid",
      "armor_class": 11,
      "armor_type": "natural armor"
    },
  ]
}

@Redmega
Copy link
Contributor

Redmega commented Oct 12, 2020

armor_type here seems to just imply "Whatever's in the parentheses after the armor class."

I think there's two paths this can take: Assume the above, and submit as is (so things like "armor_type": "12 with mage armor" will exist), or figure out an object structure.

My vote would be for something like this:

{
"armor_type": null,
"armor_special": "15 with mage armor"
},
{
"armor_class": 14,
"armor_type": "natural armor",
"armor_special": "11 while prone"
}

fwiw I don't think we should have markdown italics in this field as none of the other fields have markdown (language, senses, etc)

@ogregoire
Copy link
Collaborator

We've already handled this kind of stuff in the past. The example with form is close to an acceptable solution.

I think that the armour class should be a structure instead of a flat number.

@bagelbits
Copy link
Collaborator

I was thinking probably something like this:

{
  // Stuff
  "armor": {
    "armor_class": 12,
    "armor_special": [
      {
        "type": "spell",
        "spell": "mage armor",
        "armor_class": 15
      }
    ]
  }
  // Other stuff
}

{
  // Stuff
  "armor": {
    "armor_class": 14,
    "armor_type": "natural armor",
    "armor_special": [
      {
        "type": "condition",
        "condition": "prone",
        "armor_class": 11
      }
    ]
  }
  // Other stuff
}

{
  // Stuff
  "armor": {
    "armor_class": 10,
    "armor_special": [
      {
        "type": "form",
        "form": "humanoid",
        "armor_class": 10
      },
      {
        "type": "form",
        "form": "bear",
        "armor_class": 11,
        "armor_type": "natural armor"
      },
      {
        "type": "form",
        "form": "hybrid",
        "armor_class": 11,
        "armor_type": "natural armor"
      },
    ]
  }
  // Other stuff
}

@txtsd
Copy link
Author

txtsd commented Oct 14, 2020

Okay looks like I'll be changing armor for every monster entry 😅

@bagelbits
Copy link
Collaborator

Sorry about that. >___<

@bagelbits
Copy link
Collaborator

I'm trying to remember how we've handled stuff like this in the past.

@ogregoire
Copy link
Collaborator

ogregoire commented Oct 15, 2020

The array of armors is the way to go. @bagelbits provided a correct draft example here. I agree that notes may not be the best choice at the moment.

But we must find hints in how the armor class is defined. The AC is calculated based on different formulas. There is the "natural armor", but there are a lot of different AC formulas. Such as the formula for "light armor", the one for "medium armor", and so on. There are even two different AC formulas for "unarmored defense" for monk and barbarian.

So let's just be pragmatic and write that: formulas.

{
  "armor_class": [
    {
      "value": 12,
      "formula": "natural armor"
    },
    {
      "value": 15,
      "formulas": "mage_hand"
    }
  ]
}
{
  "armor_class": [
    {
      "value": 14,
      "formula": "natural armor"
    },
    {
      "armor_class": 11,
      "formula": "prone"
    }
  ]
}

@bagelbits
Copy link
Collaborator

For something like:

"formulas": "mage_armor"

Does it make sense for us to link the spell in some way?

@bagelbits
Copy link
Collaborator

An alternative approach building off of that could be:

"formula": "spell"
"spell": {
  "name": "Mage Armor",
  "index": "mage-armor",
  "url": "/api/spells/mage-armor"
}

@bagelbits bagelbits closed this Nov 13, 2020
@bagelbits bagelbits deleted the branch 5e-bits:main November 13, 2020 18:29
@bagelbits bagelbits reopened this Nov 13, 2020
@bagelbits bagelbits changed the base branch from master to main November 13, 2020 18:40
@txtsd
Copy link
Author

txtsd commented Nov 14, 2020

I don't think I'm going to have the time for this in the near future. Someone else can pick it up.

@Redmega
Copy link
Contributor

Redmega commented Nov 17, 2020

Idk if I like formula for this, it implies we are including some type of math... I liked armor_type before, I feel like that's more in line with the way some other entries are labeled.

@ogregoire
Copy link
Collaborator

formula is not the name I chose, but the one WotC choose: https://dnd.wizards.com/articles/features/rules-answers-january-2016

You might prefer the word method which is also referenced, but there are definitely some maths involved...

@Redmega
Copy link
Contributor

Redmega commented Nov 17, 2020

Yeah there's absolutely maths involved, but none that are evident from the data. We simply give the final number, and any contributing factors (i.e. spell, or worn armor, etc.) Hence my vote for just a type of some sort

@fergcb
Copy link
Member

fergcb commented Nov 17, 2020

I'm also not a fan of formula. @Redmega is right that it implies that the data is supplying the instructions to calculate the AC, rather than the calculated AC or the condition that grants it. I would propose something like this, incorporating some of the previous suggestions:

{
  "armor_class": [
    {
      "value": 12,
      "type": "natural"
    },
    {
      "value": 15,
      "type": "spell",
      "spell": {
        "name": "Mage Armor",
        "index": "mage-armor",
        "url": "/api/spells/mage-armor"
      },
      "desc": "15 with mage armor"
    }
  ]
}
{
  "armor_class": [
    {
      "value": 14,
      "type": "natural"
    },
    {
      "value": 11,
      "type": "condition",
      "condition": "prone",
      "desc": "11 while prone"
    }
  ]

@bagelbits
Copy link
Collaborator

Now that lycanthropes are split apart, this should resolve a couple of the outliers.

@bagelbits
Copy link
Collaborator

I think I like @fergcb's approach. Though for conditions, I would use an APIRefernce shape to link to the Condition table. Also, for monsters with only one AC, we would essentially have to do this for consistency:

{
  "armor_class": [
    {
      "value": 12,
      "type": "natural"
    }
  ]
}

As long as that's acceptable, I'm fine with it.

@fergcb
Copy link
Member

fergcb commented Dec 20, 2020

@bagelbits More than acceptable! I'd forgotten about the Conditions collection, if I'm quite honest, but you know me and my fondness for my APIReferences :)

@bagelbits
Copy link
Collaborator

Closing in favor of #518

@bagelbits bagelbits closed this Dec 13, 2022
@txtsd txtsd deleted the monster_armor_type branch December 13, 2022 08:59
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

Successfully merging this pull request may close these issues.

None yet

5 participants