You are viewing the MafiaScum.net Wiki. To play the game, visit the forum.
Template:RoleParser: Difference between revisions
(ActiveCount needs to know whether this is a Nightless) |
(I thought of a more efficient way to write this, so redoing it) |
||
Line 1: | Line 1: | ||
{{{{{Test|Rp/ | {{{{{Test|Rp/Stage2}}} | ||
|{{{1}}} | |||
|{{Rp/cot|{{{1}}}|i}} | |||
|{{Rp/cot|{{{1}}}|g}} | |||
|{{{{{#titleparts:{{{1}}}|1|1}}Wincon|{{#titleparts:{{{1}}}|1|1}}}}} | |||
|{{Rp/ActiveCount|{{{1}}}|{{{2|}}}}} | |||
|{{{2|}}} | |||
|{{RoleNameFormat|{{{1}}}}} | |||
|{{Rp/gei|{{{1}}}}} | |||
}}<noinclude>{{RoleParser/doc}}</noinclude> |
Revision as of 22:17, 30 May 2018
{{Rp/gpm/{{rcl/{{{1}}}}}|{{{1}}}|{{{1}}}|{{{1}}}}}
You have the following active abilities, but may use only one per Night:
-
{{Rp/gpm2/{{rcl/{{{1}}}}}|{{{1}}}|{{{1}}}|
|
}}
|
The {{RoleParser}} template is the main entry point for producing formatted Role PMs from role strings.
The first argument is the role string to format. The second argument is the special rules in use in the setup; this can be empty, if none apply. (The purpose of this argument is to make necessary modifications to the role PM, e.g. removing the factional kill from the Mafia in a Nightless setup.) Possible values if nonempty:
- Compulsive
- Factional kills are compulsive.
- Daytalk
- Anti-town factions have daytalk in their factional communication threads.
- Daytalk/Compulsive
- A combination of the previous two special rules.
- Nightless
- Factional kills do not exist.
- Solo
- Anti-town factions do not have factional communication or knowledge of their team-mates (likely due to having only a single member).
- Solo/Nightless
- A combination of the previous two special rules.
There are also a few optional arguments. An argument with a name like TownWincon
, MafiaWincon
, etc., will override the win condition given in the role PM if the faction in the argument matches the faction of a role. This lets you specify the wincons for the various factions without having to parse the role string to see which faction matches. Finally, the Test
argument is optional and rarely used, but will cause this template to dump out some of its internal state, making it possible to test it independently from the sub-templates it calls into.
Examples
Town
You have the following active abilities, but may use only one per Night:
Mafia
- Your team-mates are names. You may talk to them here during night phases and confirmations only.
You have the following active abilities, but may use only one per Night:
- Each Night, if no other member of your faction is performing this action, you may target a player. Assuming no interference with your action, that player will die.
Town/Cop
You have the following active abilities, but may use only one per Night:
Town/Bulletproof
You are protected from Template:RoleFragment/ps/Town.
You have the following active abilities, but may use only one per Night:
Mafia/Loyal/Jailkeeper
- Your team-mates are names. You may talk to them here during night phases and confirmations only.
Template:Rp/gpm/m
You have the following active abilities, but may use only one per Night:
- Each Night, if no other member of your faction is performing this action, you may target a player. Assuming no interference with your action, that player will die. Template:Rp/gpm2/m
Mafia/Bulletproof/Jailkeeper
- Your team-mates are names. You may talk to them here during night phases and confirmations only.
You are protected from Template:RoleFragment/ps/Mafia.
You have the following active abilities, but may use only one per Night:
- Each Night, if no other member of your faction is performing this action, you may target a player. Assuming no interference with your action, that player will die.
Mafia/Multitasking/Jailkeeper
- Your team-mates are names. You may talk to them here during night phases and confirmations only.
You have the following active abilities, and may use multiple different abilities in the same night if you wish:
- Each Night, if no other member of your faction is performing this action, you may target a player. Assuming no interference with your action, that player will die.
Mafia/Ninja
- Your team-mates are names. You may talk to them here during night phases and confirmations only.
You have the following active abilities, but may use only one per Night:
- Each Night, if no other member of your faction is performing this action, you may target a player. Assuming no interference with your action, that player will die.
Town/Cop/Doctor
You have the following active abilities, but may use only one per Night:
- Each Night, you may target a player. Assuming no interference with your action, you will learn whether that player wins with Town. (You will get "no result" if this action is blocked.)
Town/Bulletproof/Enabler
When you Template:RoleFragment/ps/Bulletproof, the role "Bulletproof" will cease to function for all players.
You have the following active abilities, but may use only one per Night:
Town/Odd Night/Doctor/Enabler
When you Template:RoleFragment/ps/Doctor, the role "Doctor" will cease to function for all players.
You have the following active abilities, but may use only one per Night:
Town/Bulletproof/Activated
You have the following active abilities, but may use only one per Night:
Town/Ascetic/Bulletproof
You are protected from Template:RoleFragment/ps/Town/Ascetic.
You have the following active abilities, but may use only one per Night:
Town/Ascetic/Bulletproof/Enabler
When you Template:RoleFragment/ps/Bulletproof, the role "Bulletproof" will cease to function for all players.
You have the following active abilities, but may use only one per Night:
Town/Cop/Odd Night/Doctor
You have the following active abilities, but may use only one per Night:
- Each Night, you may target a player. Assuming no interference with your action, you will learn whether that player wins with Town. (You will get "no result" if this action is blocked.)
Town/Even Night/Cop/Odd Night/Doctor
- Template:Rp/gpm/s
You have the following active abilities, but may use only one per Night:
Mafia/Ascetic/Multitasking/Even Night/Cop/Odd Night/Doctor
- Your team-mates are names. You may talk to them here during night phases and confirmations only.
You have the following active abilities, and may use multiple different abilities in the same night if you wish:
- Each Night, if no other member of your faction is performing this action, you may target a player. Assuming no interference with your action, that player will die.
Town/Loud/Multitasking/Jack of All Trades/Cop/Weak/Doctor/Innocent Child/Activated
- Whenever you perform a targeted action, your target will learn that you targeted them (but not what action you targeted them with).
You have the following active abilities, and may use multiple different abilities in the same night if you wish:
Serial Killer/Even Night/Ascetic/2-shot/Loud/Ninja/Weak/Rolecop/Odd Night/Doctor
Template:RoleFragment/ps/Serial Killer/Even Night.
You have the following active abilities, but may use only one per Night:
- Each Night, you may target a player. Assuming no interference with your action, that player will die.
Test of this template in isolation
This test replaces the call to {{Rp/Stage2}}, the template that does most of the actual work, with a list of its arguments instead.
These arguments are:
- The role string.
- The interaction modifier, if any (this could be blank).
- The general restriction, if any (this could be blank).
- The number of active abilities the role has (including a factional kill, if any).
- The list of indexes of ends of component groups (as output by {{Rp/gei}}).
- The list of special rules to use in the setup.
Town
- 1=Town; 4=Town; 5=0; 7=Vanilla Townie; 8=1/
Mafia
- 1=Mafia; 4=Mafia; 5=1; 7=Mafia Goon; 8=1/
Town/Cop
- 1=Town/Cop; 4=Town; 5=1; 7=Town Cop; 8=1/2/
Town/Bulletproof
- 1=Town/Bulletproof; 4=Town; 5=0; 7=Bulletproof Townie; 8=1/2/
Mafia/Loyal/Jailkeeper
- 1=Mafia/Loyal/Jailkeeper; 4=Mafia; 5=2; 7=Mafia Loyal Jailkeeper; 8=1/3/
Mafia/Bulletproof/Jailkeeper
- 1=Mafia/Bulletproof/Jailkeeper; 4=Mafia; 5=2; 7=Bulletproof Mafia Jailkeeper; 8=1/2/3/
Mafia/Multitasking/Jailkeeper
- 1=Mafia/Multitasking/Jailkeeper; 2=Multitasking; 4=Mafia; 5=2; 7=Mafia Multitasking Jailkeeper; 8=1/2/3/
Mafia/Ninja
- 1=Mafia/Ninja; 4=Mafia; 5=1; 7=Mafioso; 8=1/
Town/Cop/Doctor
- 1=Town/Cop/Doctor; 4=Town; 5=2; 7=Town Cop Doctor; 8=1/2/3/
Town/Bulletproof/Enabler
- 1=Town/Bulletproof/Enabler; 4=Town; 5=0; 7=Town Bulletproof Enabler; 8=1/3/
Town/Odd Night/Doctor/Enabler
- 1=Town/Odd Night/Doctor/Enabler; 4=Town; 5=0; 7=Town Odd Night Doctor Enabler; 8=1/4/
Town/Bulletproof/Activated
- 1=Town/Bulletproof/Activated; 4=Town; 5=1; 7=Town Activated Bulletproof; 8=1/3/
Town/Ascetic/Bulletproof
- 1=Town/Ascetic/Bulletproof; 4=Town; 5=0; 7=Ascetic Bulletproof Townie; 8=1/2/3/
Town/Ascetic/Bulletproof/Enabler
- 1=Town/Ascetic/Bulletproof/Enabler; 4=Town; 5=0; 7=Ascetic Town Bulletproof Enabler; 8=1/2/4/
Town/Cop/Odd Night/Doctor
- 1=Town/Cop/Odd Night/Doctor; 4=Town; 5=2; 7=Town Cop Odd Night Doctor; 8=1/2/4/
Town/Even Night/Cop/Odd Night/Doctor
- 1=Town/Even Night/Cop/Odd Night/Doctor; 4=Town; 5=2; 7=Town Even Night Cop Odd Night Doctor; 8=1/3/5/
Mafia/Ascetic/Multitasking/Even Night/Cop/Odd Night/Doctor
- 1=Mafia/Ascetic/Multitasking/Even Night/Cop/Odd Night/Doctor; 2=Multitasking; 4=Mafia; 5=3; 7=Ascetic Mafia Multitasking Even Night Cop Odd Night Doctor; 8=1/2/3/5/7/
Town/Loud/Multitasking/Jack of All Trades/Cop/Weak/Doctor/Innocent Child/Activated
- 1=Town/Loud/Multitasking/Jack of All Trades/Cop/Weak/Doctor/Innocent Child/Activated; 2=Multitasking; 3=Jack of All Trades; 4=Town; 5=3; 7=Town Loud Multitasking Jack of All Trades Cop Weak Doctor Activated Innocent Child; 8=1/3/4/5/7/9/
Serial Killer/Even Night/Ascetic/2-shot/Loud/Ninja/Weak/Rolecop/Odd Night/Doctor
- 1=Serial Killer/Even Night/Ascetic/2-shot/Loud/Ninja/Weak/Rolecop/Odd Night/Doctor; 4=Serial Killer; 5=3; 7=Even Night Ascetic Serial Killer 2-shot Loud Ninja Weak Rolecop Odd Night Doctor; 8=1/3/8/10/