Skip to content
Jonathan Chan edited this page May 2, 2024 · 6 revisions

Aztec.twee is worked on by Elizabeth and Ashley

Data

$users

The individual data of each player is stored in the $users object, with their role as the key

  • lastSeen: The last time the user was online
  • stats: The strength, wisdom and intelligence of the user, used for game checks
  • passage: The name of the Twine passage the player is on
  • userId: The user's discord Id, used to link to their profile
  • character: The official name of the role the user is playing as, includes special characters.
  • isLeader: True or false to determine if user was voted as leader
  • choices: An object containing the choices a user has made throughout the game
  • username: An user's discord username
  • faction: The faction the user belongs to (aztecs, tlaxs, spaniards)

Passage Overview

storyinit

Runs one time when the browser page is first opened. Gets various data from the user's discord profile.

  • userId: used to get a link to every player's discord profile
  • nickname: used to set the current player's role

Initializes all of the user and faction data to default values

If the user's role is one of the available ones, they will be assigned the game data of whatever was stored last for that role and be teleported to their last played passage.

If the user's role is not in the list of available roles, they will instead be brought to the special passage :: not seen where they will be warned their role is incorrect.

PassageHeader

Another inbuilt twine passage that runs all of its code whenever a new passage is started.

Control/Home page

Designated by having the Control or Home Tags

Create a chat box and player list to communicate with other players.

Home

The users will have a button they can press to enter this home passage. Contains reminders of the previous passages user's have played through

Stats

Contains more detailed info on a user's and their faction's stats

God

Contains links to control pages, assessible only to those who are considered admins

Main game pages

Show a map and the stats of both the user and their faction.

PassageDone

Yet another special Twine page that runs after any passage has been loaded updates the last time a user was online and adds the current page to the user's passage history that lets them review it later in the home page.

Passage History

Passage history is used to remind players of the previous passages they've read through its stored on a seperate stony brook domain usand the data is sent and recieved using ajax.

Macros

Discord contains macros that act as functions

Discord _name

Sends a message to discord channel _name

Clone this wiki locally