Mafia Theme Message Guide

Discussion in 'Theme Development' started by Fuzzysqurl, Jan 12, 2014.

Thread Status:
Not open for further replies.
  1. Fuzzysqurl

    Fuzzysqurl baa baa mareep I do what I want Server Owner Developer I do what I want Server Owner Developer

    Joined:
    Sep 12, 2012
    Messages:
    2,096
    Likes Received:
    967
    As you may or may not know, I've been recently updating and reworking how game messages are handled in Mafia. A lot of internal functions were reworked in order to help deliver a more polished output. As a result, a lot of messages and actions gained additional functionality.

    Globally, there is a much needed silence feature. What it does is, if the string it is about to print is completely empty, it does absolutely nothing with it. No line break, no empty line with ±Game, nothing. The following code snippet shows you the basic formatting. Replace msg with whatever message you're silencing (ex: targetmsg, usermsg)
    Code (text):
    1. "msg": "",
    All messages related to the game require some sort of distinction from text in game. As a result, all messages are pushed through various checks to make sure it is formatted correctly. If you define your own bot, it will be used. If you use a player's name (via ~Target~ or other related keywords), use "***" for pink text, or end the entire message with a ":", then nothing will be added to your message. If you don't have any of these, the default will be used for that particular message.

    Now to break down different messages. I will be listing what the default value is for the message, and then you can figure out where it goes. If there is no message listed or there's a good use for it, I will provide an example in square brackets.


    "failmsg": "You couldn't ~Action~ this night!"
    "chargesmsg": "You have ~Charges~ charges remaining"


    Defensive Mode Messages
    All messages can use the following:
    '~Distracter~': The role of the player targeting
    '~User~': The role of the player targeting
    '~Self~': The role the mode is on
    '~Target~': The name of the player targeting
    '~Role~': The role of the player targeting
    '~Action~': The name of the action being used

    Ignore:
    "distractmsg": "The ~Distracter~ came to you last night, but you ignored her!"
    "msg": "Your target (~Self~) evaded your ~Action~!"

    ChangeTarget:
    "targetmsg" (or "hookermsg"): ["The ~Distracter~ came to you last night, but you ate her!"]

    Killattacker:
    "msg": "You were killed during the night!"

    Poisonattacker:
    "msg": "Your target poisoned you!"

    Identify:
    "msg": "You identified ~Target~ as the ~Role~ that tried to ~Action~ you!"

    Die:
    "msg": "~Target~ tried to ~Action~ you, but you got scared and died!"
    "targetmsg": "You tried to ~Action~ ~Self~, but they got scared and died!"

    EvadeCharges: [All messages can use ~EvadeCharges~ to return how many charges are left]
    "evadechargemsg": "You evaded a ~Action~ (you still can evade ~EvadeCharges~ more times)!"
    "tarmsg": "Your target (~Self~) evaded your ~Action~!"

    EvadeChance:
    "msg": "Your target (~Self~) evaded your ~Action~!"

    Killif:
    "targetmsg": ["Someone tried to ~Action~ you, but your electrical force field fried them."]
    "msg": ["You tried to ~Action~ your target, but got killed by an electrical shock before getting close!"]


    Night Action Messages
    '~Self~': Player using the action
    '~Target~': Target of the action
    '~Role~': Acting player's role
    '~Distracter~': Acting player's role
    '~TargetRole~': Target's role
    '~Side~': Side of acting player
    '~TargetSide~': Side of target player
    '~Action~': Action being used
    '~Old~': Target's old role (if Copy, then it's Player's old role)
    '~New~': Target's new role (if Copy, then it's Player's new role)

    Distract:
    "distractmsg": "The ~Distracter~ came to you last night! You were too busy being distracted!"
    "teammsg": "Your teammate was too busy with the ~Distracter~ during the night, you decided not to ~Action~ anyone during the night!"

    Kill:
    "msg": "You were killed during the night!"
    ***Order of use by the script: "msg", then theme's "killusermsg", then the default message

    Poison:
    "poisonmsg": "Your target (~Target~) was poisoned!" ["Your target (~Target~) was burned!"]
    "poisontarmsg": "A ball of flames lit you on fire!"
    "poisonDeadMessage": "You died because of poison!"

    Stalk:
    "stalkmsg": "Your target (~Target~) visited ~Visit~ this night!"
    "novisitmsg": "Your target (~Target~) didn't visit anyone this night!"

    Convert:
    "convertfailmsg": "Your target (~Target~) couldn't be converted!"
    "convertmsg": "A ~Old~ has been converted into a ~New~!"
    "usermsg": "Your target (~Target~) has been converted and is now a ~New~!"
    "tarmsg": "You have been converted and changed roles!"

    Copy:
    "copyfailmsg": "Your target (~Target~) can't be copied!"
    "copymsg": "A ~Old~ has been converted into a ~New~!"
    "usermsg": "You copied someone and changed roles!"

    Curse:
    "cursefailmsg": "Your target (~Target~) couldn't be cursed!"
    "cursemsg": "Your target (~Target~) was cursed!"
    "curseConvertMessage": "~Target~ has been converted into a ~New~!"

    Detox:
    "detoxmsg": "A player was cured of poison!";
    "msg": "Your target (~Target~) was cured of poison!"
    "targetmsg": "You were cured of poison!"
    "detoxfailmsg": "Your target (~Target~) isn't poisoned!"

    Dispel:
    "dispelmsg": "A player's curse was dispelled!"
    "msg": "Your target (~Target~) was freed from their curse!"
    "targetmsg": "You were freed from your curse!"
    "dispelfailmsg": "Your target (~Target~) isn't cursed!"

    Shield:
    "shieldmsg": "Your ~Action~ was shielded by ~Self~!"

    Dummy: (Replace the $ with whatever dummy number you're using)
    "dummy$usermsg": ["You dummied ~Target~"]
    "dummy$targetmsg": ["Someone dummied you!"]
    "dummy$broadcastmsg" ["Hey everyone! Someone used a dummy command!"]

    Massconvert:
    massconvertmsg: "The ~Old~ became a ~New~!"
    "singlemassconvertmsg": ["~Self~ converted all ~Target~ into ~New~"] (Only Self, Target, and New are supported here)

    SuicideChance:
    "suicidemsg": "You died while trying to ~Action~ during this night!"


    Standby Messages
    Pending completion.
     
    Last edited: Jan 12, 2014
    Fate Testarossa and Yttrium like this.
Thread Status:
Not open for further replies.