Difference between revisions of "User:©TriMoon™/Sandbox"

From Salem Wiki
Jump to: navigation, search
Line 117: Line 117:
 
}}
 
}}
  
===Property:RequiresObj===
 
<ol>
 
<li>Listing values for [[Property:RequiresObj]] on current [[User:©TriMoon™/PropVals testdata|test data page]]<ol type="a">
 
<li><code><nowiki>{{#show: User:©TriMoon™/PropVals testdata |?RequiresObj |link=none |sep=<br/> }}</nowiki></code><br/>{{#show:User:©TriMoon™/PropVals testdata |?RequiresObj |link=none |sep=<br/> }}</li>
 
<li><code><nowiki>{{#ask: [[User:©TriMoon™/PropVals testdata]] [[RequiresObj::+]] | ?RequiresObj= |link=none |sep=<br/> }}</nowiki></code><br/>{{#ask: [[User:©TriMoon™/PropVals testdata]] [[RequiresObj::+]] | ?RequiresObj= |link=none |sep=<br/> }}</li>
 
<li>Automatic listing in mind: {{t|PropVals |prop<nowiki>={{{prop|RequiresObj}}}</nowiki> |page<nowiki>={{FULLPAGENAME}}</nowiki>}}<ol type="i">
 
<li>{{t|PropVals/getRecords|prop<nowiki>=RequiresObj</nowiki>|page<nowiki>=User:©TriMoon™/PropVals testdata</nowiki> }}<ul>
 
<li>{{PropVals/getRecords|prop=RequiresObj|page=User:©TriMoon™/PropVals testdata }}</li>
 
</ul></li>
 
<li>{{t|PropVals/Group | <output from step above> }} internally using {{t|PropVals/Split}}<ul>
 
<li>As you can see the usage below doesn't work because the parser does not recognize the records as extra arguments...<ul>
 
<li><code><nowiki>{{PropVals/Group |</nowiki>{{t|PropVals/getRecords|prop<nowiki>=RequiresObj</nowiki>|page<nowiki>=User:©TriMoon™/PropVals testdata</nowiki> }}<nowiki> }}</nowiki></code></li>
 
<li>{{PropVals/Group |{{PropVals/getRecords|prop=RequiresObj|page=User:©TriMoon™/PropVals testdata }} }}</li>
 
</ul></li>
 
<li>Therefore we need to use <code><nowiki>{{#arraymap:}}</nowiki></code> as a wrapper to inject the records as extra arguments...<ul>
 
<li><code><nowiki>{{#arraymap: </nowiki>{{t|PropVals/getRecords|prop<nowiki>=RequiresObj</nowiki>|page<nowiki>=User:©TriMoon™/PropVals testdata</nowiki> }}<nowiki>{{{grpsep|/\}}} |{{{grpsep|/\}}} |xXx |{{PropVals/Group |sep={{{sep|;}}} |grpsep={{{grpsep|/\}}} |xXx }} |}}</nowiki></code></li>
 
<li>{{t|PropVals/getGroupedRecords|prop<nowiki>=RequiresObj</nowiki>|page<nowiki>=User:©TriMoon™/PropVals testdata</nowiki> |sep<nowiki>={{{sep|;}}}</nowiki>|grpsep<nowiki>={{{grpsep|/\}}}</nowiki> }}</li>
 
<li>{{PropVals/getGroupedRecords |prop=RequiresObj |page=User:©TriMoon™/PropVals testdata |sep={{{sep|;}}} |grpsep={{{grpsep|/\}}} }}</li>
 
</ul></li>
 
</ul></li>
 
<li><code><nowiki><ul>{{#arraymap: <output from step above> |{{{grpsep|/\}}} |xXx |{{PropVals/List|sep={{{sep|;}}}|xXx}} |}}</ul></nowiki></code><br/><ul>
 
<li>each {{t|PropVals/List}} using {{t|PropVals/Print Entry}} which will internally use {{t|PropVals/Split}}</li>
 
<li>{{PropVals|page=User:©TriMoon™/PropVals testdata|debug=y}}</li>
 
</ul></li>
 
<li>{{t|PropVals|prop<nowiki>=</nowiki>RequiresObj|page<nowiki>=</nowiki>User:©TriMoon™/PropVals testdata}} gives:<br/>{{PropVals|prop=RequiresObj|page=User:©TriMoon™/PropVals testdata}}</li>
 
</ol></li>
 
</ol></li>
 
</ol>
 
 
===Property:RequiresTech===
 
===Property:RequiresTech===
 
<ol>
 
<ol>

Revision as of 19:23, 4 July 2012

Infobox

{{infobox}}:
Template:Infobox/debugTheme Template:Infobox/debugTheme
Template:Infobox/debugTheme Template:Infobox/debugTheme

Semantic Wiki related

Lets try to describe properties of Objects using their placement in the game-menus to aid in later auto-categorization....

See Property:IsinGameMenu for current menu-names.

fe. Blazing Brazier, would need:

  • isGameMenu=n
  • isinGameMenu=Claims & Defenses
See these pages for documentation


HasProp

{{#if: {{HasProp|Has icon}}
| [[{{#show:User:©TriMoon™/PropVals testdata|?Has icon|link=none}}]]
}}


Property:RequiresTech

  1. Listing pages using Property:RequiresTech
    1. {{#ask: [[RequiresTech::+]] }}
    2. {{#ask: [[:+]] [[RequiresTech::+]] }}
    3. Listing values for Property:RequiresTech on current test data page
      1. {{PropVals|prop=RequiresTech|page=User:©TriMoon™/PropVals testdata}} gives:

    Property:RequiredBy

    1. Listing all values for Property:RequiredBy on certain page
      1. {{#ask: [[Axe]] |?RequiredBy |link=none |format=template |template=PropVals/List RequiredBy/query template |named args=yes}}
        {{PropVals/List RequiredBy/query template |#querycondition=Axe |#querylimit=50 |#resultoffset=0 |#rowcount=1 |1=Flint Axe |RequiredBy= |#=0 |#rownumber=1}}
      2. {{#ask:[[-RequiredBy::{{{page|Nails}}}]]
        |format=ul
        |limit=10
        |link=none
        |template=PropVals/Print Entry
        }}