• Welcome to the Kancolle Wiki!
  • If you have any questions regarding site content, account registration, etc., please visit the KanColle Wiki Discord

Difference between revisions of "Template:MapBranchingTable/doc"

From Kancolle Wiki
Jump to navigation Jump to search
m
Line 1: Line 1:
==Parameter Naming==
+
==Parameters==
* <"From" Node> -> <"To" Node> = <argument value>  
+
Below is a list of all parameters available for this template.
 +
Keep in mind that invalid parameters and/or arguments will be ignored.
 +
 
 +
To invoke this template, simply start with:
 +
<pre>
 +
{{MapBranchingTable
 +
|<parameters>
 +
|<parameters>
 +
|<parameters>
 +
}}
 +
</pre>
 +
 
 +
===Title===
 +
* Allows you to set the title of the table
 +
* '''OPTIONAL'''
 +
* Default value is "Branching Rules" if not specified
 +
<pre>
 +
{{MapBranchingTable
 +
|title = <value>
 +
}}
 +
</pre>
 +
 
 +
===Id===
 +
* Allows you to manually set the id of the table. Rarely useful, unless you want multiple tables to be affected by the same button.
 +
* '''OPTIONAL'''
 +
* Default value is a RNG generated through the [[Module:RemiLib|RemiLib]] if not specified.
 +
<pre>
 +
{{MapBranchingTable
 +
|id = <value>
 +
}}
 +
</pre>
 +
 
 +
===Width===
 +
* Allows you to set the width of the table. Value has to be a valid css width property.
 +
* Check the following [http://www.w3schools.com/cssref/pr_dim_width.asp link] if you're unfamiliar with css width properties.
 +
* '''OPTIONAL'''
 +
* Default is "auto" if not specified or if the value given is invalid.
 +
<pre>
 +
{{MapBranchingTable
 +
|width = <value>
 +
}}
 +
</pre>
 +
 
 +
===Branching Rules===
 +
* Creates nodes for your branching table.
 +
* '''REQUIRED'''
 +
 
 +
<"From" Node/[color]> -> <"To" Node/[color]> = <argument value> for single rows for each node <br />
 +
'''OR''' <br />
 +
<"From" Node/[color]> -> <"To" Node/[color]>,<"To" Node/[color]> = <argument value> for joint rows.
 +
*Valid node values are:
 
** 0 = Start
 
** 0 = Start
** 1, 2, 3, etc = Starting points, when a map has multiple starting points, depending on the branching rules.
+
** 1, 2, 3, etc = Starting points, when a map has multiple starting points.
** <Node>/battle = Red node, which is also the default if nothing is assigned
+
** Alphabetical letters from A to Z
** <Node>/empty = Blue node
+
 
** <Node>/storm = Purple node
+
*To add a color to a node ('''OPTIONAL'''), add the following value behind the node:
** <Node>/resource = Green node
+
** <span style="color:#FF1744">/battle</span>, default if not specified
 +
** <span style="color:#64DD17">/empty</span>
 +
** <span style="color:#EA80FC">/storm</span>
 +
** <span style="color:#40C4FF">/resource</span>
 +
** Any other valid color value.
  
To assign a manual id for the tables, you can use "id = <value>". This is generally not necessary, unless you want some buttons to show/hide multiple branches for whatever reason you have. Either way, the option is there.
+
<pre>
 +
{{MapBranchingTable
 +
|title = Example
 +
|width = 50%
 +
|0 -> 1 =
 +
* Fleet contains a CL
 +
* Fleet does not meet the requirements to start at 2
 +
|0 -> 2 =
 +
* Fleet contains no CL
 +
* Fleet contains CV(L)
 +
* Fleet contains CLT
  
To change the width of the table, you can use "width = auto" for a more compact table. If "width" is not stated, it will create a wide table that fits the screen on default. Table is always collapsed by default.
+
|1 -> A/storm, B/resource = * Random
 +
|2 -> C = * Fleet contains a CL
 +
|2 -> D/empty = * Does not meet the requirements to go to C
 +
}}
 +
</pre>
 +
{{MapBranchingTable
 +
|title = Example
 +
|width = 30%
 +
|0 -> 1 =
 +
* Fleet contains a CL
 +
* Fleet does not meet the requirements to start at 2
 +
|0 -> 2 =
 +
* Fleet contains no CL
 +
* Fleet contains CV(L)
 +
* Fleet contains CLT
  
With the use of a template, invoking the module through #invoke is no longer required and you can treat this module as a template.
+
|1 -> A/storm, B/resource = * Random
Each parameter line still requires a pipe character "|".
+
|2 -> C = * Fleet contains a CL
 +
|2 -> D/empty = * Does not meet the requirements to go to C
 +
}}
  
 
==Examples==
 
==Examples==
Line 19: Line 99:
 
<pre>
 
<pre>
 
{{MapBranchingTable
 
{{MapBranchingTable
|0 -> 1 = Some text...
+
|title = Example 1
|0 -> 2 = Some text...
+
|0 -> 1, 2 = Some text...
 
|1 -> A = Some text...
 
|1 -> A = Some text...
 
|1 -> B/resource = [[DD]], [[CL]]
 
|1 -> B/resource = [[DD]], [[CL]]
Line 30: Line 110:
 
</pre>
 
</pre>
 
{{MapBranchingTable
 
{{MapBranchingTable
|0 -> 1 = Some text...
+
|title = Example 1
|0 -> 2 = Some text...
+
|0 -> 1, 2 = Some text...
 
|1 -> A = Some text...
 
|1 -> A = Some text...
 
|1 -> B/resource = [[DD]], [[CL]]
 
|1 -> B/resource = [[DD]], [[CL]]
Line 71: Line 151:
 
|id = E-1
 
|id = E-1
 
|width = auto
 
|width = auto
|0 -> 1 = Some text...
+
|0 -> 1, 2, 3 = * Random
|0 -> 2 = Some text...
+
}}
|1 -> A = Some text...
+
 
|1 -> B/resource = [[DD]], [[CL]]
 
|1 -> C/storm =
 
* A
 
* list
 
|C/storm -> D/empty = ...
 
 
}}
 
}}
 
</pre>
 
</pre>
Line 84: Line 159:
 
|id = E-1
 
|id = E-1
 
|width = auto
 
|width = auto
|0 -> 1 = Some text...
+
|0 -> 1, 2, 3 = * Random
|0 -> 2 = Some text...
 
|1 -> A = Some text...
 
|1 -> B/resource = [[DD]], [[CL]]
 
|1 -> C/storm =
 
* A
 
* list
 
|C/storm -> D/empty = ...
 
 
}}
 
}}
 +
 
