Difference between pages "Sys traps h" and "Template:Dafunction"

From Dragon Age Toolset Wiki
(Difference between pages)
Jump to: navigation, search
m (No right bracket on expression error)
 
m (Undo revision 18953 by Sunjammer (talk))
 
Line 1: Line 1:
The Traps System include file, [[sys_traps_h]], contains trap functions.
+
<includeonly>{{{brief}}}
  
== References ==
+
<div class="dascript" style="font-family:monospace; background-color:#F9F9F9; border: 1px dashed #2F6FAB; white-space:pre; line-height:1.25em; padding:1.0em;"><!--
 
+
-->[[{{{returntype}}} keyword|{{{returntype}}}]]{{#if:{{{returnarra|}}}|[]}} {{{name}}}(<!--
* [[abi_templates]]
+
-->{{#if:{{{param1name|}}}| <br/>    [[{{{param1type}}} keyword|{{{param1type}}}]]{{#if:{{{param1arra|}}}|[]}} {{{param1name}}}{{#if:{{{param1default|}}}|&nbsp;= {{{param1default}}}|}}|}}<!--
* [[achievement_core_h]]
+
-->{{#if:{{{param2name|}}}|,<br/>    [[{{{param2type}}} keyword|{{{param2type}}}]]{{#if:{{{param2arra|}}}|[]}} {{{param2name}}}{{#if:{{{param2default|}}}|&nbsp;= {{{param2default}}}|}}|}}<!--
* [[core_difficulty_h]]
+
-->{{#if:{{{param3name|}}}|,<br/>    [[{{{param3type}}} keyword|{{{param3type}}}]]{{#if:{{{param3arra|}}}|[]}} {{{param3name}}}{{#if:{{{param3default|}}}|&nbsp;= {{{param3default}}}|}}|}}<!--
* [[events_h]]
+
-->{{#if:{{{param4name|}}}|,<br/>    [[{{{param4type}}} keyword|{{{param4type}}}]]{{#if:{{{param4arra|}}}|[]}} {{{param4name}}}{{#if:{{{param4default|}}}|&nbsp;= {{{param4default}}}|}}|}}<!--
* [[log_h]]
+
-->{{#if:{{{param5name|}}}|,<br/>    [[{{{param5type}}} keyword|{{{param5type}}}]]{{#if:{{{param5arra|}}}|[]}} {{{param5name}}}{{#if:{{{param5default|}}}|&nbsp;= {{{param5default}}}|}}|}}<!--
* [[sys_autoscale_h]]
+
-->{{#if:{{{param6name|}}}|,<br/>    [[{{{param6type}}} keyword|{{{param6type}}}]]{{#if:{{{param6arra|}}}|[]}} {{{param6name}}}{{#if:{{{param6default|}}}|&nbsp;= {{{param6default}}}|}}|}}<!--
* [[sys_rewards_h]]
+
-->{{#if:{{{param7name|}}}|,<br/>    [[{{{param7type}}} keyword|{{{param7type}}}]]{{#if:{{{param7arra|}}}|[]}} {{{param7name}}}{{#if:{{{param7default|}}}|&nbsp;= {{{param7default}}}|}}|}}<!--
* [[utility_h]]
+
-->{{#if:{{{param8name|}}}|,<br/>    [[{{{param8type}}} keyword|{{{param8type}}}]]{{#if:{{{param8arra|}}}|[]}} {{{param8name}}}{{#if:{{{param8default|}}}|&nbsp;= {{{param8default}}}|}}|}}<!--
{{IncludeFileMembers
+
-->{{#if:{{{param9name|}}}|,<br/>    [[{{{param9type}}} keyword|{{{param9type}}}]]{{#if:{{{param9arra|}}}|[]}} {{{param9name}}}{{#if:{{{param9default|}}}|&nbsp;= {{{param9default}}}|}}|}}<!--
|constants   = true
+
-->{{#if:{{{param10name|}}}|,<br/>    [[{{{param10type}}} keyword|{{{param10type}}}]]{{#if:{{{param10arra|}}}|[]}} {{{param10name}}}{{#if:{{{param10default|}}}|&nbsp;= {{{param10default}}}|}}|}}<!--
|structs      = true
+
--><br/>);</div>
|functions   = true
+
<dl>
|sourcemodule = Core Game Resources
+
<dt>Parameters:
 +
<dd>{{#if:{{{param1name|}}}|
 +
<dl><!--
 +
-->{{#if:{{{param1name|}}}|<dt style="font-weight:normal; font-style:italic;">{{{param1name}}}<dd>{{#if:{{{param1desc|}}}|{{{param1desc|}}}|{{undocumented}}}}|}}<!--
 +
-->{{#if:{{{param2name|}}}|<dt style="font-weight:normal; font-style:italic;">{{{param2name}}}<dd>{{#if:{{{param2desc|}}}|{{{param2desc|}}}|{{undocumented}}}}|}}<!--
 +
-->{{#if:{{{param3name|}}}|<dt style="font-weight:normal; font-style:italic;">{{{param3name}}}<dd>{{#if:{{{param3desc|}}}|{{{param3desc|}}}|{{undocumented}}}}|}}<!--
 +
-->{{#if:{{{param4name|}}}|<dt style="font-weight:normal; font-style:italic;">{{{param4name}}}<dd>{{#if:{{{param4desc|}}}|{{{param4desc|}}}|{{undocumented}}}}|}}<!--
 +
-->{{#if:{{{param5name|}}}|<dt style="font-weight:normal; font-style:italic;">{{{param5name}}}<dd>{{#if:{{{param5desc|}}}|{{{param5desc|}}}|{{undocumented}}}}|}}<!--
 +
-->{{#if:{{{param6name|}}}|<dt style="font-weight:normal; font-style:italic;">{{{param6name}}}<dd>{{#if:{{{param6desc|}}}|{{{param6desc|}}}|{{undocumented}}}}|}}<!--
 +
-->{{#if:{{{param7name|}}}|<dt style="font-weight:normal; font-style:italic;">{{{param7name}}}<dd>{{#if:{{{param7desc|}}}|{{{param7desc|}}}|{{undocumented}}}}|}}<!--
 +
-->{{#if:{{{param8name|}}}|<dt style="font-weight:normal; font-style:italic;">{{{param8name}}}<dd>{{#if:{{{param8desc|}}}|{{{param8desc|}}}|{{undocumented}}}}|}}<!--
 +
-->{{#if:{{{param9name|}}}|<dt style="font-weight:normal; font-style:italic;">{{{param9name}}}<dd>{{#if:{{{param9desc|}}}|{{{param9desc|}}}|{{undocumented}}}}|}}<!--
 +
-->{{#if:{{{param10name|}}}|<dt style="font-weight:normal; font-style:italic;">{{{param10name}}}<dd>{{#if:{{{param10desc|}}}|{{{param10desc|}}}|{{undocumented}}}}|}}
 +
</dl>|None}}
 +
</dl><dl><dt>Returns:
 +
<dd>{{#ifeq:{{{returntype}}}|void|Nothing.|{{#if:{{{returndesc|}}}|{{{returndesc|}}}|{{undocumented}}}}}}
 +
</dl><dl><dt>Source:
 +
<dd>{{#if:{{{sourcemodule|}}}|[[{{{sourcemodule|}}}]].}}{{#if:{{{sourcefile|}}}|[[{{{sourcefile|}}}]]|{{undocumented}}}}
 +
</dl><!--
 +
-->{{#if:{{{sourcefile|}}}|[[Category:Functions from {{{sourcefile|}}}]]|[[Orphaned functions]]}}<!--
 +
-->{{#if:{{{version|}}}|[[Category:Functions from version {{{version}}}]]|[[Category:Functions from version 1.00]]}}<!--
 +
--></includeonly><noinclude>
 +
== Usage ==
 +
<pre>
 +
{{dafunction
 +
|version      =
 +
|name          = _AI_Condition_GetCreatureWithAIStatus
 +
|brief        = Returns a creature with a specifc AI Status
 +
|param1type   = int
 +
|param2arra    =  
 +
|param1name    = nAIStatus
 +
|param1desc    = the status being checked for if active on a creature
 +
|param1default =
 +
|param2type    = int
 +
|param2arra    =
 +
|param2name    = nTargetType
 +
|param2desc    = the target type of creature we are looking for that might have the specified status
 +
|param2default =
 +
.
 +
.
 +
.
 +
|returntype    = object
 +
|returnarra    =
 +
|returndesc    = A creature of a specific type (self, ally, hostile) that has the status applied, OBJECT_INVALID otherwise
 +
|sourcefile   = ai_conditions_h
 +
|sourcemodule = Core Game Resources
 
}}
 
}}
== Remarks ==
+
<!-- == Description == -->
<!-- This section contains additional comments, observations and known issues. -->
+
<!-- This section contains the full description from the functions comments. Do not change unless you are confident these are incomplete or incorrect. -->
Comments state that core_difficulty_h has been included for its damage-scaling functions and sys_autoscale_h for its auto-scaling functions which are used by the summoning traps.
+
<!-- == Remarks == -->
 +
<!-- This section contains additional comments, observations and known issues. -->
 +
<!-- == Examples == -->
 +
<!-- This section contains examples transcluded from the snippet library. -->
 +
<!-- == See also == -->
 +
<!-- This section contains links to articles, functions or constant groups. -->
  
=== No right bracket on expression error ===
+
</pre>
 +
The return and parameter fields also have corresponding "arra" fields,  for example '''param1arra'''. When any value, normally "true", is placed in these fields the  corresponding return type or parameter type will be made into an array.  This is required because the [] notation of arrays conflicts with the  wiki's link notation.
  
The current version of sys_traps_h uses the [[GetCommandObject]] function which was added to [[script.ldf]] by the Dragon Age: Origins v1.02 patch. Trying to compile any script which includes  sys_traps_h with an older version of Dragon Age: Origins installed (i.e. v1.00 or v1.01) will generate a [[No right bracket on expression]] error.  Updating Dragon Age: Origins to v1.02 or later resolves this issue.
+
A standard function page will have a number of other headers below this template where more detailed and free-form information will be added by editors. The recommended headers and their purpose are:
<!-- == Examples == -->
+
 
<!-- This section contains examples transcluded from the snippet library. -->
+
* '''Description''': a more verbose description of the function
<!-- == See also == -->
+
* '''Remarks''': hints and tips on usage; caveats or known issues; workarounds or unusal uses; etc.
<!-- This section contains links to articles, functions or constant groups. -->
+
* '''Examples''': dascript snippets demonstrating how to use the functions
[[Category:Include files]]
+
* '''See also''': links to related articles or categories
[[Category:Traps]]
+
 
 +
Others sections can be added when and where needed.
 +
 
 +
[[Category:Formatting templates]]
 +
</noinclude>

Latest revision as of 00:38, 11 February 2013

Usage

{{dafunction
|version       =
|name          = _AI_Condition_GetCreatureWithAIStatus
|brief         = Returns a creature with a specifc AI Status
|param1type    = int
|param2arra    = 
|param1name    = nAIStatus
|param1desc    = the status being checked for if active on a creature
|param1default =
|param2type    = int
|param2arra    = 
|param2name    = nTargetType
|param2desc    = the target type of creature we are looking for that might have the specified status
|param2default =
.
.
.
|returntype    = object
|returnarra    = 
|returndesc    = A creature of a specific type (self, ally, hostile) that has the status applied, OBJECT_INVALID otherwise
|sourcefile    = ai_conditions_h
|sourcemodule  = Core Game Resources
}}
<!-- == Description == -->
<!-- This section contains the full description from the functions comments. Do not change unless you are confident these are incomplete or incorrect. -->
<!-- == Remarks == -->
<!-- This section contains additional comments, observations and known issues. -->
<!-- == Examples == -->
<!-- This section contains examples transcluded from the snippet library. -->
<!-- == See also == -->
<!-- This section contains links to articles, functions or constant groups. -->

The return and parameter fields also have corresponding "arra" fields, for example param1arra. When any value, normally "true", is placed in these fields the corresponding return type or parameter type will be made into an array. This is required because the [] notation of arrays conflicts with the wiki's link notation.

A standard function page will have a number of other headers below this template where more detailed and free-form information will be added by editors. The recommended headers and their purpose are:

  • Description: a more verbose description of the function
  • Remarks: hints and tips on usage; caveats or known issues; workarounds or unusal uses; etc.
  • Examples: dascript snippets demonstrating how to use the functions
  • See also: links to related articles or categories

Others sections can be added when and where needed.