Git Product home page Git Product logo

askthedm's Introduction

Ask The DM

Dungeons and Dragons Alexa Skill

Version 2.2 Build Status

Alex Gaesser 2017

Link to Amazon Skill Store page

Brought to you proudly by the Arena Hounds

Ask the DM is a quick-reference tool designed for use during Dungeons and Dragons play sessions. The skill provides spell descriptions to players through a voice-command interface.

The core skill is a simple question-and-answer session. Users can get full spell descriptions, short descriptions, or single spell attributes such as casting time or range. Users can ask questions about items, feats, and conditions, as well as find the pages this information is found on. Users may also roll game dice, and roll 20-sided die with advantage or disadvantage. An itemized list of features is found in the changelog.

If you'd like to get involved, please check out our contributing document.

Check out what's new with Ask the DM here.

All the ways you can ask questions can be found in the ever-examping sample utterances file.

License

The content of this project itself is licensed under the DMs Guild License, and the underlying source code used to format and display that content is licensed under the MIT license.

askthedm's People

Contributors

eldres avatar gojirra55 avatar jeffnoehren avatar kadyncbr avatar omegabytes avatar terra1ncogn1ta avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

askthedm's Issues

Develop robust utterances

some examples:
-SpellsIntent what is the {attribute} of {spell}
-SpellsIntent whats the {attribute} of {spell}
-SpellsIntent whats {spell} {attribute}?

-SpellsIntent what does {spell} do
-SpellsIntent whats {spell} do
-SpellsIntent whats {spell}

-SpellsIntent how long does {spell} last

SpellCastingIntent

Currently, asking "How do I cast " returns the short description. @jnoehren noticed during testing that this is awkward UX and sometimes doesn't actually answer the question.

  • Should SpellCastingIntent be created to respond to this?
  • Can this question be answered with modifications to SpellsIntent?
  • What additional attributes need to be added to spells.js to make this work?

Certification Rejection Notice

Dear alex,

Thank you for the recent submission of your skill, ‘Ask The DM’.

Your skill submission has failed the certification process. We’ve included a description of the issue(s) and steps to reproduce below. Please address these and resubmit the skill at your earliest convenience. As a reminder, when you publish a skill between June 1, 2017 and June 30, 2017, you can apply for a free Echo Dot to commemorate your achievement. Quantities are limited. See our terms and conditions. Non-US developers, check out our other promotions in the UK, Germany, and India.

Issues with skill in English (US)


1.Your skill does not meet invocation name requirement #4: Two-word invocation names are not allowed if one of the words is a definite article (“the”), indefinite article (“a”, “an”) or preposition (“for”, “to”, “of”). For example, “a bicycle”, “an espresso”, “to amuse”, “for fun”.

Also, Your skill does not meet our invocation name requirements for formatting. The invocation name must contain only lower-case alphabetic characters, spaces between words, possessive apostrophes (for example, “sam’s science trivia”), or periods used in abbreviations (for example, “a. b. c.”). Other characters like numbers must be spelled out. For example, “twenty one”. Please review our documentation on choosing an invocation name and update your invocation name and example phrases accordingly.

Please make necessary changes and ensure the new name is accurately represented in the skill’s example phrases and also in the skill description and skill responses (if present).

2.After the skill completes a task, the session remains open with no prompt to the user. The skill must close the session after fulfilling requests if it does not prompt the user for any input. Please refer to test case 4.1 from the Submission Checklist.

Steps to reproduce:

User: "Alexa open the dm"

Skill: "Welcome to Ask the DM. You can ask a question like, what's the range of fireball? ... Now, what can I help you with? You can also say help."

User: "what is the duration of alarm"

Skill: "8 hours" and the Session remains open.

3.When invoking the "SpellCastIntent" intent an empty slot value provided for the "Spell" slot, the skill returns an error. Please see test case 4.11 from our Submission Checklist for guidance on error handling.

Steps to reproduce:

User: "Alexa open the dm"

