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

Magic Item Definitions #115

Closed
arahansen opened this issue Nov 25, 2019 · 12 comments · Fixed by #195
Closed

Magic Item Definitions #115

arahansen opened this issue Nov 25, 2019 · 12 comments · Fixed by #195
Assignees

Comments

@arahansen
Copy link

arahansen commented Nov 25, 2019

I saw this other SRD repo has a json list of magic items included in the SRD.

Has there been any investigation to adding these to 5e-database?

@bagelbits
Copy link
Collaborator

bagelbits commented Nov 27, 2019 via email

@vpeter1119
Copy link

I was thinking about the schema and came up with this. I'd be happy to discuss it further.

{
	index: String, // "goggles-of-night"
	name: String, // "Goggles of Night"
	item_category: String, // "Wondrous Item"
	type: String, // For subtypes maybe?
	rarity: String, // Uncommon
	cost: {}, // not sure about this, there's no price in SRD only DMG
	desc: [], // array of strings
	attunement: Boolean,
	attunementDescription: String, // like class-only
	weight: Number, // 0
	modifiers: [
		{
			type: String, // "Sense"
			name: String, // "Darkvision"
			value: Number // 60
		}
	],
	spellcasting: {
		charges: Number, // e.g. 10
		recharge String, // e.g. regains 1d6 charges every dawn
		spells: [
			{
				name: String, // "Fireball"
				url: String, // "/api/spells/fireball"
				spell_charge: Number // how many charges does it cost
			}
		]
	},
	url: String
}

There's also the question of how to handle weapons and armor since they have a lot more properties but it's overlapping with the base weapon/armor.

@bagelbits
Copy link
Collaborator

bagelbits commented Apr 27, 2020

Would item_category just be a reference to something over here?
What are subtypes?
I would probably drop cost if it's not in the SRD. We're not including anything that isn't in the SRD.
Should the modifiers link to Traits? Or are there some modifiers that aren't Traits?

Honestly, if you really want, we can start with just:

{
  index: String,
  name: String,
  equipment_category: {
    name: String,
    url: String,
  },
 desc: [],
 url: String
}

And only add fields that aren't immediately encapsulated there? I can see modifies and spellcasting be its own schema discussion but are currently "covered" with description.

@ogregoire Any thoughts on this?

@ogregoire
Copy link
Collaborator

Yes, I've been thinking the same: start simple then find structures where they are, or when needed.

@vpeter1119
Copy link

Actually yes, description can cover any effects. I just thought about organizing those effects similar to how DnDBeyond handles them, but it certainly does not have to be part of the first model.

@vpeter1119
Copy link

I would keep rarity, because it could be a useful as a query parameter.

For item_category˛, I had these in mind:

  • Armor
  • Potion
  • Ring
  • Rod
  • Scroll
  • Staff
  • Wand
  • Weapon
  • Wondrous Item

These are also taken from DnDBeyond.

@ogregoire
Copy link
Collaborator

Actually, I would really keep it as simple as @bagelbits mentioned.

{
  "index": String,
  "name": String,
  "equipment_category": EquipmentCategory,
  "desc": Array<String>,
  "url": String
}

Why so simple? Because of the one reason I never worked on them: they're extremely complex. When you think about adding rarity, I already present you the Figurine of Wondrous Power. How do you dataify it?

Figurine of Wondrous Power

Wondrous item, rarity by figurine

A figurine of wondrous power is a statuette of a beast small enough to fit in a pocket. If you use an action to speak the command word and throw the figurine to a point on the ground within 60 feet of you, the figurine becomes a living creature. If the space where the creature would appear is occupied by other creatures or objects, or if there isn’t enough space for the creature, the figurine doesn’t become a creature.
The creature is friendly to you and your companions. It understands your languages and obeys your spoken commands. If you issue no commands, the creature defends itself but takes no other actions.
The creature exists for a duration specific to each figurine. At the end of the duration, the creature reverts to its figurine form. It reverts to a figurine early if it drops to 0 hit points or if you use an action to speak the command word again while touching it. When the creature becomes a figurine again, its property can’t be used again until a certain amount of time has passed, as specified in the figurine’s description.
Bronze Griffon (Rare). This bronze statuette is of a griffon rampant. It can become a griffon for up to 6 hours. Once it has been used, it can’t be used again until 5 days have passed.
Ebony Fly (Rare). This ebony statuette is carved in the likeness of a horsefly. It can become a giant fly for up to 12 hours and can be ridden as a mount. Once it has been used, it can’t be used again until 2 days have passed.

Giant Fly

