You are viewing the MafiaScum.net Wiki. To play the game, visit the forum.

Template:SetupHistory

From MafiaWiki
Revision as of 16:48, 7 January 2016 by Wgeurts (talk | contribs)
Jump to navigation Jump to search
Name:
  • Setup History
Type:
Sub-Template:
  • No
Designer:

This template is used to semi-automise adding played games to the history sections of setup pages.


What it does

As briefly explained in the introduction this template is used to automate adding history information to setup pages. Instead of having to search through each setup page manually to update the history sections this allows you to put all the data here and let it do the sorting. This will only work if the template is set up to work with that setup page as explained after this.


How to use it

This template consists of three sub-templates:

Each of these templates has it's own purpose however the only one needed is the Database one. You need to place

{{SetupHistory/Database}}

in the history section of your setup page first. After that any history information in the database page that uses that setup will automatically be added. If you want to add a custom name instead of "History of ..." then do the following:

{{SetupHistory/Database|Table_Name="Custom Name"}}


How to add history data

Go to Template:SetupHistory/Database, you should see a list of categories, go to the one for your game type. Open the edit section of the page you are directed to and then do the following:

  • Add
    {{SetupHistory/Parser| Name=| Thread_ID=| GameType_&_ID=| Result=| Setup=| Version_Check={{{Version|}}}| Version=}}
  • Fill in the following data after the "="s.
    • Name: The name of the game. This often something like "Fish Mafia" or whatever the mod names the game.
    • Thread_ID: This is the number you see at the end of the url of the first page of a thread. Copy and paste that here.
    • GameType_&_ID: Say wether the game is an "Open" game, "Mini Normal" or whatever here. If the game has a unique ID (Example "Open 575") then add that as well.
    • Result: Say how the game ended here. An example is "Mafia Win".
    • Setup: Add the name of the setup page of the setup used here. This is case sensitive, beware.
    • Version: If a setup underwent a change (like adding another player) you can create a seperate table for the changed version by filling in a number here. Then you have to add the following behind the Template on the setup page itself.
|Version="Number"

Which results in:

{{SetupHistory/Database|Version="Number"}}

How to add setup stats

First create a page named the same as the setup page of the setup your adding stats to with "/Stats" added at the end. Then add

{{SetupHistory/Database|Stats}}

and view the page. If the history of the setup is in the database you should get something like this:

{{SetupHistory/Stats
|M
|T
|O
|T
|T
}}

Copy all of this and go back to the edit page. Then paste what you copied into the textbox and save. You should now have the statistics of the setup. All you need to do now is add the following to the setups page (not the /Stats page) in the area you want the stats:

{{:(The name of the setup page)/Stats}}

This process will have to be repeated to update the stats due to the limitations of MediaWiki. If you want an example see Pie E7.