Setting up a new ability/spell/etc page

From Battle College
Jump to: navigation, search
Help & Contribute (Edit)
Before You Start Editor's Creed - Wikicode for Beginners - How to use Templates
Existing Entries Advice on what sort of content should go under each heading - Style Guide
Setting up new entries New models - New ability, spell, etc
Other Generic Help page - Report a Bug - Request a Feature - Template Help

We are setting up individual templates for each ability, spell, animus, etc on Battle College. There's two ways you can create a new one, and there's pros and cons to each.

  1. The quick & dirty way
    • Pro: You finish quickly, so it gives you more time working on model pages (the "real" content).
    • Con: It creates categories that self-reference themselves.
    • Con: It completely mis-categorises "nested" abilities (things like how Ghost Walk grants Ghostly)
    • Con: You'll create errors with "same-named" abilities/models (Malice, the Cryx warjack vs Malice, the spell for example).
    • Con: It means more work later for someone to correct the errors.
    • Con: It might be hard to track down and correct when everything is 95% complete.
  2. The long & proper way
    • Pro: The opposite of all the cons above.
    • Con: It takes (slightly) longer.

Method 1 is favoured by people who view getting the templates correct as "worrying about the wallpaper before the walls are built". Method 2 is favoured by those as see it as "making sure your foundations are sound before you build the house".

Either way, there's work to be done. Start wherever you think is important.

The Quick & Dirty way[edit]

'''[[NAME]]''' - DESCRIPTION [[Category:NAME]]

Say you want to create a new ability called Teething Rings

  1. Navigate to http://battlecollege.org/index.php/Template:Teething Rings
  2. Copy this text into the new template:
    '''[[Teething Rings]]''' - this model can be bitten by a toddler.[[Category:Teething Rings]]
  3. Save.
  4. This template can now be added to any page by typing in {{Teething Rings}}

The Long & Proper way[edit]

Tip lightbulb.png

Tip !
An explanation of what the code is doing is included right at the bottom of the page, if you're curious about why it is the way it is.

Part 1:Create the template[edit]

'''[[:Category:NAME|NAME]]''' - DESCRIPTION {{{Hide_Cat|<includeonly>[[Category:NAME]]</includeonly>}}}<noinclude>[[Category:INC Template]]</noinclude>
  1. Navigate to the new template's name. http://battlecollege.org/index.php/Template:NAME
  2. Copy the above text, and change NAME and DESCRIPTION as appropriate.
    Note that NAME in step 1 and 2 need to match, and they're case-sensitive.
  3. Save

Part 2:Create the category[edit]

{{QuickCat
|Name=NAME}}
[[Category:Spell]]
[[Category:Animus]]
[[Category:Weapon ability]]
[[Category:Model ability]]
[[Category:Model type]]
  1. After you save the template, you'll see a red link. Click on it and it will take it you to a category page.
    This category will be empty, since you haven't used the template any where else yet.
  2. Copy the above text into the category page, and change NAME to the same one you used in Part 1.
    Note that NAME needs to exactly match the one you used in part 1, and they're case-sensitive.
  3. Delete whichever categories aren't relevant to your new ability.
  4. Save

Part 3:Create the Rules Clarification (optional, but strongly encouraged)[edit]

{{RCbox|Name= NAME
|font_size={{{font_size2|85%}}}
|list=* Placeholder}}<noinclude>[[Category:RC Template]]</noinclude>
  1. After you save the category, you'll see a red link. Click on it and it will take it you to a Rules Clarification template.
  2. Copy the above text into the template, and change NAME to the same one you used in Part 1.
    Note that NAME needs to exactly match the one you used in part 1, and they're case-sensitive.
  3. Save

Part 4:Create a redirect (optional)[edit]

#redirect [[:Category:NAME]]
  1. Navigate to http://battlecollege.org/index.php/NAME
  2. Copy the above text into the template, and change NAME to the same one you used in Part 1.
    Note that NAME needs to exactly match the one you used in part 1, and they're case-sensitive.


Nested Abilities[edit]

In this section, we go over how to create abilities that grant other abilities. The Granter is referred to as the "Nest" and the Granted ability is referred to as the "Egg". An example of a nested ability is:

