Difference between revisions of "Module:DefInfo/doc"

From RimWorld Wiki
Jump to navigation Jump to search
Line 15: Line 15:
  
 
; object
 
; object
: If we're querying Races, then, an object is for example: Hare, Lynx, Lancer, ... (defNames are used).
+
: If we're querying Races, then, an object is for example: Hare, Lynx, Lancer, LabradorRetriever, ... (defNames are used).
  
 
; property
 
; property

Revision as of 17:51, 17 March 2021

This is a work in progress.

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

{{#invoke:DefInfo|query|type|object|property}}

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 object and property 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

{{#invoke:DefInfo|query|Races|Hare|description}}

will return:

Script error: The module returned a nil value. It is supposed to return an export table.