Difference between revisions of "User:Khaim"

From RimWorld Wiki
Jump to navigation Jump to search
(Query example)
Line 1: Line 1:
 
==Sandbox==
 
==Sandbox==
  
===Skill Scaling===
+
 
 +
==How-To: Properties & Queries==
 +
 
 +
'''MediaWiki references'''
 +
* [https://www.semantic-mediawiki.org/wiki/Help:Properties_and_types Properties]
 +
* [https://www.semantic-mediawiki.org/wiki/Help:Selecting_pages Query syntax]
 +
* [https://www.semantic-mediawiki.org/wiki/Help:Displaying_information Display syntax]
 +
* [https://www.semantic-mediawiki.org/wiki/Help:Result_formats Result formats]
 +
 
 +
===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:
 +
<nowiki>{{#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
 +
}}</nowiki>
 +
 
 +
Example renders like this:
 
{{#ask:
 
{{#ask:
 
[[Skill Base Factor::+]]
 
[[Skill Base Factor::+]]
Line 13: Line 42:
 
| order = desc,desc
 
| order = desc,desc
 
}}
 
}}
 +
 +
Comments:
 +
<nowiki>{{#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
 +
}}</nowiki>

Revision as of 20:55, 15 September 2016

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
Hacking Speed0.750.025
Mech Gestation Speed0.750.025
Butchery Efficiency0.750.025
Mechanoid Shredding Efficiency0.750.025
Arrest Success Chance0.60.075
Negotiation Ability0.40.075
Medical Tend Speed0.40.06
Mechanoid Shredding Speed0.40.06
Medical Operation Speed0.40.06
Drug Cooking Speed0.40.06
Butchery Speed0.40.06
Conversion Power0.30.0875
Construction Speed0.30.0875
Smoothing Speed0.30.0875
Drug Synthesis Speed0.30.0875
Medical Tend Quality0.20.1
Mortar Miss Radius Multiplier0.2-0.025
Train Animal Chance0.10.05
Plant Work Speed0.080.115
Research Speed0.080.115
Entity Study Rate0.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 }}