Ghost Walk - Cost 2, Range 6 spell that grants Ghostly to a model/unit. (Ghostly - This model ignores terrain and free strikes.) .

The issue is, we want Ghost Walk itself to be in Category:Ghostly, but we don't want every spellcaster that has Ghost Walk to also be in Category:Ghostly. So we need to suppress Ghostly's auto-categorisation when it's put into the Nest.

Part 1: Create the "egg" ability template[edit]

This is simple - set it up like we described above.

Part 2: Create the "nest" ability template[edit]

'''[[:Category:NEST_NAME|NEST_NAME]]''' - DESCRIPTION (''{{EGG_NAME|Hide_Cat=<!--- YES--->}}''){{{Hide_Cat|<includeonly>[[Category:NEST_NAME]]</includeonly>}}}<noinclude>[[Category:INC Template]]</noinclude>

Example:

'''[[:Category:Ghost Walk|Ghost Walk]]''' - target model/unit gains Ghostly. (''{{Ghostly|Hide_Cat=<!--- YES--->}}''){{{Hide_Cat|<includeonly>[[Category:Ghost Walk]</includeonly>}}}<noinclude>[[Category:INC Template]]</noinclude>

Part 3: Create the "nest" ability category[edit]

{{QuickCat
|Name= NEST_NAME}}
[[Category: EGG_NAME]]
[[Category:Spell]]
[[Category:Animus]]
[[Category:Weapon ability]]
[[Category:Model ability]]
[[Category:Model type]]


Explanation[edit]

The template[edit]

'''[[:Category:NAME|NAME]]''' - DESCRIPTION {{{Hide_Cat|<includeonly>[[Category:NAME]]</includeonly>}}}<noinclude>[[Category:INC Template]]</noinclude>
  • '''[[:Category:NAME|NAME]]''' creates a link to the category, and then displays it as a bold NAME.
  • {{{Hide_Cat|<includeonly>[[Category:NAME]]</includeonly>}}} both causes auto-categorisation, and allows users to suppress the auto-categorisation if they want to (such as when creating nested abilities). What it does, is it looks for a user that inputs something (anything) for Hide_Cat,
    • if the user does provide a value for Hide_Cat then it will display that input.
    • if they don't input anything (which is 99% of the time) then it'll default to adding the category. It also wraps it in includeonly tags so that the template itself doesn't wind up in the category.
  • <noinclude>[[Category:INC Template]]</noinclude> Adds just the template itself to the INC Template category, for maintenance purposes only, really.

The nested template[edit]

'''[[:Category:NEST_NAME|NEST_NAME]]''' - DESCRIPTION (''{{EGG_NAME|Hide_Cat=<!--- YES--->}}''){{{Hide_Cat|<includeonly>[[Category:NEST_NAME]]</includeonly>}}}<noinclude>[[Category:EGG_NAME]] [[Category:INC Template]]</noinclude>
  • '''[[:Category:NEST_NAME|NEST_NAME]]''' - DESCRIPTION Up to this point, this is exactly the same as a normal template.
  • (''{{EGG_NAME|Hide_Cat=<!--- YES--->}}'') This part inserts the EGG ability, and suppresses the EGG auto-category, and wraps it in italics & brackets.
  • {{{Hide_Cat|<includeonly>[[Category:NEST_NAME]]</includeonly>}}} is the same as a normal template, except we're auto-categorising to the NEST now (instead of to EGG).
  • Lastly, when setting up the QuickCat page, you need to add [[Category:EGG]] manually because we suppressed it otherwise.

The category page[edit]

{{QuickCat
|Name=NAME}}

This is simply a shortcut. QuickCat stands for "Quickly make a Category page". It's a template that takes the NAME and inserts a few NAME-based links/templates. You can learn more about it at Template:QuickCat.

The nested rules clarification[edit]

{{RCbox|Name= Nest_Name
|list=* Placeholder
|font_size={{{font_size2|85%}}}
{{RC Egg_Name|font_size2=100%}}
}}<noinclude>[[Category:RC Template]]</noinclude>

This uses Template:RCbox to create a standarised Rules Clarification, with the contents being "Placeholder". It also adds this new RC to the RC category.

The redirect[edit]

#redirect [[:Category:NAME]] Do I need to explain what this does?