Skill: "Welcome to Ask the DM. You can ask a question like, what's the range of fireball? ... Now, what can I help you with? You can also say help."

User: "how do i cast {}"

Skill: "There was a problem with the requested skill's response"

Create an IncompleteIntent

We're routing all incomplete requests to the Unhandled intent. We also route other unhandled interactions to this intent. I think we should break out incomplete utterances into an IncompleteIntent so we can better debug. As it stands, ~30% of requests end up in unhandled and I can't tease out why.

configure intents

Right now, the intents are configured to simply grab the spell by name and read the description. The intents need to be rewritten to take advantage of the new JSON formatting.

What rules to include, and how much information?

I don't think it's reasonable to transcribe the whole players handbook. We need to determine a set of rules that users would benefit the most from.

I'm thinking commonly forgotten rules, rules that are invoked occasionally, or rules with simple/short responses are good starting candidates.

We then need to figure out how to parse and store the rules quickly as json objects.

add in all the spells to spells.js

I'm just copying and pasting for long descriptions. Use your best judgement for short descriptions. Imagine you're at the table playing and you want just the important details. People can always ask for the long description if they want to get into the weeds.

I'm referring to the spells here, and only 5e player's handbook for now.

Spell names are case sensitive. Please use the following format:

"aid" : {
            "castingTime" :         "one action",
            "duration" :            "8 hours",
            "range" :               "30 feet",
            "components" :          "Verbal, Somatic, Material (a tiny strip of white cloth)",
            "spellType" :           "2nd level abjuration",
            "shortDescription" :    "Increase up to 3 creature's max and current hitpoints by 5.",
            "longDescription" :     "Your spell bolsters your allies with toughness and resolve. Choose up to three creatures within range. Each target's hit point maximum and current hit points increase by 5 for the duration. At higher levels: When you cast this spell using a spell slot of third level or higher, a target's hit points increase by an additional 5 for each slot level above second",
            "url" :                 "https://www.dnd-spells.com/spell/aid"
        },

feedback 2

1.The example phrases that you choose to present to users in the companion app must be selected from your sample utterances. These sample utterances should not include the wake word or any relevant launch phrasing.

Please change your first and second example phrases as follows:

Alexa, ask my handbook what's aid? => Alexa, ask my handbook what is magic circle?

Alexa, ask my handbook what is the range of fireball? => Alexa, ask my handbook what is the range of control flames?

Please see our documentation for more information about the words included in our supported launch phrases.

2.If user input is required after launching the skill with no intent, a welcome prompt must be provided which describes what users can ask of the skill and the session must remain open for a user response. If the session closes after launching the skill, a core functionality must be completed without prompting users to speak. Also the welcome phrase must be appropriate to the context of the skill’s functionality as defined in its description. Please see test case 4.1 from our Submission Checklist for guidance on session management.

clean up utterances

There are a few messy strings that were generated with the utterance expander tool. These are causing unpredictable interpretations of user input, and need to be cleaned up. While we're at it, they need to be put in alphabetical order (by intent name, not the whole string!)

define utterances for skill

"Alexa, ask the DM to play battle music" -> "MusicIntent to play {Playlist}"
"Alexa, ask the DM to put on some tavern music" -> "MusicIntent to put on some {Playlist}"

Noticeable slowdown on spell request

When I had two spells in spell.js, output was near-instant.

Now that there's 400+ spells (unordered), there is a noticeable delay in getting a response. This needs to be optimized.

rework spell cast intent output

it's okay how it is now, but it could be improved.

" druidcraft is a Transmutation cantrip. To cast, you need the following: Verbal, Somatic. The spell duration is Instantaneous..."

The part in italics sounds off when you hear it out loud. I don't have a lot of great ideas on how to fix this. It can be left as-is if fixing this is too much work.

regex spells

