card property inside package.json

126 views
Skip to first unread message

Drew Cranford

unread,
Mar 23, 2023, 3:32:26 PM3/23/23
to nodeGame
Hi Stefano,
I was trying to change the name of my experiment in the home page of nodeGame. I tried adding a "card" property to my package.json. However, it seems the game is now looking for the game under a folder named in the card property.
For example, here is my package.json contents:

{
    "name": "Personalized_Phishing_Training_random_v1",
    "version": "0.0.1",
    "description": "A multi-player phishing training simulator game",
    "author": "Edward Cranford <cran...@cmu.edu>",
    "license": "MIT/X11",
    "homepage": "http://nodegame.org",
    "dependencies": {
        "csv-stringify": "^6.3.0"
    },
    "card": {
        "name": "Phishing\nTraining\nSimulator"
    }
}

The game is in ./games_available/Personalized_Phishing_Training_random_v1

The name of the game is what I want on the home page of nodeGame, "Phishing Training Simulator". But when I click on the game to start it, I get the error:
Cannot GET /PhishingTrainingSimulator
How do I change the name of the game on the home page, without having to change my directory name?
Thanks,
Drew

shakty

unread,
Mar 23, 2023, 6:57:20 PM3/23/23
to nodeGame
Hi Drew,

That's strange the card name isn't supposed to affect other settings. I was expecting your changes to work. Which version of nodeGame are you using? Are there any errors on the console?

Best,
Stefano

shakty

unread,
Mar 24, 2023, 7:34:47 AM3/24/23
to nodeGame
Hi Drew,

Actually you are right, that's a bug. I am going to patch it asap. 

Thanks for reporting it.

Stefano

shakty

unread,
Mar 24, 2023, 7:47:42 AM3/24/23
to nodeGame
Hi,

That was an easy fix, so I patched it with this commit:


If you are running the dev version you can simply pull nodegame-server. Otherwise, you could copy the changed files in your installation.

Cheers,
Stefano

Drew Cranford

unread,
Mar 24, 2023, 12:35:45 PM3/24/23
to nodeGame
Great! Thank you Stefano.
Can confirm that everything is now working as intended.
Best,
Drew
Reply all
Reply to author
Forward
0 new messages