Toggle menu
14
229
69
27.1K
Kenshi Wiki
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Module:LoadData/doc: Difference between revisions

From Kenshi Wiki
Created page with "{{Module rating|protected}} <!-- Please, place this module categories and this documentation interwikis where indicated at the bottom of this page. This module interwikis go at Wikidata (see Wikipedia:Wikidata). Thanks! --> A more complex version of Module:Data with more options and the ability to select indexes with an inequality operator. ==Usage== {{#invoke:{{BASEPAGENAME}}|Module name|index1|2 lteq=index2 limit|...|}} * Zeroth parameter is the name o..."
 
No edit summary
Line 1: Line 1:
{{Module rating|protected}}
{{doc sub}}
<!-- Please, place this module categories and this documentation interwikis where indicated at the bottom of this page. This module interwikis go at Wikidata (see [[Wikipedia:Wikidata]]). Thanks! -->
<!-- Please, place this module categories and this documentation interwikis where indicated at the bottom of this page. This module interwikis go at Wikidata (see [[Wikipedia:Wikidata]]). Thanks! -->


Line 15: Line 15:
<includeonly>{{Sandbox other||
<includeonly>{{Sandbox other||
<!-- Please, add this module categories below this line. Thanks! -->
<!-- Please, add this module categories below this line. Thanks! -->
 
[[Category:Modules]]
}}</includeonly><noinclude>
}}</includeonly><noinclude>
[[Category:Module documentation pages]]
[[Category:Module documentation pages]]
<!-- Please, add this documentation interwikis below this line. Thanks! -->
[[pt:Módulo:LoadData/doc]]
</noinclude>
</noinclude>

Revision as of 02:10, 2 March 2025

A more complex version of Module:Data with more options and the ability to select indexes with an inequality operator.

Usage

{{#invoke:LoadData|Module name|index1|2 lteq=index2 limit|...|}}
  • Zeroth parameter is the name of the data module to read, without Module:, e.g. Example/data
  • Next parameters, for an index N starting at one, are called |N= for the exact index you need, coerced to number if possible, |N lteq= to select the highest numerical index less than or equal to the argument, or |N gteq= for the opposite.
  • |template= is a printf-style string to interpolate the resulting value(s) into, e.g. <b>%s</b>.
  • |preprocess= is like |template= except that frame:preprocess is run on it; this makes e.g. template transclusions work.
  • |if nil= is the string to return if the result is nil. Default is nil, which comes out as the empty string.
Contents