Large beast, unaligned
Armor Class 11
Hit Points 19 (3d10 + 3)
Speed 30 ft., fly 60 ft.
STR DEX CON INT WIS CHA
14 (+2) 13 (+1) 13 (+1) 2 (−4) 10 (+0) 3 (−4)
Senses darkvision 60 ft., passive Perception 10
Languages
Golden Lions (Rare). These gold statuettes of lions are always created in pairs. You can use one figurine or both simultaneously. Each can become a lion for up to 1 hour. Once a lion has been used, it can’t be used again until 7 days have passed.
Ivory Goats (Rare)._ These ivory statuettes of goats are always created in sets of three. Each goat looks unique and functions differently from the others. Their properties are as follows:

  • The goat of traveling can become a Large goat with the same statistics as a riding horse. It has 24 charges, and each hour or portion thereof it spends in beast form costs 1 charge. While it has charges, you can use it as often as you wish. When it runs out of charges, it reverts to a figurine and can’t be used again until 7 days have passed, when it regains all its charges.
  • The goat of travail becomes a giant goat for up to 3 hours. Once it has been used, it can’t be used again until 30 days have passed.
  • The goat of terror becomes a giant goat for up to 3 hours. The goat can’t attack, but you can remove its horns and use them as weapons. One horn becomes a +1 lance, and the other becomes a +2 longsword. Removing a horn requires an action, and the weapons disappear and the horns return when the goat reverts to figurine form. In addition, the goat radiates a 30-­‐‑foot-­‐‑radius aura of terror while you are riding it. Any creature hostile to you that starts its turn in the aura must succeed on a DC 15 Wisdom saving throw or be frightened of the goat for 1 minute, or until the goat reverts to figurine form. The frightened creature can repeat the saving throw at the end of each of its turns, ending the effect on itself on a success. Once it successfully saves against the effect, a creature is immune to the goat’s aura for the next 24 hours. Once the figurine has been used, it can’t be used again until 15 days have passed.

Marble Elephant (Rare). This marble statuette is about 4 inches high and long. It can become an elephant for up to 24 hours. Once it has been used, it can’t be used again until 7 days have passed.
Obsidian Steed (Very Rare). This polished obsidian horse can become a nightmare for up to 24 hours. The nightmare fights only to defend itself. Once it has been used, it can’t be used again until 5 days have passed.
If you have a good alignment, the figurine has a 10 percent chance each time you use it to ignore your orders, including a command to revert to figurine form. If you mount the nightmare while it is ignoring your orders, you and the nightmare are instantly transported to a random location on the plane of Hades, where the nightmare reverts to figurine form.
Onyx Dog (Rare). This onyx statuette of a dog can become a mastiff for up to 6 hours. The mastiff has an Intelligence of 8 and can speak Common. It also has darkvision out to a range of 60 feet and can see invisible creatures and objects within that range. Once it has been used, it can’t be used again until 7 days have passed.
Serpentine Owl (Rare). This serpentine statuette of an owl can become a giant owl for up to 8 hours. Once it has been used, it can’t be used again until 2 days have passed. The owl can telepathically communicate with you at any range if you and it are on the same plane of existence.
Silver Raven (Uncommon). This silver statuette of a raven can become a raven for up to 12 hours. Once it has been used, it can’t be used again until 2 days have passed. While in raven form, the figurine allows you to cast the animal messenger spell on it at will.

@vpeter1119
Copy link

vpeter1119 commented Apr 29, 2020

Yeah, you're right. We would need separate entries for all those items but not right now.

What about the magical item categories, like "Wondrous Item". Do you think we could include it?

EDIT: typo

@ogregoire
Copy link
Collaborator

We already have the equipment_category in its own file and in the equipment file. Let's try reusing/extending that one. If needed we might choose to rename it to item_category instead of equipment_category, but we're not there yet. Iterations is the key here.

@bagelbits
Copy link
Collaborator

Yup! I agree with @ogregoire on all of this. It's best to keep it really simple on the first version. And after we get it all in, we can start on separate efforts to extract patterns. As I lovingly tell other engineers at work, K.I.S.S.: Keep It Simple, Silly.

I would adjust the proposed schema to:

{
  "index": String,
  "name": String,
  "equipment_category": {
    "name": String,
    "url": String
  },
  "desc": Array<String>,
  "url": String
}

As an aside, I noticed in Equipment, we refer to equipment_category as such:

"equipment_category": "Weapon",

So I'm going to cut a separate issue to get that updated.

@bagelbits
Copy link
Collaborator

I think we're all on the same page for the V1 of this. @vpeter1119, if you still feel up to pushing forward with a PR for this, feel free to. :D

@bagelbits
Copy link
Collaborator

Okay, I've setup a WIP PR for this. I'm slowly working my way through the SRD to get this all added. However, I'd love feedback for where it is so far.

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 a pull request may close this issue.

4 participants