-
Notifications
You must be signed in to change notification settings - Fork 1
Aztec
Aztec.twee is worked on by Elizabeth and Ashley
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)
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.
Another inbuilt twine passage that runs all of its code whenever a new passage is started.
Designated by having the Control or Home Tags
Create a chat box and player list to communicate with other players.
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
Contains more detailed info on a user's and their faction's stats
Contains links to control pages, assessible only to those who are considered admins
Show a map and the stats of both the user and their faction.
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 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.
Discord contains macros that act as functions
Sends a message to discord channel _name