User:Khaim

From RimWorld Wiki
Revision as of 20:55, 15 September 2016 by Khaim (talk | contribs) (Query example)
Jump to navigation Jump to search

Sandbox

How-To: Properties & Queries

MediaWiki references

Property Syntax

TODO

Query Syntax

A query allows you to insert content, usually tables, which dynamically update based on data from other pages.

Example wiki code:

{{#ask:
[[Skill Base Factor::>0.4]]
[[Skill Bonus Factor::+]]
| ?Skill Base Factor# = Base
| ?Skill Bonus Factor# = Factor
| format = table
| limit  = 100
| mainlabel = Stat
| sort = Skill Base Factor,Skill Bonus Factor
| order = desc,desc
}}

Example renders like this:

StatBaseFactor
Reading Speed10.02
Pruning Speed0.920.01
Social Impact0.820.0275
Mech Repair Speed0.80.1
Subcore Encoding Speed0.750.1
Mechanoid Shredding Efficiency0.750.025
Hacking Speed0.750.025
Mech Gestation Speed0.750.025
Butchery Efficiency0.750.025
Arrest Success Chance0.60.075
Negotiation Ability0.40.075
Butchery Speed0.40.06
Medical Tend Speed0.40.06
Mechanoid Shredding Speed0.40.06
Medical Operation Speed0.40.06
Drug Cooking Speed0.40.06
Drug Synthesis Speed0.30.0875
Conversion Power0.30.0875
Construction Speed0.30.0875
Smoothing Speed0.30.0875
Medical Tend Quality0.20.1
Mortar Miss Radius Multiplier0.2-0.025
Train Animal Chance0.10.05
Entity Study Rate0.080.115
Plant Work Speed0.080.115
Research Speed0.080.115
Suppression Power0.050.0225
Mining Speed0.040.12
Animal Gather Speed0.040.12
Deep Drilling Speed0.040.12
Tame Animal Chance0.040.03
Foraged Food Amount00.09
Hunting Stealth00.05
Trade Price Improvement00.015

Comments: {{#ask: // Begin a query. // Everything up to the next | is the query term. This particular example returns pages which: [[Skill Base Factor::>0.4]] // have the Skill_Base_Factor property, value is >0.4 [[Skill Bonus Factor::+]] // AND have the Skill_Bonus_Factor property, with any value // Define how the results are displayed. // For a table, the first column is the page name. | ?Skill Base Factor# = Base // The second column is the page's Skill_Base_Factor value, with heading 'Base'. | ?Skill Bonus Factor# = Factor | format = table // 'format = broadtable' makes a table as wide as the screen. Optional. | limit = 100 // Maximum number of pages to return. Optional. | mainlabel = Stat // The heading for the first column (with the page name). | sort = Skill Base Factor,Skill Bonus Factor // Sort by base factor, then bonus factor. Optional. | order = desc,desc }}