Skip to content
Vizdun edited this page May 13, 2021 · 2 revisions

Adding Results

in scripts/json/results.js

"potatolover" /* reference id */ : {
    "result_en" /* property id and language code */ : "You're a Potato lover" /* display text */,
    "desc_en" /* property id and language code */ : "Someone who loves potatoes." /* description */
}

Adding Buttons

in scripts/json/buttons.js

"potato" /* reference id */ : {
    "text_en" /* property id and language code */ : "I love potatoes!" /* button text */,
    "color": "#b79268" /* button color */
}

Adding Questions

in scripts/json/questions.js

"example_question" /* reference id */ : {
    "question_en" /* property id and language code */ : "Do you like potatoes?" /* display text */,
    "answers": [ /* possible answers (buttons) to show */
        "potato",
        "nopotato"
    ],
    "results": { /* for answers that result in results being shown */
        "potato" /* the answer for which this applies */ : "potatolover" /* the result to be shown */,
    },
    "nextquestion": { /* for answers that result in another question being showed */
        "nopotato" /* the answer for which this applies */ : "example_question2" /* the question to be shown */,
    }
}

Adding Languages

in scripts/json/loc.js

"en" /* reference id */ : {
    "property" /* property id */ : "PROPERTY BOTTOM TEXT" /* property text/value */
}
Clone this wiki locally