Difference between revisions of "Template:Dafunction"

From Dragon Age Toolset Wiki
Jump to: navigation, search
(add some explanation of future plans and why they'll have to wait for a little bit longer)
(add links)
Line 4: Line 4:
  
 
<div style="background:#DDDDDD;">
 
<div style="background:#DDDDDD;">
{{{returntype}}} {{{name}}} (
+
[[{{{returntype}}}]] {{{name}}} (
:: {{{param1type}}} {{{param1name}}} = {{{param1default}}},
+
:: [[{{{param1type}}}]] {{{param1name}}} = {{{param1default}}},
:: {{{param2type}}} {{{param2name}}} = {{{param2default}}}
+
:: [[{{{param2type}}}]] {{{param2name}}} = {{{param2default}}}
 
:)
 
:)
 
</div>
 
</div>
Line 20: Line 20:
 
<dd>{{{returndesc}}}
 
<dd>{{{returndesc}}}
 
<dt>Source:
 
<dt>Source:
<dd>{{{sourcefile}}} from the module {{{sourcemodule}}}
+
<dd>[[{{{sourcefile}}}]] from the module [[{{{sourcemodule}}}]]
 
</dl>
 
</dl>
  

Revision as of 20:29, 21 July 2009


{{{brief}}}

[[{{{returntype}}}]] {{{name}}} (

[[{{{param1type}}}]] {{{param1name}}} = {{{param1default}}},
[[{{{param2type}}}]] {{{param2name}}} = {{{param2default}}}
)
Parameters:
{{{param1name}}}
{{{param1desc}}}
{{{param2name}}}
{{{param2desc}}}

Returns:
{{{returndesc}}}
Source:
[[{{{sourcefile}}}]] from the module [[{{{sourcemodule}}}]]



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
}}

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.