Coder Social home page Coder Social logo

alexa-samples / skill-sample-nodejs-adventure-game Goto Github PK

View Code? Open in Web Editor NEW
510.0 87.0 218.0 993 KB

This tool provides an easy to use front-end that allows developers to instantly deploy code for your story, or use the generated code as a starting point for more complex projects.

License: Apache License 2.0

JavaScript 1.95% HTML 98.05%

skill-sample-nodejs-adventure-game's Introduction

Build An Alexa Gamebook Skill

This Alexa sample skill is a template for a basic gamebook skill. Provided with a branching text adventure from the Twine 2 platform, Alexa will let you play a game.

If this is your first time here, you're new to Alexa Skills Development, or you're looking for more detailed instructions, click the Get Started button below:

Be sure to take a look at the Additional Resources at the bottom of this page!

About

Note: The rest of this readme assumes you have your developer environment ready to go and that you have some familiarity with CLI (Command Line Interface) Tools, AWS, and the ASK Developer Portal. If not, click here for a more detailed walkthrough.

Usage

Alexa, ask Text Adventure where am I?
	>> You are in the main hall of a large castle. Heavy tapestries hang from the walls...
Alexa, start Text Adventure
	>> You're in a small office, there is a door to your left...

Repository Contents

Setup w/ ASK CLI

Pre-requisites

Installation

  1. Clone the repository.

    $ git clone https://github.com/alexa/skill-sample-gamebook/
  2. Initialize the ASK CLI by navigating into the repository and running npm command: ask init. Follow the prompts.

    $ cd skill-sample-gamebook
    $ ask init
  3. Install npm dependencies by navigating into the lambda/custom directory and running the npm command: npm install

    $ cd lambda/custom
    $ npm install

Deployment

ASK CLI will create the skill and the Lambda function for you. The Lambda function will be created in us-east-1 (Northern Virginia) by default.

  1. Deploy the skill and the Lambda function in one step by running the following command:

    $ ask deploy

