Comments (13)
Technically four options if you count:
{
"index": 12,
"name": "Deep Speech",
"type": "Exotic",
"typical_speakers": ["Aboleths", "Cloakers"],
"script": "",
"url": "http://www.dnd5eapi.co/api/languages/12"
}
I'd honestly be fine with either that or null
. Though, it looks like we're not consistent on either approach. It might be worth considering?
from 5e-database.
I think in this case, null
makes more sense than ""
. But it is probably worth looking into the inconsistent usage elsewhere.
from 5e-database.
@ogregoire I'll throw up a quick PR for the Languages. But I ran into two other cases where we use ""
instead of null
.
Case 1:
{
"level_acquired": 7,
"spell_acquisition_method": {
"name": "level",
"url": ""
},
"prerequisites": [],
"spell": {
"url": "http://www.dnd5eapi.co/api/spells/71",
"name": "Death Ward"
}
}
spell_acquisition_method
has a url but that doesn't exist because we don't have it. It probably makes more sense to drop the field entirely?
Case 2:
"subtype": "",
"alignment": "lawful evil",
"armor_class": 17,
"hit_points": 135,
"hit_dice": "18d10",
"speed": "10 ft., swim 40 ft.",
"strength": 21,
"dexterity": 9,
"constitution": 15,
"intelligence": 18,
"wisdom": 15,
"charisma": 18,
"constitution_save": 6,
"intelligence_save": 8,
"wisdom_save": 6,
"history": 12,
"perception": 10,
"damage_vulnerabilities": "",
"damage_resistances": "",
"damage_immunities": "",
"condition_immunities": "",
subtype
, damage_vulnerabilities
, damage_resistances
, damage_immunities
, and condition_immunities
are often set to ""
. I wonder if it makes more sense to convert the values to null
?
What do you think? I'd like another opinion.
from 5e-database.
Hmmm. I guess for Case 2, the fields with input look like this:
"subtype": "human",
"damage_vulnerabilities": "fire",
"damage_resistances": "necrotic",
"damage_immunities": "lightning, poison",
"condition_immunities": "charmed, exhaustion, frightened, paralyzed, poisoned",
Which raises some other questions that I don't really want to answer right now.
from 5e-database.
For the case 2, I believe that for vulnerabilities, resistances and immunities, lists (and therefore empty lists) should be used instead of ""
.
The field "spell_acquisition_method"
doesn't make any sense as it says how one gets a specific spell. It should better be in a level
object that says "new_spells"
or something similar, with the prerequisistes written there if need be.
This only leaves the "subtype"
field, which in my view can be null
(or absent) if the value isn't applicable.
The last two instances of ""
are in the "Scrying" spell "desc"
field. That field can easily be rewritten.
Going the route of having optional fields would probably require a kind of JSON Schema and JSONschema.net to keep consistency and making it easier to read and parse. Each file would have its schema, in that case.
from 5e-database.
For the case 2, I believe that for vulnerabilities, resistances and immunities, lists (and therefore empty lists) should be used instead of
""
.
That's how I was feeling as well.
The field
"spell_acquisition_method"
doesn't make any sense as it says how one gets a specific spell. It should better be in alevel
object that says"new_spells"
or something similar, with the prerequisistes written there if need be.
This will probably need a bit more refinement to get right but if you want to take a stab at it, I'd love to see what you're thinking.
This only leaves the
"subtype"
field, which in my view can benull
(or absent) if the value isn't applicable.
I agree!
The last two instances of
""
are in the "Scrying" spell"desc"
field. That field can easily be rewritten.
Yeah. Should be pretty simple
Going the route of having optional fields would probably require a kind of JSON Schema and JSONschema.net to keep consistency and making it easier to read and parse. Each file would have its schema, in that case.
We could probably go that route but I'm not married to that idea yet. Maybe in V2. 😅
from 5e-database.
I didn't try to do these yet:
"damage_vulnerabilities": "",
"damage_resistances": "",
"damage_immunities": "",
"condition_immunities": "",
Because there are some interesting choices on wording for some of those properties.
from 5e-database.
I'm also wondering if we should do something similar for senses
and languages
in monsters.
from 5e-database.
@ogregoire Yeah. I'm not sure what to do with something like this:
"damage_resistances": "bludgeoning, piercing, and slashing from nonmagical weapons",
I'm not sure if it makes sense to do one of these three things:
#1
"damage_resistances": ["bludgeoning, piercing, and slashing from nonmagical weapons"],
#2
"damage_resistances": ["bludgeoning from nonmagical weapons", "piercing from nonmagical weapons", "slashing from nonmagical weapons"]
#3
"damage_resistances": ["nonmagical bludgeoning", "nonmagical piercing, "nonmagical slashing"],
I'm leaning towards the first one just to keep it consistent with the SRD text but I could be convinced otherwise.
from 5e-database.
Even better:
bludgeoning, piercing, and slashing from nonmagical weapons that aren't silvered
😂
from 5e-database.
Oh wow:
"piercing and slashing from nonmagical weapons that aren't adamantine"
Yeah, I'm just going to go with the first one for now.
from 5e-database.
The basic idea was to cleanup which is now done.
from 5e-database.
Thank you for your help!
from 5e-database.
Related Issues (20)
- Restructuring Rules.json HOT 13
- Inconsistent Shapechanger handling HOT 4
- Innate spellcasting missing required components HOT 1
- Monster variants in data that are not SRD content HOT 1
- GitHub deploy action trying to run in a fork HOT 6
- 1.2.6 tag missing in main branch HOT 2
- Missing monster flavor text HOT 1
- Frontend Webpage down on Heroku
- Docker build gives Illegal Instruction (Core Dump) with Latest and v2.1.1 tag HOT 3
- Issues with "range" on melee weapons HOT 20
- Additional Response Headers HOT 3
- Giant Centipede XP value is incorrect
- Bone Devil monster has wrong challenge rating? HOT 1
- Acolyte has no starting gold
- Add number of spells cast field HOT 2
- Proficiency Bonus is missing in the Monster api HOT 1
- Minor errors found in spell data HOT 1
- Spells with multiple damage types aren't represented HOT 1
- MongoDB 5 Requires AVX Instruction Set to Boot HOT 1
- Magic missile spell: Damage at slot level are incorrects
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from 5e-database.