==Credits==
 
==Credits==
 
Special thanks to がか(gaka) for writing this module.
 
Special thanks to がか(gaka) for writing this module.

Revision as of 22:15, 4 February 2017

Parameters

Below is a list of all parameters available for this template. Keep in mind that invalid parameters and/or arguments will be ignored.

To invoke this template, simply start with:

{{MapBranchingTable
|<parameters>
|<parameters>
|<parameters>
}}

Title

  • Allows you to set the title of the table
  • OPTIONAL
  • Default value is "Branching Rules" if not specified
{{MapBranchingTable
|title = <value>
}}

Id

  • Allows you to manually set the id of the table. Rarely useful, unless you want multiple tables to be affected by the same button.
  • OPTIONAL
  • Default value is a RNG generated through the RemiLib if not specified.
{{MapBranchingTable
|id = <value>
}}

Width

  • Allows you to set the width of the table. Value has to be a valid css width property.
  • Check the following link if you're unfamiliar with css width properties.
  • OPTIONAL
  • Default is "auto" if not specified or if the value given is invalid.
{{MapBranchingTable
|width = <value>
}}

Branching Rules

  • Creates nodes for your branching table.
  • REQUIRED

<"From" Node/[color]> -> <"To" Node/[color]> = <argument value> for single rows for each node
OR
<"From" Node/[color]> -> <"To" Node/[color]>,<"To" Node/[color]> = <argument value> for joint rows.

  • Valid node values are:
    • 0 = Start
    • 1, 2, 3, etc = Starting points, when a map has multiple starting points.
    • Alphabetical letters from A to Z
  • To add a color to a node (OPTIONAL), add the following value behind the node:
    • /battle, default if not specified
    • /empty
    • /storm
    • /resource
    • Any other valid color value.
{{MapBranchingTable
|title = Example
|width = 50%
|0 -> 1 =
* Fleet contains a CL
* Fleet does not meet the requirements to start at 2
|0 -> 2 = 
* Fleet contains no CL
* Fleet contains CV(L)
* Fleet contains CLT

|1 -> A/storm, B/resource = * Random
|2 -> C = * Fleet contains a CL
|2 -> D/empty = * Does not meet the requirements to go to C
}}
Example
Nodes Rules
Start
1
  • Fleet contains a CL
  • Fleet does not meet the requirements to start at 2
2
  • Fleet contains no CL
  • Fleet contains CV(L)
  • Fleet contains CLT
1
A
  • Random
B
2
C
  • Fleet contains a CL
D
  • Does not meet the requirements to go to C


Examples

Example 1

{{MapBranchingTable
|title = Example 1
|0 -> 1, 2 = Some text...
|1 -> A = Some text...
|1 -> B/resource = [[DD]], [[CL]]
|1 -> C/storm =
* A
* list
|C/storm -> D/empty = ...
}}
Example 1
Nodes Rules
Start
1

Some text...

2
1
A

Some text...

B

DD, CL

C
  • A
  • list
C
D

...


Example 2

{{MapBranchingTable
|width = auto
|0 -> 1 = Some text...
|0 -> 2 = Some text...
|1 -> A = Some text...
|1 -> B/resource = [[DD]], [[CL]]
|1 -> C/storm =
* A
* list
|C/storm -> D/empty = ...
}}
Branching Rules
Nodes Rules
Start
1

Some text...

2

Some text...

1
A

Some text...

B

DD, CL

C
  • A
  • list
C
D

...


Example 3

{{MapBranchingTable
|id = E-1
|width = auto
|0 -> 1, 2, 3 = * Random
}}

}}
Branching Rules
Nodes Rules
Start
1
  • Random
2
3


Credits

Special thanks to がか(gaka) for writing this module.