Testing

  1. Log in to the Alexa Developer Console, open your skill, and from the Test tab enable the Test switch.

  2. Simulate verbal interaction with your skill through the command line using the following example:

     $ ask simulate -l en-US -t "start Text Adventure"
    
     ✓ Simulation created for simulation id: 4a7a9ed8-94b2-40c0-b3bd-fb63d9887fa7
    ◡ Waiting for simulation response{
      "status": "SUCCESSFUL",
      ...
  3. With the Test switch enabled, your skill can also be tested on devices associated with your developer account. Speak to Alexa through any enabled physical device, through your browser with echosim.io, or through your Amazon Mobile App and say:

    start Text Adventure
    

Customization

  1. Amend ./skill.json

    Change the skill name, example phrase, icons, testing instructions, etc ...

    Remember that interaction models are locale-specific and must be changed for each locale (en-US, en-GB, de-DE, etc.).

    See the Skill Manifest Documentation for more information.

  2. Amend ./lambda/custom/index.js

    Modify messages, and facts from the source code to customize the skill.

  3. Amend ./models/*.json

    Change the model definition to replace the invocation name and the sample phrase for each intent. Repeat the operation for each locale you are planning to support.

  4. Open the Twine 2 online editor

    Twine 2 is a text adventure authoring platform. It is capable of creating quite complex standalone games using variables and plug-ins. For our purposes we use it to create a simple text-and-choice-based branching game.

    Note that we are not using Twine variables. We leave this as a programming task for any enthused developers.

    You can use the online editor or download and install it as a desktop app.

    We aren't going to teach you how to use Twine here, but if you import the sample game it will give you a head-start.

    Later, when you are developing your own Alexa skills, remember that Twine can be very useful for designing voice interaction flows.

  5. Import and play the sample game

    In the main right-hand menu click on Import From File.

    Import the sample game [Escape the Office.html](../lambda/custom/Escape the Office.html)

Additional Resources

Community

Tutorials & Guides

  • Voice Design Guide - A great resource for learning conversational and voice user interface design.
  • CodeAcademy: Learn Alexa - Learn how to build an Alexa Skill from within your browser with this beginner friendly tutorial on CodeAcademy!

Documentation

skill-sample-nodejs-adventure-game's People

Contributors

akersh-s avatar aszk avatar franklin-lobb avatar jakemkelly avatar kunalhsatoz avatar rjamison avatar

Stargazers

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

Watchers

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

skill-sample-nodejs-adventure-game's Issues

"My apologies, please repeat your command." Issue

Hello everyone, i'm in the middle of testing my skill however while testing it the skill appears to not accept any command after the first box. This being the case as it will return:

{
"version": "1.0",
"response": {
"outputSpeech": {
"type": "SSML",
"ssml": "My apologies, please repeat your command.<break time="200ms"/>You can say, “Office,” “Vault,” “Library” <break time="100ms" />or “Training Area.”"
},
"card": {
"text": "Please repeat your command. You can say, “Office,” “Vault,” “Library” or “Training Area.”",
"title": "Unrecognized command",
"image": {},
"type": "Standard"
},
"reprompt": {
"outputSpeech": {
"type": "SSML",
"ssml": "I'm sorry.<break time="200ms"/>You can say, “Office,” “Vault,” “Library” <break time="100ms" />or “Training Area.”"
}
},
"shouldEndSession": false
},
"sessionAttributes": {
"currentSceneId": 1,
"breadcrumbs": [
0
]
}
}

I don't know if i'm missing something simple here or if this is a problem. Any help would be greatly appreciated. I have updated the utterances and intents to make sure that this was not the problem however I am still at a loss.

Thanks for any help,
James

image

image

off the side of the screen

Hello,

Is there a way to scroll sideways on the gui, or shrink the view? After going down a few levels of decisions, they are generated off screen.

Thanks.

Great Tool. Minor Suggestions for Tutorial

As a noob I found the directions mostly amazing. Below are some spots I stumbled and quick suggestions to fix:

3 "Create an AWS Role..." - Suggest adding "see screenshots below" to end of this line. I stumbled for a little thinking the picture was for step 4 and ignoring it.

4 Add "Click on the Services Menu and choose Lambda, then create an AWS..."

5 Probably redundant once someone figures out #4, but still saying "Click on the Services menu and choose DynamoDB" at beginning

7 I think the button was called "Alexa Skill Kit" not "create Alexa skill". Figured it out and minor compared to others but might be worth changing the wording slightly to say "Create an alexa skill kit named.."

7 (part II) - it would be great if your screenshot had a sample ARN in there I copy pasted way to many words from the top right above and had a bit of trial and error. Seeing one in action would have made it simple to figure out where to truncate.

SET UP YOUR MACHINE

2 I spent about 30 minutes bumping around this one. Might have gotten it working. Would be great to point to a tutorial on this or breaking it into a couple of steps. This was super confusing as a noob.

3 Probably worth noting that Xcode is required. I tried and failed a few times before coming across this.

Thanks again for all the great work, and the detailed read-me!

Behavior for exiting / resuming the skill

I'm currently testing exiting the skill then resuming where I left off. I can see the currentSceneId and breadcrumbs values in DynamoDB correctly update as I move through the game, however when I type the command exit skill in the Amazon Developer console then type the command begin it resets the saved progress in DynamoDB. Attempting to use the resume skill command at the start doesn't seem to resume where I left off either. I'm assuming that there's some way of getting it to return the AskToRestoreState command response?

Successfully Uploaded but failed at AWS Lambda

Hi,

I got "successfully Uploaded" but when I tested at AWS Lambda I got an error message.

{
"errorMessage": "Cannot find module '/var/task/index'",
"errorType": "Error",
"stackTrace": [
"Function.Module._load (module.js:417:25)",
"Module.require (module.js:497:17)",
"require (internal/module.js:20:19)"
]
}

P.S. I use window 7, I am not sure that is related or not.

Best Wishes,

Thongchai

DynamoDB

Changes made by the user don't log in DynamoDB.
The Lambda trigger appears to be working fine but no records are being processed by the Dynamo Table.

Error uploading

I'm new at this, so I'm hoping this is something simple/obvious. I get this error just testing the upload button after an initial install. Thanks in advance for any tips.

0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/Cellar/node/7.4.0/bin/node',
1 verbose cli '/usr/local/bin/npm',
1 verbose cli 'start' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle [email protected]prestart: [email protected]
6 silly lifecycle [email protected]
prestart: no script for prestart, continuing
7 info lifecycle [email protected]start: [email protected]
8 verbose lifecycle [email protected]
start: unsafe-perm in lifecycle true
9 verbose lifecycle [email protected]start: PATH: /usr/local/lib/node_modules/npm/bin/node-gyp-bin:/Users/animetest/Documents/InteractiveStory/interactive-adventure-game-tool/node_modules/.bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
10 verbose lifecycle [email protected]
start: CWD: /Users/animetest/Documents/InteractiveStory/interactive-adventure-game-tool
11 silly lifecycle [email protected]start: Args: [ '-c', 'node node_modules/gulp/bin/gulp.js' ]
12 silly lifecycle [email protected]
start: Returned: code: 1 signal: null
13 info lifecycle [email protected]~start: Failed to exec start script
14 verbose stack Error: [email protected] start: node node_modules/gulp/bin/gulp.js
14 verbose stack Exit status 1
14 verbose stack at EventEmitter. (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:279:16)
14 verbose stack at emitTwo (events.js:106:13)
14 verbose stack at EventEmitter.emit (events.js:191:7)
14 verbose stack at ChildProcess. (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:40:14)
14 verbose stack at emitTwo (events.js:106:13)
14 verbose stack at ChildProcess.emit (events.js:191:7)
14 verbose stack at maybeClose (internal/child_process.js:885:16)
14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
15 verbose pkgid [email protected]
16 verbose cwd /Users/animetest/Documents/InteractiveStory/interactive-adventure-game-tool
17 error Darwin 13.4.0
18 error argv "/usr/local/Cellar/node/7.4.0/bin/node" "/usr/local/bin/npm" "start"
19 error node v7.4.0
20 error npm v4.1.2
21 error code ELIFECYCLE
22 error [email protected] start: node node_modules/gulp/bin/gulp.js
22 error Exit status 1
23 error Failed at the [email protected] start script 'node node_modules/gulp/bin/gulp.js'.
23 error Make sure you have the latest version of node.js and npm installed.
23 error If you do, this is most likely a problem with the interactive-adventure-game-tool package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error node node_modules/gulp/bin/gulp.js
23 error You can get information on how to open an issue for this project with:
23 error npm bugs interactive-adventure-game-tool
23 error Or if that isn't available, you can get their info via:
23 error npm owner ls interactive-adventure-game-tool
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]

Created and uploaded, unable to test

Left all code default, on amazon entered the instances and utterances, when testing the skill through the "Ask my skill" I encounter an error stating "The remote endpoint could not be called, or the response it returned was invalid."

Same result if I ask - Begin, Help, Launch, look, open etc.

{ "session": { "sessionId": "SessionId.0a49202c-5789-495c-b623-750fa27a9047", "application": { "applicationId": "amzn1.ask.skill.fd11987c-faca-4f13-b92a-1f533e4aca86" }, "attributes": {}, "user": { "userId": "amzn1.ask.account.AFP3ZWPOS2BGJR7OWJZ3DHPKMOMDHLY437I2OB3WH42YKPIHJ5IPM7H65B2VIYYR4TOSY6LIMP6EE2AD63VNKO436W2762S3KUHX6R2QPVM2UTI3QGBLHRNC56EDW4JTQ7YNH5Q7URKOB2EK723OY3F7GU5PK5NK7NGU7JXRL4ADSQP2T65NMYRLZ4RP6LOVIVUAYENM7QDTVAA" }, "new": true }, "request": { "type": "IntentRequest", "requestId": "EdwRequestId.6a19504a-f24c-4605-853d-218d64bfe754", "locale": "en-US", "timestamp": "2016-08-06T16:45:21Z", "intent": { "name": "BeginIntent", "slots": {} } }, "version": "1.0" }

Proposed to my girlfriend with this

Just wanted to say thanks for making this. Just wrote an 8 branch adventure to propose to my girlfriend, taking her through turning points in our relationship with a ton of funny little hidden easter eggs if she made any negative choices. Definitely took a lot of googling and a little hacking to make it work 11 months since the last commit, but well worth it and still much easier than going from scratch. Thanks for making two kids' days out in Philadelphia.

npm start issue in Windows Machine

This is the error log I get when I do npm start

C:\Users\skyip\Documents\GitHub\interactive-adventure-game-tool\interactive-adventure-game-tool>npm start

[email protected] start C:\Users\skyip\Documents\GitHub\interactive-adventure-game-tool\interactive-adventure-game-tool
node node_modules/gulp/bin/gulp.js

C:\Users\skyip\Documents\GitHub\interactive-adventure-game-tool\interactive-adventure-game-tool\node_modules\require-dir\index.js:97
if (!require.extensions.hasOwnProperty(ext)) {
^

TypeError: require.extensions.hasOwnProperty is not a function
at requireDir (C:\Users\skyip\Documents\GitHub\interactive-adventure-game-tool\interactive-adventure-game-tool\node_modules\require-dir\index.js:97:37)
at Object. (C:\Users\skyip\Documents\GitHub\interactive-adventure-game-tool\interactive-adventure-game-tool\gulpfile.js:1:85)
at Module._compile (module.js:635:30)
at Object.Module._extensions..js (module.js:646:10)
at Module.load (module.js:554:32)
at tryModuleLoad (module.js:497:12)
at Function.Module._load (module.js:489:3)
at Module.require (module.js:579:17)
at require (internal/module.js:11:18)
at Liftoff.handleArguments (C:\Users\skyip\Documents\GitHub\interactive-adventure-game-tool\interactive-adventure-game-tool\node_modules\gulp\bin\gulp.js:116:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: node node_modules/gulp/bin/gulp.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\skyip\AppData\Roaming\npm-cache_logs\2017-11-15T23_44_58_976Z-debug.log

Any help will be appreciated.

Also this is what I get after I do npm install

npm notice created a lockfile as package-lock.json. You should commit this file. npm WARN [email protected] No repository field. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

Unit tests

Are there any plans to include unit tests for part or all of the code in future versions? I've added some for the features I'm working on using mocha and chai, but just wanted to make sure that this is consistent with anything the Alexa team has planned?

Licence

Are there other licencing options available other than Amazon's licence?

I'm interested in making modifications to the code the tool generates to add new features such as an inventory system and useable items.

Interactive Adventure Game Tool BLANK BROWSER WINDOW

Can anyone provide instructions on how to solve the blank browser problem. The instructions were followed and when the chrome browser opens there is a black screen. This has been reported already in March but I thought I would try again to get a resolution.

Gulp error

when try and run npm start - I get this. Not sure how to proceed. node in 7.3.0. npm 3.10.10

npm ERR! Darwin 16.0.0 npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "start" npm ERR! node v7.3.0 npm ERR! npm v3.10.10 npm ERR! code ELIFECYCLE npm ERR! [email protected] start: node node_modules/gulp/bin/gulp.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] start script 'node node_modules/gulp/bin/gulp.js'. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the interactive-adventure-game-tool package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node node_modules/gulp/bin/gulp.js npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs interactive-adventure-game-tool npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls interactive-adventure-game-tool npm ERR! There is likely additional logging output above.

Windows Install

I was wondering if anyone could lead me to any instructions on how to get this running on a Windows 10 machine?

Thanks so much.

Credentials

I think I must be just overlooking something easy, but where do I get the AWS Key?

Thanks

Beginner Issues: Install/Run NPM

Hi all, trying my best to get everything set up. Part I of the tutorial was a breeze. Part II - setting up your computer - I've been lost in the woods for about 2 days now... I keep receiving this error when trying to install NPM after cloning the git. If i try to start I have occasionally been able to get a browser window to show up, but empty screen. This is what showed up in terminal:

Jes-MacBook-Pro:~ jloredo$ git clone https://github.com/alexa/interactive-adventure-game-tool.git
Cloning into 'interactive-adventure-game-tool'...
remote: Counting objects: 128, done.
remote: Total 128 (delta 0), reused 0 (delta 0), pack-reused 128
Receiving objects: 100% (128/128), 187.19 KiB | 558.00 KiB/s, done.
Resolving deltas: 100% (35/35), done.

Jes-MacBook-Pro:~ jloredo$ npm install
npm ERR! file /Users/jloredo/package.json
npm ERR! code EJSONPARSE
npm ERR! Failed to parse json
npm ERR! Unexpected token
npm ERR! in JSON at position 1058 while parsing '{
npm ERR! "name": "interactive-adventure-game-'
npm ERR! File: /Users/jloredo/package.json
npm ERR! Failed to parse package.json data.
npm ERR! package.json must be actual JSON, not just JavaScript.
npm ERR!
npm ERR! Tell the package author to fix their package.json file. JSON.parse

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/jloredo/.npm/_logs/2017-10-13T02_02_45_338Z-debug.log
Jes-MacBook-Pro:~ jloredo$

Any ideas would be appreciated, thanks! :)

Missing files when I run

I've reinstalled a couple of times and I don't see any errors cloning from git or when doing npm install but when I run the following file is missing. There is actually no jspm_packages directory.
400 GET http://localhost:9000/jspm_packages/system.js

I do have other node applications installed on the mac so I don't know if there is a conflict.
My other application runs on a different port. The page does load, it is just black.

Any help or ideas would be appreciated. I'm excited to try this new tool. Thanks!

Creating an object

Im trying to create a "key" object that is behind door number one. And is required to open door two, however every time i save and upload the file, it regenerates and the code I just wrote is lost.

Any advice on how I should go about doing this/why the code is being removed?

Windows setup?

does anyone have instructions on how to do this in a windows environment rather than mac or is it not possible?

Can't Get Past Second Branched Level

The skill works when I am at the first level (Welcome), but I encounter an error when I am at the second level (Open Door 1...). When I test it in the Service Simulator and get to the place where I am prompted to choose a door, I type in "Open Door 1". I get the following error in the Lambda request: "Unable to generate request for your skill."

I have saved and uploaded the file in the authoring tool. I have updated the Utterances and IntentSchemas into the Developer Console.

I have also created a new branch in which I can go to the first level, but encounter the following error when I say my prompt for that level "Keep Going":
{
"version": "1.0",
"response": {
"outputSpeech": {
"type": "SSML",
"ssml": "My apologies, please repeat your command.<break time="200ms"/>Say, “Keep going.”"
},
"card": {
"text": "Please repeat your command. Say, “Keep going.”",
"title": "Unrecognized command",
"image": {},
"type": "Standard"
},
"reprompt": {
"outputSpeech": {
"type": "SSML",
"ssml": "I'm sorry.<break time="200ms"/>Say, “Keep going.”"
}
},
"shouldEndSession": false
},
"sessionAttributes": {
"currentSceneId": 7,
"breadcrumbs": [
0
]
}
}

issue uploading skill code to lambda

Anytime i hit the save button to send my code to lambda i'm receiving the below error. Any leads into what could be causing this? I've recreated my roles with admin access and update my credential file, no luck.

`/Users/MisterFili/Documents/InteractiveStory/interactive-adventure-game-tool/node_modules/gulp-awslambda/node_modules/aws-sdk/lib/request.js:30
throw err;
^

Error: Missing credentials in config
at Request.callListeners (/Users/MisterFili/Documents/InteractiveStory/interactive-adventure-game-tool/node_modules/gulp-awslambda/node_modules/aws-sdk/lib/sequential_executor.js:107:43)
at Request.emit (/Users/MisterFili/Documents/InteractiveStory/interactive-adventure-game-tool/node_modules/gulp-awslambda/node_modules/aws-sdk/lib/sequential_executor.js:77:10)
at Request.emit (/Users/MisterFili/Documents/InteractiveStory/interactive-adventure-game-tool/node_modules/gulp-awslambda/node_modules/aws-sdk/lib/request.js:596:14)
at Request.transition (/Users/MisterFili/Documents/InteractiveStory/interactive-adventure-game-tool/node_modules/gulp-awslambda/node_modules/aws-sdk/lib/request.js:21:10)
at AcceptorStateMachine.runTo (/Users/MisterFili/Documents/InteractiveStory/interactive-adventure-game-tool/node_modules/gulp-awslambda/node_modules/aws-sdk/lib/state_machine.js:14:12)
at /Users/MisterFili/Documents/InteractiveStory/interactive-adventure-game-tool/node_modules/gulp-awslambda/node_modules/aws-sdk/lib/state_machine.js:26:10
at Request. (/Users/MisterFili/Documents/InteractiveStory/interactive-adventure-game-tool/node_modules/gulp-awslambda/node_modules/aws-sdk/lib/request.js:37:9)
at Request. (/Users/MisterFili/Documents/InteractiveStory/interactive-adventure-game-tool/node_modules/gulp-awslambda/node_modules/aws-sdk/lib/request.js:598:12)
at Request.callListeners (/Users/MisterFili/Documents/InteractiveStory/interactive-adventure-game-tool/node_modules/gulp-awslambda/node_modules/aws-sdk/lib/sequential_executor.js:115:18)
at Request.emit (/Users/MisterFili/Documents/InteractiveStory/interactive-adventure-game-tool/node_modules/gulp-awslambda/node_modules/aws-sdk/lib/sequential_executor.js:77:10)

npm ERR! Darwin 15.6.0
npm ERR! argv "/usr/local/Cellar/node/5.10.1/bin/node" "/usr/local/bin/npm" "start"
npm ERR! node v5.10.1
npm ERR! npm v3.8.3
npm ERR! code ELIFECYCLE
npm ERR! [email protected] start: node node_modules/gulp/bin/gulp.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script 'node node_modules/gulp/bin/gulp.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the interactive-adventure-game-tool package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node node_modules/gulp/bin/gulp.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs interactive-adventure-game-tool
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls interactive-adventure-game-tool
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /Users/MisterFili/Documents/InteractiveStory/interactive-adventure-game-tool/npm-debug.log`

Does not run "npm start"

[email protected] start /Users/klebermaia/Projects/Alexa/interactive-adventure-game-tool
./node_modules/gulp/bin/gulp.js

/Users/klebermaia/Projects/Alexa/interactive-adventure-game-tool/node_modules/require-dir/index.js:97
if (!require.extensions.hasOwnProperty(ext)) {
^

TypeError: require.extensions.hasOwnProperty is not a function
at requireDir (/Users/klebermaia/Projects/Alexa/interactive-adventure-game-tool/node_modules/require-dir/index.js:97:37)
at Object. (/Users/klebermaia/Projects/Alexa/interactive-adventure-game-tool/gulpfile.js:1:85)
at Module._compile (module.js:569:30)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:503:32)
at tryModuleLoad (module.js:466:12)
at Function.Module._load (module.js:458:3)
at Module.require (module.js:513:17)
at require (internal/module.js:11:18)
at Liftoff.handleArguments (/Users/klebermaia/Projects/Alexa/interactive-adventure-game-tool/node_modules/gulp/bin/gulp.js:116:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: ./node_modules/gulp/bin/gulp.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/klebermaia/.npm/_logs/2017-07-23T02_01_35_611Z-debug.log

"Set up Your Machine"

I'm confused on step 2 where it says "The file should have the format, and include keys you retrieve from the AWS console:"

What is the "format" that I'm looking for and where can I find it? I found the keys.

Signature Expired

Been getting this error, able to save now but get this when I try and upload. Any ideas?

Error: Signature expired: 20170721T074556Z is now earlier than 20170722T022954Z (20170722T023454Z - 5 min.)
at Request.callListeners (/Users/optimusprime/interactive-adventure-game-tool/node_modules/gulp-awslambda/node_modules/aws-sdk/lib/sequential_executor.js:107:43)

Amazon's Skill Builder (BETA) Causing Issues (Warning)

Please make sure you do not use the new beta, skill builder, in order to update your code. Using this builder caused me to be unable to upload Intent Schema and Sample Utterances , essential to the skill. The cause of this is that skill builder COMBINES the two, so attempting to upload Intent Schema through this tool will only lead to error messages.
Thanks,
Camden

2 failed utterances shut down the skill

The current issue I am seeing is at any node, if you misspeak utterances two times in a row, the skill completely shuts off. In a room full of crowded people, this is very problematic, especially if someone has made decent progress. Is there any way to remove this limtation?

Region

No matter how hard I try, I don't seem to be able to get it upload to the "eu-west-1" (Ireland) region -
Alexa Skill Kit is available in this region. (I'm on MacOS). (Credential wise seems to be ok).

i.e. I've done all the followings but still no luck:

  • adding "region" = "eu-west-1"and "dynamoRegion" = "eu-west-1" in the src/skill/models/config.json. In this file I've also included the eu-west-1 lambda application ID. i.e. "applicationId" : "xxxxxxxxxxxxxx"
  • adding environmental variable AWS_REGION=eu-west-1 and AWS_DEFAULT_REGION=eu-west-1.
  • ensuring ~/.aws/credentials contains key and secret key (from IAM), and ~/.aws/config contains region = eu-west-1.

Whenever I hit the upload button, the log keeps implying it's trying to reach "us-east-1", instead of "eu-west-1". Error log shows this:

Error: Function not found: arn:aws:lambda:us-east-xxxxxxxx:function:myLambdaFunction

(it insists "us-east-1" instead of the "eu-west-1" that I thought I set).

Regarding Account Linking

hey,

I successfully linked amazon account to my custom skill and tested it ,its working fine . But I am unable to see the access token in the request JSON .What should I do to see the access token ?

Please help !

How to set up a windows machine

I'm not a programmer, just someone who wants to be able to make adventure games. You have instructions to set up a Mac, but not a PC. Do I need a Mac to use this tool?

npm install error

Hi,
I'm running this on OSX. Running 'npm install' result so the following error:

warn Error on download for github:systemjs/systemjs
     Bad response code 404

err

err  Error downloading loader files.

So systemjs is not reachable. What should I do to fix it?

Best

Updating intent schema and utterances

It sounds like the generated intent schema and sample utterances list for the interaction model are not get updated after uploading through the tool

Can't call built in intents

Hello!

I've just about successfully completed and tested my skill, but whenever my skill calls the built in intents (HelpIntent, StopIntent or CancelIntent) the skill shuts down. I get a card saying "The target Lambda application returned a failure response" - looking at the CloudWatch logs, when attempting to call StopIntent I see this:

dispatch intent = AMAZON.StopIntent

Unexpected exception TypeError: Cannot read property 'filter' of undefined

"errorMessage": "Cannot read property 'filter' of undefined",
"errorType": "TypeError",
"stackTrace": [
    "buildPrompt (/var/task/handlers/respond.js:80:30)",
    "buildResponse (/var/task/handlers/respond.js:39:50)",
    "Object.module.exports.exitWithCard (/var/task/handlers/respond.js:23:16)",
    "defaultIntentHandlers.AMAZON.StopIntent (/var/task/handlers/intentHandlers_default.js:105:13)",
    "eventHandlers.onIntent (/var/task/handlers/eventHandlers.js:52:21)",
    "AlexaSkill.requestHandlers.IntentRequest (/var/task/AlexaSkill.js:28:33)",
    "AlexaSkill.execute (/var/task/AlexaSkill.js:79:20)"

Do you know what's going wrong here? I'm really not a coder, so any insight you could give would be very helpful! Thanks.

"my alexa skill" vs. "my skill"

Finally got it to work, thanks! I'm hoping to use it in my elementary school programming class in some fashion.

I think there is an inconsistency in the tutorial section. In the examples of using it, it says "launch my alexa skill", but in the development console screenshot it just says "my skill".

Being new at this, I kept saying "launch my alexa skill" and getting some vague response back. It felt great when I said "launch my skill" and it worked!

Advanced Features

I don't think it is possible but I thought I would ask

  • Is there a way to redirect the user to another room that is not a child of the current room. For instances, I would like to have an option to open a door that will return the user to the first room.
  • Is there a way to change the availability of a room. For instance, a room has a door and a switch. The door is locked until the switch is pulled. Then the door is open.

Can't Upload!! :(

Here's my code:

[13:19:39] Starting 'generate'...
[13:19:39] Finished 'generate' after 6.89 ms
[13:19:39] Starting 'upload'...
[13:19:40] Uploading Lambda function "InteractiveStoryLambdaFunction"...
C:\Users\camde\Documents\GitHub\interactive-adventure-game-tool\node_modules\gulp-awslambda\node_modules\aws-sdk\lib\request.js:30
            throw err;
            ^

Error: Missing credentials in config
    at Request.callListeners (C:\Users\camde\Documents\GitHub\interactive-adventure-game-tool\node_modules\gulp-awslambda\node_modules\aws-sdk\lib\sequential_executor.js:107:43)
    at Request.emit (C:\Users\camde\Documents\GitHub\interactive-adventure-game-tool\node_modules\gulp-awslambda\node_modules\aws-sdk\lib\sequential_executor.js:77:10)
    at Request.emit (C:\Users\camde\Documents\GitHub\interactive-adventure-game-tool\node_modules\gulp-awslambda\node_modules\aws-sdk\lib\request.js:596:14)
    at Request.transition (C:\Users\camde\Documents\GitHub\interactive-adventure-game-tool\node_modules\gulp-awslambda\node_modules\aws-sdk\lib\request.js:21:10)
    at AcceptorStateMachine.runTo (C:\Users\camde\Documents\GitHub\interactive-adventure-game-tool\node_modules\gulp-awslambda\node_modules\aws-sdk\lib\state_machine.js:14:12)
    at C:\Users\camde\Documents\GitHub\interactive-adventure-game-tool\node_modules\gulp-awslambda\node_modules\aws-sdk\lib\state_machine.js:26:10
    at Request.<anonymous> (C:\Users\camde\Documents\GitHub\interactive-adventure-game-tool\node_modules\gulp-awslambda\node_modules\aws-sdk\lib\request.js:37:9)
    at Request.<anonymous> (C:\Users\camde\Documents\GitHub\interactive-adventure-game-tool\node_modules\gulp-awslambda\node_modules\aws-sdk\lib\request.js:598:12)
    at Request.callListeners (C:\Users\camde\Documents\GitHub\interactive-adventure-game-tool\node_modules\gulp-awslambda\node_modules\aws-sdk\lib\sequential_executor.js:115:18)
    at Request.emit (C:\Users\camde\Documents\GitHub\interactive-adventure-game-tool\node_modules\gulp-awslambda\node_modules\aws-sdk\lib\sequential_executor.js:77:10)

npm ERR! Windows_NT 10.0.15063
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\camde\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "start"
npm ERR! node v6.10.0
npm ERR! npm  v4.3.0
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `node node_modules/gulp/bin/gulp.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script 'node node_modules/gulp/bin/gulp.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the interactive-adventure-game-tool package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node node_modules/gulp/bin/gulp.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs interactive-adventure-game-tool
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls interactive-adventure-game-tool
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Users\camde\AppData\Roaming\npm-cache\_logs\2017-06-10T19_19_40_198Z-debug.log


How do I fix this? Where are the credentials supposed to go? What am I doing wrong here?

What feature to set, so that game does not exits on wrong selection

Basically, the use case is more for customizing when you add more nodes and levels.

The behavior of door 2 (yellow) helps you remain in the game to try out other options while the door 1 (red) makes you complete the game (and hence begin fresh).

How do I set the behavior for any node to remain in the game nor forcing me to reset the skill.

Final Node - Automatic actions.

This is possibly a feature or instruction request rather than an issue.

How can I set things up so that that skill automatically exits once a final node has been completed?

Where can I change the table key for DynamoDB

When I created the DynamoDB table for this application, the key ended up being named something else other than userId. Where in the code base can I change it? I changed it to the new name in handlers/dynamoDB.js here:

Original:

"Key": {
   "userId": session.user.userId
     },

Replacement:

"Key": {
   "newKeyName": session.user.userId
     },

But are there other locations to edit? I see "userId" in other locations, but I do want to keep retrieving the device's user ID so i'm not sure what else to do.

This change wasn't enough, because I get this error in the logs when running the skill with the lambda function:

ERROR: Dynamo DB - "One or more parameter values were invalid: Missing the key newKeyName in the item", "code":"ValidationException"

I couldn't find any place on the tool's interface to edit this either; only to edit the table name. What are my options?

Missing interaction model in installation instructions

I'm running through the installation instructions and have hit a snag when it comes to setting up the Alexa Skill in the Amazon Alexa Developer Console. The instructions seem to skip over providing a correct Interaction Model for the Skill which is required to save it and proceed with the setup.

I've previously set up the sample Colors Skill using Amazon Lambda without any trouble and that example provided an Interaction Model - are you able to provide the JSON for this so I can get the adventure game tool working?

This Tool is Used for a Finalist Submission for Training Mag Network's eLearning Design Challenge!

I used this tool to create Mindful Classroom Conversations.

I submitted the skill to the Training Mag Network's eLearning Design Challenge and it is now a finalist in the Simulation category. You can check out video submission here to see how I used the tool to support learning how to have a mindful conversation. We'll find out on September 26 if we win the Gold medal prize- Wish us luck!

Thank you to the developers of this tool and for this community. I couldn't have done it without you!

Credentials

ode_modules/aws-sdk/lib/request.js:30
throw err;
^

Error: Missing credentials in config
at Request.callListeners (/Users/roberttorres/interactive-adventure-game-tool/node_modules/gulp-awslambda/node_modules/aws-sdk/lib/sequential_executor.js:107:43)
at Request.emit (/Users/roberttorres/interactive-adventure-game-tool/node_modules/gulp-awslambda/node_modules/aws-sdk/lib/sequential_executor.js:77:10)
at Request.emit (/Users/roberttorres/interactive-adventure-game-tool/node_modules/gulp-awslambda/node_modules/aws-sdk/lib/request.js:596:14)
at Request.transition (/Users/roberttorres/interactive-adventure-game-tool/node_modules/gulp-awslambda/node_modules/aws-sdk/lib/request.js:21:10)
at AcceptorStateMachine.runTo (/Users/roberttorres/interactive-adventure-game-tool/node_modules/gulp-awslambda/node_modules/aws-sdk/lib/state_machine.js:14:12)
at /Users/roberttorres/interactive-adventure-game-tool/node_modules/gulp-awslambda/node_modules/aws-sdk/lib/state_machine.js:26:10
at Request. (/Users/roberttorres/interactive-adventure-game-tool/node_modules/gulp-awslambda/node_modules/aws-sdk/lib/request.js:37:9)
at Request. (/Users/roberttorres/interactive-adventure-game-tool/node_modules/gulp-awslambda/node_modules/aws-sdk/lib/request.js:598:12)
at Request.callListeners (/Users/roberttorres/interactive-adventure-game-tool/node_modules/gulp-awslambda/node_modules/aws-sdk/lib/sequential_executor.js:115:18)
at Request.emit (/Users/roberttorres/interactive-adventure-game-tool/node_modules/gulp-awslambda/node_modules/aws-sdk/lib/sequential_executor.js:77:10)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: node node_modules/gulp/bin/gulp.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/roberttorres/.npm/_logs/2017-08-06T06_20_16_619Z-debug.log

Anyone figure out how to fix this?

Alexa will not register correct commands and says "My apologies, please repeat your command"

I am facing the same issue as seen in issue #35 and issue #33. However, my utterances are all lowercase. Basically, after going down a few branches, Alexa will not register your commands that go down onto more nodes, and she will only say "My apologies, please repeat your command."

Expected behavior

After saying "run" or "hold", my skill will continue down the path.

Actual behavior

I say "run" or "hold", but Alexa only says "My apologies, please repeat your command."
Here is a zip file of everything in my /src/skill/ directory.
skill.zip

Screenshots

The node where Alexa stops registering commands
failure

The utterance for the next node
run

Unable to install

nam start gives this error....

5 verbose stack Error: missing script: start

Can't Save or Upload

I can't seem to save or upload my work. The tool launches fine in the browser but when I make changes and click the save and upload button, nothing happens. No error messages or anything...Surely there's an easy fix or step that I'm missing.

Blank window in browser

Hello guys,
after a lot of problems I finally got the tool opening a browser window (tried in Edge, Chrome and Opera) on Win10 but it seems to be only the basic scheme/design of it, without any buttons or something in it. I'm not that deeply into programming, so I have no idea what caused this and would appreciate any help I can get - Thanks in advance! (PS: just in case: I've tried to turn off AdBlock, didn't do anything)
unbenannt

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.