Difference between revisions of "Template:Dafunction"

From Dragon Age Toolset Wiki
Jump to: navigation, search
(make module optional for now)
Line 5: Line 5:
 
::{{#if:{{{param1name|}}}|{{{param1type}}} {{{param1name}}}{{#if:{{{param1default|}}}| = {{{param1default}}}|}}|}}{{#if:{{{param2name|}}}|,
 
::{{#if:{{{param1name|}}}|{{{param1type}}} {{{param1name}}}{{#if:{{{param1default|}}}| = {{{param1default}}}|}}|}}{{#if:{{{param2name|}}}|,
 
::{{{param2type}}} {{{param2name}}}{{#if:{{{param2default|}}}| = {{{param2default}}}|}}|}}{{#if:{{{param3name|}}}|,
 
::{{{param2type}}} {{{param2name}}}{{#if:{{{param2default|}}}| = {{{param2default}}}|}}|}}{{#if:{{{param3name|}}}|,
::{{{param3type}}} {{{param3name}}}{{#if:{{{param3default|}}}| = {{{param3default}}}|}}|}}
+
::{{{param3type}}} {{{param3name}}}{{#if:{{{param3default|}}}| = {{{param3default}}}|}}|}}{{#if:{{{param4name|}}}|,
 +
::{{{param4type}}} {{{param4name}}}{{#if:{{{param4default|}}}| = {{{param4default}}}|}}|}}{{#if:{{{param5name|}}}|,
 +
::{{{param5type}}} {{{param5name}}}{{#if:{{{param5default|}}}| = {{{param5default}}}|}}|}}{{#if:{{{param6name|}}}|,
 +
::{{{param6type}}} {{{param6name}}}{{#if:{{{param6default|}}}| = {{{param6default}}}|}}|}}{{#if:{{{param7name|}}}|,
 +
::{{{param7type}}} {{{param7name}}}{{#if:{{{param7default|}}}| = {{{param7default}}}|}}|}}{{#if:{{{param8name|}}}|,
 +
::{{{param8type}}} {{{param8name}}}{{#if:{{{param8default|}}}| = {{{param8default}}}|}}|}}{{#if:{{{param9name|}}}|,
 +
::{{{param9type}}} {{{param9name}}}{{#if:{{{param9default|}}}| = {{{param9default}}}|}}|}}{{#if:{{{param10name|}}}|,
 +
::{{{param10type}}} {{{param10name}}}{{#if:{{{param10default|}}}| = {{{param10default}}}|}}|}}
 
:)
 
:)
 
</div>
 
</div>
Line 57: Line 64:
 
}}
 
}}
 
</pre>
 
</pre>
 
Note: The finished version of this template will have much more complex source code that will make use of the parserfunctions extension to hide bits that shouldn't be visible (for example, if there's no default value for a parameter, there should be no "=". If there's only two parameters we don't want a whole lot of commas tacked on to the end of the parameter list. And so forth. Unfortunately, the web development team is busy getting the social site ready for certification right now so it'll be at least a week before the extension is installed. In the meantime this is a mockup to see what parameters are needed and how they're best laid out.
 
  
 
A standard dafunction page will have a number of other headers below this template where more detailed and free-form information will be added by editors.
 
A standard dafunction page will have a number of other headers below this template where more detailed and free-form information will be added by editors.
Line 66: Line 71:
 
== Description ==
 
== Description ==
 
== Examples ==
 
== Examples ==
== Known bugs ==
+
== Known issues ==
 
== See also ==
 
== See also ==
  

Revision as of 16:05, 24 July 2009

{{{brief}}}

{{{returntype}}} {{{name}}} (

)
Parameters:

Returns:
{{{returndesc}}}
Source:
[[{{{sourcefile}}}]]



Usage:

{{dafunction
|name = _AI_Condition_GetCreatureWithAIStatus
|brief = Returns a creature with a specifc AI Status
|param1type = int
|param1name = nAIStatus
|param1desc = the status being checked for if active on a creature
|param1default =
|param2type = int
|param2name = nTargetType
|param2desc = the target type of creature we are looking for that might have the specified status
|param2default =
.
.
.
|returntype = object
|returndesc = A creature of a specific type (self, ally, hostile) that has the status applied, OBJECT_INVALID otherwise
|sourcefile = ai_conditions_h
|sourcemodule = Core Resources
}}

A standard dafunction page will have a number of other headers below this template where more detailed and free-form information will be added by editors.

Suggested standard headers include:

Description

Examples

Known issues

See also

With others added when and where needed.