Difference between revisions of "Module:DefInfo/doc"

From RimWorld Wiki
Jump to navigation Jump to search
m
m (category)
 
(4 intermediate revisions by one other user not shown)
Line 1: Line 1:
'''This is a work in progress. It's still quite useless at the moment.'''
+
Dev version at [[Module:Test]]
 
 
== Description ==
 
This module is used to obtain information about certain game objects.
 
It uses data stored in the subpages of the module.
 
The data that is in those subpages is gathered from Defs in the game's XML files.
 
 
 
== Usage ==
 
<code><nowiki>
 
{{#invoke:DefInfo|query|type|object|property}}
 
</nowiki></code>
 
 
 
; type
 
: For now, the only type that is available is: Races. More will be added.
 
 
 
; object
 
: If we're querying Races, then, an object is for example: Hare, Lynx, Lancer, LabradorRetriever, ... (defNames are used).
 
 
 
; property
 
: MoveSpeed, description, baseBodySize, ...
 
 
 
NOTE: What you can use in <code>object</code> and <code>property</code> parameters is not strictly defined and some properties can't be dependably obtained (tags that appear multiple times such as those in sublists - work in progress).
 
 
 
== Examples ==
 
<code><nowiki>{{#invoke:DefInfo|query|Races|Hare|description}}</nowiki></code>
 
 
 
will return:
 
 
 
{{#invoke:DefInfo|query|Races|Hare|description}}
 
  
 +
<includeonly>[[Category:Module]]</includeonly>
 
<noinclude>[[Category:Module documentation]]</noinclude>
 
<noinclude>[[Category:Module documentation]]</noinclude>

Latest revision as of 22:57, 22 October 2022

Dev version at Module:Test