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

From Salem Wiki
Jump to: navigation, search
Line 107: Line 107:
 
===Querries===
 
===Querries===
 
<ol>
 
<ol>
<li>{{t|List MenuEntries|menu<nowiki>=</nowiki>Test}}<br/>{{List MenuEntries|menu=Test}}</li>
 
<li><code><nowiki>---{{#show: User:©TriMoon™/PropVals testdata |?IsinGameMenu}}---</nowiki></code><br/>---{{#show:User:©TriMoon™/PropVals testdata |?IsinGameMenu}}---</li>
 
 
<li>Listing values for [[Property:RequiresObj]] on current [[User:©TriMoon™/PropVals testdata|test data page]]<ol type="a">
 
<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>{{#show: User:©TriMoon™/PropVals testdata |?RequiresObj |link=none |sep=<br/> }}</nowiki></code><br/>{{#show:User:©TriMoon™/PropVals testdata |?RequiresObj |link=none |sep=<br/> }}</li>
Line 132: Line 130:
 
</ul></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>
 
<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>
 +
<li>Listing pages using [[Property:RequiresTech]]<ol type="a">
 +
<li><code><nowiki>{{#ask: [[RequiresTech::+]] }}</nowiki></code><br/>{{#ask:[[RequiresTech::+]] |format=ul}}</li>
 +
<li><code><nowiki>{{#ask: [[:+]] [[RequiresTech::+]] }}</nowiki></code><br/>{{#ask: [[:+]] [[RequiresTech::+]] |format=ul}}</li>
 +
<li>Listing values for [[Property:RequiresTech]] on current [[User:©TriMoon™/PropVals testdata|test data page]]<ol type="i">
 
<li>{{t|PropVals|prop<nowiki>=</nowiki>RequiresTech|page<nowiki>=</nowiki>User:©TriMoon™/PropVals testdata}} gives:<br/>{{PropVals|prop=RequiresTech|page=User:©TriMoon™/PropVals testdata}}</li>
 
<li>{{t|PropVals|prop<nowiki>=</nowiki>RequiresTech|page<nowiki>=</nowiki>User:©TriMoon™/PropVals testdata}} gives:<br/>{{PropVals|prop=RequiresTech|page=User:©TriMoon™/PropVals testdata}}</li>
 +
<li><code><nowiki>{{#ask: [[:+]] [[RequiresTech::Simple Fences]] }}</nowiki></code><br/>{{#ask: [[:+]] [[RequiresTech::Simple Fences]] |format=ul}}</li>
 
</ol></li>
 
</ol></li>
 
</ol></li>
 
</ol></li>
 
</ol>
 
</ol>

Revision as of 19:20, 26 June 2012

Infobox

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

Semantics use

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

Querries

  1. Listing values for Property:RequiresObj on current test data page
    1. {{#show: User:©TriMoon™/PropVals testdata |?RequiresObj |link=none |sep=<br/> }}
    2. {{#ask: [[User:©TriMoon™/PropVals testdata]] [[RequiresObj::+]] | ?RequiresObj= |link=none |sep=<br/> }}
    3. Automatic listing in mind: {{PropVals |prop={{{prop|RequiresObj}}} |page={{FULLPAGENAME}}}}
      1. {{PropVals/getRecords|prop=RequiresObj|page=User:©TriMoon™/PropVals testdata }}
      2. {{PropVals/Group | <output from step above> }} internally using {{PropVals/Split}}
        • As you can see the usage below doesn't work because the parser does not recognize the records as extra arguments...
          • {{PropVals/Group |{{PropVals/getRecords|prop=RequiresObj|page=User:©TriMoon™/PropVals testdata }} }}
          • PropVals/Group:
            You need to provide records tobe processed !
        • Therefore we need to use {{#arraymap:}} as a wrapper to inject the records as extra arguments...
          • {{#arraymap: {{PropVals/getRecords|prop=RequiresObj|page=User:©TriMoon™/PropVals testdata }}{{{grpsep|/\}}} |{{{grpsep|/\}}} |xXx |{{PropVals/Group |sep={{{sep|;}}} |grpsep={{{grpsep|/\}}} |xXx }} |}}
          • {{PropVals/getGroupedRecords|prop=RequiresObj|page=User:©TriMoon™/PropVals testdata |sep={{{sep|;}}}|grpsep={{{grpsep|/\}}} }}
      3. <ul>{{#arraymap: <output from step above> |{{{grpsep|/\}}} |xXx |{{PropVals/List|sep={{{sep|;}}}|xXx}} |}}</ul>
      4. {{PropVals|prop=RequiresObj|page=User:©TriMoon™/PropVals testdata}} gives:
    4. 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:
          • {{#ask: [[:+]] [[RequiresTech::Simple Fences]] }}