Difference between revisions of "Template:MapBranchingTable/doc"
(Created page with "==Parameter Naming== * id = <value> * <"From" Node> -> <"To" Node> = <argument value> ** 0 = Start ** 1, 2, 3, etc = Starting points, when a map has multiple starting points,...") |
(Added missing premade colours/mixes) |
||
| (12 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
| − | == | + | ==Usage== |
| − | * id = <value> | + | Below is a list of all parameters available for this template. |
| − | * <"From" Node> -> <"To" Node> = <argument value> | + | 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> | ||
| + | |||
| + | ===Order=== | ||
| + | * Allows you to manually set the order of the starting nodes listed from top to bottom. | ||
| + | * '''Note''': Make sure you list all the relevant nodes! | ||
| + | * '''OPTIONAL''' | ||
| + | * Default is alphabetical ordering. This is not desirable if the first node happens to be G, while the second node is C for example. | ||
| + | <pre> | ||
| + | {{MapBranchingTable | ||
| + | |order = G, D, C, Z | ||
| + | |G -> A = *Text... | ||
| + | |D -> A = *Text... | ||
| + | |C -> A = *Text... | ||
| + | |Z -> A = *Text... | ||
| + | }} | ||
| + | </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 | + | ** 1, 2, 3, etc = Starting points, when a map has multiple starting points. |
| − | ** | + | ** A single alphabetical letter from A to Z |
| − | |||
| − | |||
| − | |||
| − | To | + | *To add a color to a node ('''OPTIONAL'''), add the following value behind the node: |
| + | ** <span style="color:#FF1744">/battle</span>, default if not specified | ||
| + | ** <span style="color:#64DD17">/resource</span> | ||
| + | ** <span style="color:#EA80FC">/storm</span> | ||
| + | ** <span style="color:#40C4FF">/empty</span> | ||
| + | ** <span style="color:#7E57C2">/night</span> | ||
| + | ** <span style="color:#7E57C2">/night</span><span style="color:#FF1744">day</span><span style="color:#7E57C2">_night</span><!--/nightday_night --> | ||
| + | ** <span style="color:#7E57C2">/night</span><span style="color:#FF1744">battle</span><span style="color:#40C4FF">_empty</span><!--/night_battle_empty--> | ||
| + | ** <span style="color:#FF1744">/am</span><span style="color:orange">bush</span><!--/ambush--> | ||
| + | ** Any other valid color value. | ||
| + | |||
| + | <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 | ||
| + | |0 -> 3 = | ||
| + | * Fleet contains AP | ||
| − | + | |1 -> A/storm, B/resource = * Random | |
| + | |2 -> C = * Fleet contains a CL | ||
| + | |2 -> D/empty = * Does not meet the requirements to go to C | ||
| + | |3 -> E/night = * Random | ||
| + | |3 -> F/nightday_night = * Random | ||
| + | |3 -> G/night_battle_empty = * Random | ||
| + | |3 -> H/ambush = * Random | ||
| + | }} | ||
| + | </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 | ||
| + | |0 -> 3 = | ||
| + | * Fleet contains AP | ||
| − | + | |1 -> A/storm, B/resource = * Random | |
| − | + | |2 -> C = * Fleet contains a CL | |
| + | |2 -> D/empty = * Does not meet the requirements to go to C | ||
| + | |3 -> E/night = * Random | ||
| + | |3 -> F/nightday_night = * Random | ||
| + | |3 -> G/night_battle_empty = * Random | ||
| + | |3 -> H/ambush = * Random | ||
| + | }} | ||
==Examples== | ==Examples== | ||
| Line 20: | Line 130: | ||
<pre> | <pre> | ||
{{MapBranchingTable | {{MapBranchingTable | ||
| − | | | + | |title = Example 1 |
| − | |0 -> 1 | + | |0 -> 1, 2 = Some text... |
| − | |||
|1 -> A = Some text... | |1 -> A = Some text... | ||
|1 -> B/resource = [[DD]], [[CL]] | |1 -> B/resource = [[DD]], [[CL]] | ||
| Line 32: | Line 141: | ||
</pre> | </pre> | ||
{{MapBranchingTable | {{MapBranchingTable | ||
| − | | | + | |title = Example 1 |
| − | |0 -> 1 | + | |0 -> 1, 2 = Some text... |
| − | |||
|1 -> A = Some text... | |1 -> A = Some text... | ||
|1 -> B/resource = [[DD]], [[CL]] | |1 -> B/resource = [[DD]], [[CL]] | ||
| Line 46: | Line 154: | ||
<pre> | <pre> | ||
{{MapBranchingTable | {{MapBranchingTable | ||
| − | |||
|width = auto | |width = auto | ||
|0 -> 1 = Some text... | |0 -> 1 = Some text... | ||
| Line 59: | Line 166: | ||
</pre> | </pre> | ||
{{MapBranchingTable | {{MapBranchingTable | ||
| − | |||
|width = auto | |width = auto | ||
|0 -> 1 = Some text... | |0 -> 1 = Some text... | ||
| Line 69: | Line 175: | ||
* list | * list | ||
|C/storm -> D/empty = ... | |C/storm -> D/empty = ... | ||
| + | }} | ||
| + | |||
| + | ===Example 3=== | ||
| + | <pre> | ||
| + | {{MapBranchingTable | ||
| + | |id = E-1 | ||
| + | |width = auto | ||
| + | |0 -> 1, 2, 3 = * Random | ||
| + | |Q -> = Invalid because there is no destination node | ||
| + | |QW -> SD = Invalid because there are more than 1 letters assigned per node | ||
| + | }} | ||
| + | |||
| + | }} | ||
| + | </pre> | ||
| + | {{MapBranchingTable | ||
| + | |id = E-1 | ||
| + | |width = auto | ||
| + | |0 -> 1, 2, 3 = * Random | ||
| + | |Q -> = Invalid because there is no destination node. Ignored. | ||
| + | |QW -> SD = Invalid because there are more than 1 letters assigned per node. Ignored | ||
| + | }} | ||
| + | |||
| + | ===Example 4=== | ||
| + | <pre> | ||
| + | {{MapBranchingTable | ||
| + | |order = D, Z, C, G | ||
| + | |G -> A = *Text... | ||
| + | |D -> A = *Text... | ||
| + | |C -> A = *Text... | ||
| + | |Z -> A = *Text... | ||
| + | }} | ||
| + | </pre> | ||
| + | {{MapBranchingTable | ||
| + | |order = D, Z, C, G | ||
| + | |G -> A = *Text... | ||
| + | |D -> A = *Text... | ||
| + | |C -> A = *Text... | ||
| + | |Z -> A = *Text... | ||
}} | }} | ||
==Credits== | ==Credits== | ||
Special thanks to がか(gaka) for writing this module. | Special thanks to がか(gaka) for writing this module. | ||
Latest revision as of 15:01, 1 March 2023
Usage
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>
}}
Order
- Allows you to manually set the order of the starting nodes listed from top to bottom.
- Note: Make sure you list all the relevant nodes!
- OPTIONAL
- Default is alphabetical ordering. This is not desirable if the first node happens to be G, while the second node is C for example.
{{MapBranchingTable
|order = G, D, C, Z
|G -> A = *Text...
|D -> A = *Text...
|C -> A = *Text...
|Z -> A = *Text...
}}
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.
- A single alphabetical letter from A to Z
- To add a color to a node (OPTIONAL), add the following value behind the node:
- /battle, default if not specified
- /resource
- /storm
- /empty
- /night
- /nightday_night
- /nightbattle_empty
- /ambush
- Any other valid color value.
{{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
|0 -> 3 =
* Fleet contains AP
|1 -> A/storm, B/resource = * Random
|2 -> C = * Fleet contains a CL
|2 -> D/empty = * Does not meet the requirements to go to C
|3 -> E/night = * Random
|3 -> F/nightday_night = * Random
|3 -> G/night_battle_empty = * Random
|3 -> H/ambush = * Random
}}
| Example | ||
|---|---|---|
| Nodes | Rules | |
| Start | 1 |
|
2 |
| |
3 |
| |
1 |
A |
|
B | ||
2 |
C |
|
D |
| |
3 |
E |
|
F |
| |
G |
| |
H |
| |
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 |
||
C |
| |
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 |
||
C |
| |
C |
D |
... |
Example 3
{{MapBranchingTable
|id = E-1
|width = auto
|0 -> 1, 2, 3 = * Random
|Q -> = Invalid because there is no destination node
|QW -> SD = Invalid because there are more than 1 letters assigned per node
}}
}}
| Branching Rules | ||
|---|---|---|
| Nodes | Rules | |
| Start | 1 |
|
2 | ||
3 | ||
QW |
SD |
Invalid because there are more than 1 letters assigned per node. Ignored |
Example 4
{{MapBranchingTable
|order = D, Z, C, G
|G -> A = *Text...
|D -> A = *Text...
|C -> A = *Text...
|Z -> A = *Text...
}}
| Branching Rules | ||
|---|---|---|
| Nodes | Rules | |
D |
A |
|
Z |
A |
|
C |
A |
|
G |
A |
|
Credits
Special thanks to がか(gaka) for writing this module.