You are viewing the MafiaScum.net Wiki. To play the game, visit the forum.
Template:RoleParser: Difference between revisions
(docs are noinclude, not includeonly) |
m (a few bugfixes) |
||
Line 1: | Line 1: | ||
{{{{{Test|Rp/Stage1}}}|{{{1}}}|{{Rp/LastRclIndex|{{{1}}}}}|{{Rp/LastRclIndex|{{{1 | {{{{{Test|Rp/Stage1}}}|{{{1}}}|{{Rp/LastRclIndex|{{{1}}}}}|{{Rp/LastRclIndex|{{{1}}}|g}}|{{{{{#titleparts:{{{1}}}|1|1}}Wincon|{{#titleparts:{{{1}}}|1|1}}}}}|{{{2|}}}}}<noinclude>{{RoleParser/doc}}</noinclude> |
Revision as of 20:35, 27 May 2018
|
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
Mafia
- Your team-mates are names. You may talk to them here during night phases and confirmations only.
- 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
Town/Bulletproof
Mafia/Loyal/Jailkeeper
- Your team-mates are names. You may talk to them here during night phases and confirmations only.
- 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/Bulletproof/Jailkeeper
- Your team-mates are names. You may talk to them here during night phases and confirmations only.
- 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.
- 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.
- 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
Town/Bulletproof/Enabler
Town/Odd Night/Doctor/Enabler
Town/Bulletproof/Activated
Town/Ascetic/Bulletproof
Town/Ascetic/Bulletproof/Enabler
Town/Cop/Odd Night/Doctor
Town/Even Night/Cop/Odd Night/Doctor
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.
- 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
Serial Killer/Even Night/Ascetic/2-shot/Loud/Ninja/Weak/Rolecop/Odd Night/Doctor
- 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; 2=1; 3=1; 4=Town
Mafia
- 1=Mafia; 2=1; 3=1; 4=Mafia
Town/Cop
- 1=Town/Cop; 2=1; 3=1; 4=Town
Town/Bulletproof
- 1=Town/Bulletproof; 2=2; 3=1; 4=Town
Mafia/Loyal/Jailkeeper
- 1=Mafia/Loyal/Jailkeeper; 2=1; 3=1; 4=Mafia
Mafia/Bulletproof/Jailkeeper
- 1=Mafia/Bulletproof/Jailkeeper; 2=2; 3=1; 4=Mafia
Mafia/Multitasking/Jailkeeper
- 1=Mafia/Multitasking/Jailkeeper; 2=1; 3=1; 4=Mafia
Mafia/Ninja
- 1=Mafia/Ninja; 2=1; 3=1; 4=Mafia
Town/Cop/Doctor
- 1=Town/Cop/Doctor; 2=1; 3=1; 4=Town
Town/Bulletproof/Enabler
- 1=Town/Bulletproof/Enabler; 2=3; 3=1; 4=Town
Town/Odd Night/Doctor/Enabler
- 1=Town/Odd Night/Doctor/Enabler; 2=4; 3=1; 4=Town
Town/Bulletproof/Activated
- 1=Town/Bulletproof/Activated; 2=1; 3=1; 4=Town
Town/Ascetic/Bulletproof
- 1=Town/Ascetic/Bulletproof; 2=3; 3=1; 4=Town
Town/Ascetic/Bulletproof/Enabler
- 1=Town/Ascetic/Bulletproof/Enabler; 2=4; 3=1; 4=Town
Town/Cop/Odd Night/Doctor
- 1=Town/Cop/Odd Night/Doctor; 2=1; 3=1; 4=Town
Town/Even Night/Cop/Odd Night/Doctor
- 1=Town/Even Night/Cop/Odd Night/Doctor; 2=1; 3=1; 4=Town
Mafia/Ascetic/Multitasking/Even Night/Cop/Odd Night/Doctor
- 1=Mafia/Ascetic/Multitasking/Even Night/Cop/Odd Night/Doctor; 2=2; 3=1; 4=Mafia
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=1; 3=4; 4=Town
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; 2=3; 3=1; 4=Serial Killer