A few changes here:

  • Some spell names include (Ritual) - this needs to be moved to spellType
  • when spells are of level "cantrip", the spellType is stored erroneously as (for example)
    "spellType" : "level cantrip Abjuration" and needs to be "spellType" : "Abjuration cantrip "
  • sometimes an extra space is inserted between level and the number. This has no effect on UX, but still could use optimization.

Add spell descriptions

Item descriptions can range from one to two sentences to multiple paragraphs. It is critical that a voice interface system relay information as clearly and concisely as possible. Implementing this feature will take careful consideration of how much text to include, and what kind of interface should be used to keep the user in control of the conversation.

Some suggestions:

  • after a sentence or two, Alexa prompts "Would you like to know more?"
  • short form and long form descriptions
    • the player can ask something like "give me the short description of wish"
    • what happens if the short description isn't enough? Possible bad UX.

create testing document

this is for internal use, I have a working draft. The problem is I'm not consistently testing each and every intent when I update something in the code, and this will eventually lead to errors.

Version 2 Check List

  • Add website: According to the security requirement: we must host the webpage on our own endpoint

  • Add cards: Open the detail card for the full description. Captures any prerequisites needed to use the skill, describes the core functionality

  • If we have privacy policy or terms of use links, have them open in a browser

  • Look into Home Cards: Graphical cards displayed in the Alexa app to describe or enhance the voice interaction

  • Add dice intent

  • Add items intent

  • Add Feats intent

  • Expand utterances Utterance Expander

  • Adding Alex's API for abstraction

Need two icons for publishing

Small Icon
108 x 108 pixel PNG (can include transparency) or JPG file that represents this skill. Displays in the Alexa App.

Large Icon
512 x 512 pixel PNG (can include transparency) or JPG file that represents this skill. Displays in the Alexa App on larger screens.

can we expand this feature to do calculations?

Right now the feature should handle DnD specific dice rolls. Can we expand this functionality to handle calculating different things?

For example:

  • the results of complex rolls for certain mechanics
  • currency conversion
  • weight/speed
  • xp generation

Not looking for edge cases to justify, just wondering if there's some obvious utility we can offload from the player to Alexa.

update the skill description (user-facing)

The information that users see on the skill store needs to be updated to reflect the new features. It needs to both give enough information to let people know the scope of the application, while being succinct enough to not be boring or turn people away.

Create a HelpIntent

see #99 - make a branching help menu to reduce speech output time and better respond to questions.

Music and ambience feature definition

Determine how we can get ambience playback through Alexa. Ambience is distinct from music in that it is mostly sound effects, like fire crackling, water drips, swords clashing, etc.

If we can, we should think about having separate Intents: MusicIntent and AmbienceIntent.

State machine for one-shot/interactive sessions

When application is launched using 'LaunchRequest' set state to oneShotSession
When application is launched using 'NewSession' set state to interactiveSession

A one shot session is a one-time, quick answer request, like "Alexa, ask the DM what is the range of fireball". This returns an answer and closes the session without reprompt.

An interactive session prompts the user after each answer, until the user closes the application.

update the help message (in-app)

The help message needs to be updated to reflect the new intents and usages.

This could be as simple as updating the "HELP_MESSAGE" in languageStrings.js.

Ideally, we should look at expanding this into its own intent, so we can achieve more specific and multilevel help messages. Right now, the messages are too long, and we need to be sensitive to how long a user is willing to listen to Alexa drone on. This is a major task.

