Difference between revisions of "Template:Event"

From Dragon Age Toolset Wiki
Jump to: navigation, search
(add coloring and a break statement)
(links, and add documentation on how to omit lines from the example code)
Line 30: Line 30:
 
<span style="color: #0000ff;">case</span> {{PAGENAMEE}}:<br/>
 
<span style="color: #0000ff;">case</span> {{PAGENAMEE}}:<br/>
 
{
 
{
{{#if:{{{creatorname|}}}|:object {{{creatorname}}} <span style="color: #FF0000;">=</span> GetEventCreator(ev); // {{{creatordesc|}}}|}}{{#if:{{{int0name|}}}|
+
{{#if:{{{creatorname|}}}|:[[object]] {{{creatorname}}} <span style="color: #FF0000;">=</span> GetEventCreator(ev); // {{{creatordesc|}}}|}}{{#if:{{{int0name|}}}|
:int {{{int0name}}} <span style="color: #FF0000;">=</span> GetEventInteger(ev, 0); // {{{int0desc|}}}<br/>|}}{{#if:{{{int1name|}}}|
+
:[[int]] {{{int0name}}} <span style="color: #FF0000;">=</span> GetEventInteger(ev, 0); // {{{int0desc|}}}<br/>|}}{{#if:{{{int1name|}}}|
:int {{{int1name}}} <span style="color: #FF0000;">=</span> GetEventInteger(ev, 1); // {{{int1desc|}}}<br/>|}}{{#if:{{{int2name|}}}|
+
:[[int]] {{{int1name}}} <span style="color: #FF0000;">=</span> GetEventInteger(ev, 1); // {{{int1desc|}}}<br/>|}}{{#if:{{{int2name|}}}|
:int {{{int2name}}} <span style="color: #FF0000;">=</span> GetEventInteger(ev, 2); // {{{int2desc|}}}<br/>|}}{{#if:{{{float0name|}}}|
+
:[[int]] {{{int2name}}} <span style="color: #FF0000;">=</span> GetEventInteger(ev, 2); // {{{int2desc|}}}<br/>|}}{{#if:{{{float0name|}}}|
:float {{{float0name}}} <span style="color: #FF0000;">=</span> GetEventFloat(ev, 0); // {{{float0desc|}}}<br/>|}}{{#if:{{{float1name|}}}|
+
:[[float]] {{{float0name}}} <span style="color: #FF0000;">=</span> GetEventFloat(ev, 0); // {{{float0desc|}}}<br/>|}}{{#if:{{{float1name|}}}|
:float {{{float1name}}} <span style="color: #FF0000;">=</span> GetEventFloat(ev, 1); // {{{float1desc|}}}<br/>|}}{{#if:{{{float2name|}}}|
+
:[[float]] {{{float1name}}} <span style="color: #FF0000;">=</span> GetEventFloat(ev, 1); // {{{float1desc|}}}<br/>|}}{{#if:{{{float2name|}}}|
:float {{{float2name}}} <span style="color: #FF0000;">=</span> GetEventFloat(ev, 2); // {{{float2desc|}}}<br/>|}}{{#if:{{{string0name|}}}|
+
:[[float]] {{{float2name}}} <span style="color: #FF0000;">=</span> GetEventFloat(ev, 2); // {{{float2desc|}}}<br/>|}}{{#if:{{{string0name|}}}|
:string {{{string0name}}} <span style="color: #FF0000;">=</span> GetEventString(ev, 0); // {{{string0desc|}}}<br/>|}}{{#if:{{{string1name|}}}|
+
:[[string]] {{{string0name}}} <span style="color: #FF0000;">=</span> GetEventString(ev, 0); // {{{string0desc|}}}<br/>|}}{{#if:{{{string1name|}}}|
:string {{{string1name}}} <span style="color: #FF0000;">=</span> GetEventString(ev, 1); // {{{string1desc|}}}<br/>|}}{{#if:{{{string2name|}}}|
+
:[[string]] {{{string1name}}} <span style="color: #FF0000;">=</span> GetEventString(ev, 1); // {{{string1desc|}}}<br/>|}}{{#if:{{{string2name|}}}|
:string {{{string2name}}} <span style="color: #FF0000;">=</span> GetEventString(ev, 2); // {{{string2desc|}}}<br/>|}}{{#if:{{{object0name|}}}|
+
:[[string]] {{{string2name}}} <span style="color: #FF0000;">=</span> GetEventString(ev, 2); // {{{string2desc|}}}<br/>|}}{{#if:{{{object0name|}}}|
:object {{{object0name}}} <span style="color: #FF0000;">=</span> GetEventObject(ev, 0); // {{{object0desc|}}}<br/>|}}{{#if:{{{object1name|}}}|
+
:[[object]] {{{object0name}}} <span style="color: #FF0000;">=</span> GetEventObject(ev, 0); // {{{object0desc|}}}<br/>|}}{{#if:{{{object1name|}}}|
:object {{{object1name}}} <span style="color: #FF0000;">=</span> GetEventObject(ev, 1); // {{{object1desc|}}}<br/>|}}{{#if:{{{object2name|}}}|
+
:[[object]] {{{object1name}}} <span style="color: #FF0000;">=</span> GetEventObject(ev, 1); // {{{object1desc|}}}<br/>|}}{{#if:{{{object2name|}}}|
:object {{{object2name}}} <span style="color: #FF0000;">=</span> GetEventObject(ev, 2); // {{{object2desc|}}}<br/>|}}
+
:[[object]] {{{object2name}}} <span style="color: #FF0000;">=</span> GetEventObject(ev, 2); // {{{object2desc|}}}<br/>|}}
 
:<span style="color: #0000FF;">break</span>;<br/>
 
:<span style="color: #0000FF;">break</span>;<br/>
 
}
 
}
Line 49: Line 49:
  
 
This template produces the standard formatting in the first part of [[:category:Event types]] articles. The following is a comprehensive set of all the possible parameters for this template; feel free to delete the unused parameters when using it in an article for tidiness.
 
This template produces the standard formatting in the first part of [[:category:Event types]] articles. The following is a comprehensive set of all the possible parameters for this template; feel free to delete the unused parameters when using it in an article for tidiness.
 +
 +
You can omit a particular variable from the example code by not setting its corresponding name parameter. For example, if an event has both object0 and creator as the "attacker", you can omit the creator from the example code by not setting creatorname.
  
 
<pre>
 
<pre>
Line 55: Line 57:
 
|from=
 
|from=
 
|to=
 
|to=
 +
|creatorname=
 
|creatordesc=
 
|creatordesc=
 
|int0name=
 
|int0name=

Revision as of 16:34, 24 July 2009


This template produces the standard formatting in the first part of category:Event types articles. The following is a comprehensive set of all the possible parameters for this template; feel free to delete the unused parameters when using it in an article for tidiness.

You can omit a particular variable from the example code by not setting its corresponding name parameter. For example, if an event has both object0 and creator as the "attacker", you can omit the creator from the example code by not setting creatorname.

{{event
|when=
|from=
|to=
|creatorname=
|creatordesc=
|int0name=
|int0desc=
|int1name=
|int1desc=
|int2name=
|int2desc=
|float0name=
|float0desc=
|float1name=
|float1desc=
|float2name=
|float2desc=
|string0name=
|string0desc=
|string1name=
|string1desc=
|string2name=
|string2desc=
|object0name=
|object0desc=
|object1name=
|object1desc=
|object2name=
|object2desc=
}}