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

Template:SetupHistory: Difference between revisions

From MafiaWiki
Jump to navigation Jump to search
No edit summary
 
(10 intermediate revisions by one other user not shown)
Line 1: Line 1:
{{Template
<includeonly>{{SetupHistory/Database}}</includeonly><noinclude>{{Template
|Name=Setup History
|Name=Setup History
|Type=Utility
|Type=Utility
Line 5: Line 5:
|Designer=wgeurts
|Designer=wgeurts
}}
}}
This page isn't actually a template, it's just a page to explain how another group of templates work together to semi-automise adding played games to the history sections of [[Setups|setup pages]].
This template is used to semi-automise adding played games to the history sections of [[Setups|setup pages]].




Line 21: Line 21:
*[[Template:SetupHistory/Database]]
*[[Template:SetupHistory/Database]]


Each of these templates has it's own purpose however the only one needed is the Database one. You need to place <pre>{{SetupHistory/Database}}</pre> 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.
Each of these templates has it's own purpose however the only one needed is the Database one. You need to place <pre>{{SetupHistory/Database}}</pre> 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:
<pre>{{SetupHistory/Database|Table_Name="Custom Name"}}</pre>




Line 28: Line 29:
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:
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 <pre>{{SetupHistory/Parser| Name=| Thread_ID=| GameType_&_ID=| Result=| Setup=}}</pre>
*Add <pre>{{SetupHistory/Parser| Name=| Thread_ID=| GameType_&_ID=| Result=| Setup=| Version_Check={{{Version|}}}| Version=}}</pre>
*Fill in the following data after the "="s.
*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.
**Name: The name of the game. This often something like "Fish Mafia" or whatever the mod names the game.
Line 35: Line 36:
**Result: Say how the game ended here. An example is "Mafia Win".
**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.
**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.
<pre>|Version="Number"</pre>
Which results in:
<pre>{{SetupHistory/Database|Version="Number"}}</pre>


==How to add setup stats==
==How to add setup stats==


*First create a page named the same the setup page of the setup your adding stats to with "/Stats" added at the end. Then add <pre>{{SetupHistory/Database|Stats}}</pre> and view the page. If the history of the setup is in the database you should get something like this:
First create a page named the same as the setup page of the setup you're adding stats to with "/Stats" added at the end. Then add <pre>{{SetupHistory/Database|Stats}}</pre> and view the page. If the history of the setup is in the database you should get something like this:
<pre>{{SetupHistory/Stats
<pre>{{SetupHistory/Stats
|M
|M
Line 49: Line 53:
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:
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:
<pre>{{:(The name of the setup page)/Stats}}</pre>
<pre>{{:(The name of the setup page)/Stats}}</pre>
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]].
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]].</noinclude>

Latest revision as of 01:41, 9 July 2020

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 you're 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.