Template:Goal/doc

From the RuneScape Wiki, the wiki for all things RuneScape
Jump to: navigation, search
Information icon-grey.svg
This is a documentation subpage for Template:Goal.
It contains usage information, categories, and other content that is not part of the original template page.

The Goal template displays a skill goal level and compares it with the current level and shows a completion bar based on the amount of experience points. It copies the functionality provided by other fan-sites and which some users have included into their user page. For non-skill goals, see Template:SimpleGoal.

Usage

{{Goal
  |Skill     = name of skill
  |Label     = optional label (replaces skill image)
  |Goal      = target level
  |Level     = current level
  |Xp        = current experience points (alternative to Level)
  |Name      = player name (if given, ignores Level and Xp)
  |BarColor1 = colour of achieved part of progress bar (default #428bb5)
  |BarColor2 = colour of remaining part of progress bar (default #90c1dd)
  |TextColor1= colour of text for achieved part of progress bar (default white)
  |TextColor2= colour of text for remaining part of progress bar (default white)
}}

The current status of the skill can either be specified by the Level input parameter or by the Xp input parameter.

Alternatively, the current level and experience of any skill can be updated from HiScores with the use of the Name input parameter. In this case, Xp and Level will be ignored.

Please note that using the template requires 29 kilobytes (kb) of pre-include space, which has a maximum of 2 Megabytes (Mb). So, this gives a maximum of around 65 goal templates on a single user page when no other templates are being used. The generated HTML is typically only 1 kb.

{{Goal|Skill=Mining|Goal=85|Level=72}}

The code yields the following result:

Mining 28%
72  85 
13 levels

From left to the right:

  • The skill / desired icon (see below)
  • Completion percentage
  • (darker blue) The achieved level
  • (lighter blue) The goal level
  • Levels left to achieve the goal

Hovering over the progress bar, will show the remaining experience (or levels) to reach that goal.

Examples

Below are some examples of the various uses of the Goal template:

Level

The first example defines the current skill status using the Level parameter:

{{Goal|Skill=Mining|Goal=85|Level=72}}

The example produces the following result:

Mining 28%
72  85 
13 levels

XP

The second example defines the actual skill status by using the Xp parameter.

{{Goal|Skill=Attack|Goal=85|Xp=900000}}

The example produces the following result:

Attack 28%
72  85 
13 levels

Goal achieved

The third example also uses the Xp input value, which just happens to be higher than the value given in the Goal.

{{Goal|Skill=Crafting|Goal=85|Xp=3527150}}

This produces the following result:

Crafting 100%
85 
0 levels

Data from HiScores

The fourth example shows how Name can be used to obtain data from HiScores (using Max as an example).

{{Goal|Name=Max|Skill=Invention|Goal=99}}

This produces the following result:

Invention 100%
150 
0 levels

Optional label and colours

The fifth example shows how the Label can be used instead of the default Skill image. It also shows how different colours can be specified for the progress bar.

{{Goal|Skill=Crafting|Goal=85|Xp=900000
|Label='''my label'''|BarColor1=darkcyan|BarColor2=red|TextColor1=lime|TextColor2=black}}

This produces the following result:

my label 28%
72  85 
13 levels

Goals header

Note: Please don't place this header in a wikitable, as it will get borders then and the widths are wrong then(Levels to go will appear half above xp to go)

You could also place a header above your goals, by placing {{Goalslist}} above it. Example:

{{Goalslist}}
{{Goal|Skill=Mining|Goal=85|Level=72}}
{{Goal|Skill=Attack|Goal=85|Xp=900000}}

results in:

Icon Completion
percentage
Current
level
Goal
level
Levels
to go
Mining 28%
72  85 
13 levels
Attack 28%
72  85 
13 levels

Resizable header

For goals with personal labels, please use {{Goalslist|(wanted width of "Icon")}}

Example:

{{Goalslist|40}}
{{Goal|Skill=Crafting|Goal=85|Xp=900000|Label='''my label'''|BarColor1=darkcyan|BarColor2=red|TextColor1=lime|TextColor2=black}}

Results in:

Icon Completion
percentage
Current
level
Goal
level
Levels
to go
my label 28%
72  85 
13 levels

The difference is that the Icon part of the header is wider, so all other headers are in the right place. The standard width for skill icons is 30.

See also

Template:Goalslist