Certification Checklist

  • Test "Ask invoke to do something but leave task blank
    -tested Ask DM to ... she responds with "I'm sorry I currently Don't know that spell."
    -She needs to prompt for the missing info, such as "to do 'abc', say 'abc' "
    -when you respond to the prompt, the skill continues prompting until all needed info is collected, then provides a contextualized non-error response

  • invoke the skill when prompted to respond, say something that matches one of the intents, but with wrong slots used.
    -test "ask dm for what is the range of blind". Tested: "Im sorry I currently don't know 'blind' "

  • Add disclaimer for ages 13+

  • Add disclaimer for wizards of the coast

  • At least one example phrase has been provided on the skill in the skill store page

  • First phrase clearly indicates how to begin using the skill, and includes the wake word and invocation name

  • Example phrases containing the wake and invocation name must use a supported format for invoking a skill.

    • Can't be "Alexa hack the pentagon, then also ask blah blah" they say not cool, i guess
  • Provide a short description as shown in the list of skills. Describe the skill's core functionality.

  • The invocation name uses title case. I'm assuming to distinguish that this is the invocation name

  • Test "Open invocation Name".

  • Test a variety of intents

  • Review the skill title and icon, ensure they are relevant.

  • Individual letters followed by a period for example TV should be expressed as "t. v.", same for OK, and compound words like "AccessHD = Access h. d."

  • Stopping: after hearing the prompt "ask dm what is fireball" .... "alexa stop" she stops. works

    • Need to test with just prompt of stop, and cancel, without saying Alexa in front as well.
  • phrases are easy and natural to say

  • Example phrases, can't contain emoticons, symbols, or grammar errors.

  • Verify that each example phrase is included as a sample utterance

  • According to the security requirement: we must host the webpage on our own endpoint

  • Open the detail card for the full description. Captures any prerequisites needed to use the skill, describes the core functionality

  • If the short or full description includes a URL, make sure the URL is connected

  • If we have privacy policy or terms of use links, have them open in a browser

  • Look into Home Cards: Graphical cards displayed in the Alexa app to describe or enhance the voice interaction

  • Test "Ask Invocation Name to do something"

    • tested Ask DM to tell me the range of fireball. works
  • Ask invoke for abc and skill ends. One-shot phrasing utterance

    • Tested "ask dm for range of fireball" works
  • Change invocation name to just "dm"

Custom Slot Types need to be updated with all spell names

I'm going to try to update cvt.py to dump the spell names into a file in the format I want, I'm just leaving this here in case I forget or in case you want to do it instead.

spell names in following format:

fireball
aid
chromatic orb

Create LootIntent

Effectively a random number generator that picks treasure from a table. Could be as simple as a 1-100 roll or as complex as CP ranges, monster types, etc.

Manual spell damage parse

In the spellDamage branch the file (spell_parse/spellDamage/spells_with_damage.json) needs to be manually parsed for damages that need to be written by a person. For example "prismatic spray" has four damage types depending on dice roll so damage should say something like "10d6 elemental damage based on dice roll". There are only 16 spells that need this

Beta tester email (IN PROGRESS)

Hi!

Welcome to the Beta test of our Alexa Skill: Ask the DM!

We are testing for version 1.0, which contains information about spells and conditions.

What is it?
Ask the DM is a quick-reference tool for the tabletop game, Dungeons and Dragons. You should have some familiarity with D&D to use this app easily. You can find lists of spell names and conditions online.

A quick note on some technical details:

  • You need an echo device to test this.
  • You should have gotten an email from Amazon with a link to the application. This needs to be the email address associated with your Echo device.
  • If you opted out of receiving emails from Amazon, you will not get this email. Let me know, and I will send you a link.
  • The beta will run for a week or so, depending on feedback.
  • We will ask your permission to be added into future betas.
  • We do not get any voice information from you. That is, no audio picked up from the mic is transmitted to us. We cannot hear what you're saying, or read transcripts of audio as text. We can see information like number of times the application was used, how many questions are being asked, and if any errors occurred, etc. Please reach out to me directly if you have any questions or concerns.

Still in? Great!

What kind of feedback are we looking for?

  • What did you ask that didn't work?
  • Did something sound funny?
  • Was the information given accurately?
  • Would you use this application?
  • Would you recommend this application to a friend?
  • What other uses of this application can you think of?

Don't feel pressured to answer any of the questions above at all. Any feedback is greatly appreciated, and goes a long way towards making sure we are making good software. If there's anything we forgot, let us know!

Send feedback to: [email protected]

Thanks again!

  • The Devs

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.