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

From Salem Wiki
Jump to: navigation, search
Line 127: Line 127:
 
<ol>
 
<ol>
 
<li>{{t|List MenuEntries|menu<nowiki>=</nowiki>Test}}<br/>{{List MenuEntries|menu=Test}}</li>
 
<li>{{t|List MenuEntries|menu<nowiki>=</nowiki>Test}}<br/>{{List MenuEntries|menu=Test}}</li>
<li><code><nowiki>---{{#show: {{FULLPAGENAME}} |?IsinGameMenu}}---</nowiki></code><br/>---{{#show:{{FULLPAGENAME}} |?IsinGameMenu}}---</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 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: {{FULLPAGENAME}} |?RequiresObj |link=none |sep=<br/> }}</nowiki></code><br/>{{#show:{{FULLPAGENAME}} |?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>
<li><code><nowiki>{{#ask: [[{{FULLPAGENAME}}]] [[RequiresObj::+]] | ?RequiresObj= |link=none |sep=<br/> }}</nowiki></code><br/>{{#ask: [[{{FULLPAGENAME}}]] [[RequiresObj::+]] | ?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>=</nowiki>RequiresObj |page<nowiki>={{PAGENAME}}</nowiki>}}<ol type="i">
+
<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>={{{prop|RequiresObj}}}</nowiki>|page<nowiki>={{{page|{{FULLPAGENAME}} }}}</nowiki> }}<ul>
+
<li>{{t|PropVals/getRecords|prop<nowiki>=RequiresObj</nowiki>|page<nowiki>=User:©TriMoon™/PropVals testdata</nowiki> }}<ul>
<li>{{PropVals/getRecords|prop={{{prop|RequiresObj}}}|page={{{page|{{FULLPAGENAME}} }}} }}</li>
+
<li>{{PropVals/getRecords|prop=RequiresObj|page=User:©TriMoon™/PropVals testdata }}</li>
 
</ul></li>
 
</ul></li>
 
<li>{{t|PropVals/Group | <output from step above> }} internally using {{t|PropVals/Split}}<ul>
 
<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>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>={{{prop|RequiresObj}}}</nowiki>|page<nowiki>={{{page|{{FULLPAGENAME}} }}}</nowiki> }}<nowiki> }}</nowiki></code></li>
+
<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={{{prop|RequiresObj}}}|page={{{page|{{FULLPAGENAME}} }}} }} }}</li>
+
<li>{{PropVals/Group |{{PropVals/getRecords|prop=RequiresObj|page=User:©TriMoon™/PropVals testdata }} }}</li>
 
</ul></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>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>={{{prop|RequiresObj}}}</nowiki>|page<nowiki>={{{page|{{FULLPAGENAME}} }}}</nowiki> }}<nowiki>{{{grpsep|/\}}} |{{{grpsep|/\}}} |xXx |{{PropVals/Group |sep={{{sep|;}}} |grpsep={{{grpsep|/\}}} |xXx }} |}}</nowiki></code></li>
+
<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>={{{prop|RequiresObj}}}</nowiki>|page<nowiki>={{{page|{{FULLPAGENAME}} }}}</nowiki> |sep<nowiki>={{{sep|;}}}</nowiki>|grpsep<nowiki>={{{grpsep|/\}}}</nowiki> }}</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={{{prop|RequiresObj}}} |page={{{page|{{FULLPAGENAME}} }}} |sep={{{sep|;}}} |grpsep={{{grpsep|/\}}} }}</li>
+
<li>{{PropVals/getGroupedRecords |prop=RequiresObj |page=User:©TriMoon™/PropVals testdata |sep={{{sep|;}}} |grpsep={{{grpsep|/\}}} }}</li>
 
</ul></li>
 
</ul></li>
 
</ul></li>
 
</ul></li>
Line 151: Line 151:
 
</ul></li>
 
</ul></li>
 
<li>{{t|PropVals|prop<nowiki>=</nowiki>RequiresObj}} gives:<br/>{{PropVals|prop=RequiresObj}}</li>
 
<li>{{t|PropVals|prop<nowiki>=</nowiki>RequiresObj}} gives:<br/>{{PropVals|prop=RequiresObj}}</li>
<li>{{t|PropVals|prop<nowiki>=</nowiki>RequiresObj|page<nowiki>=</nowiki>Stone Hedge}} gives:<br/>{{PropVals|prop=RequiresObj|page=Stone Hedge}}</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></li>
 
</ol></li>
 
<li>floating code...<ul>
 
<li>floating code...<ul>
<li>{{t|PropVals/Split |val<nowiki>={{#show:{{FULLPAGENAME}} |?RequiresObj |link=none |sep=/\}}</nowiki> |sep<nowiki>=</nowiki>/\ |part<nowiki>=</nowiki>2 }}<br/>{{PropVals/Split |val={{#show:{{FULLPAGENAME}} |?RequiresObj |link=none |sep=/\}} |sep=/\ |part=2 }}</li>
+
<li>{{t|PropVals/Split |val<nowiki>={{#show:User:©TriMoon™/PropVals testdata |?RequiresObj |link=none |sep=/\}}</nowiki> |sep<nowiki>=</nowiki>/\ |part<nowiki>=</nowiki>2 }}<br/>{{PropVals/Split |val={{#show:User:©TriMoon™/PropVals testdata |?RequiresObj |link=none |sep=/\}} |sep=/\ |part=2 }}</li>
<li><code><nowiki>{{#replace:{{#show:{{FULLPAGENAME}} |?RequiresObj |link=none |sep=/\}}|;|{{!}} }}</nowiki></code><br/>{{#replace:{{#show:{{FULLPAGENAME}} |?RequiresObj |link=none |sep=/\}}|;|{{!}} }}</li>
+
<li><code><nowiki>{{#replace:{{#show:User:©TriMoon™/PropVals testdata |?RequiresObj |link=none |sep=/\}}|;|{{!}} }}</nowiki></code><br/>{{#replace:{{#show:User:©TriMoon™/PropVals testdata |?RequiresObj |link=none |sep=/\}}|;|{{!}} }}</li>
<li><code><nowiki>{{#arraymap: {{#replace:{{#show:{{FULLPAGENAME}} |?RequiresObj |link=none |sep=/\}}|;|{{!}} }} |/\|x|{{t|t|x}}|<br/> }}</nowiki></code><br/>{{#arraymap: {{#replace:{{#show:{{FULLPAGENAME}} |?RequiresObj |link=none |sep=/\}}|;|{{!}} }} |/\|x|{{t|t|x}}|<br/> }}</li>
+
<li><code><nowiki>{{#arraymap: {{#replace:{{#show:User:©TriMoon™/PropVals testdata |?RequiresObj |link=none |sep=/\}}|;|{{!}} }} |/\|x|{{t|t|x}}|<br/> }}</nowiki></code><br/>{{#arraymap: {{#replace:{{#show:User:©TriMoon™/PropVals testdata |?RequiresObj |link=none |sep=/\}}|;|{{!}} }} |/\|x|{{t|t|x}}|<br/> }}</li>
 
</ul></li>
 
</ul></li>
 
</ol>
 
</ol>

Revision as of 18:08, 25 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

Property settings

  • isGameMenu=n
  • isinGameMenu=Test
  • String=Board;6
  • String=Wooden Plugs;4
  • String=Nails;2
  • RequiresObj=Anvil
  • RequiresObj=Flint;1
  • RequiresObj=Stone;3
  • RequiresObj=Lime;15;Startpost
  • RequiresObj=Flint;15;Startpost
  • RequiresObj=Stone;30;Startpost
  • RequiresObj=Lime;8;Cornerpost
  • RequiresObj=Flint;8;Cornerpost
  • RequiresObj=Stone;15;Cornerpost
  • RequiresObj=Board;10
  • RequiresObj=Nails;4

Querries

  1. {{List MenuEntries|menu=Test}}
    no Non-menu entries found.
  2. ---{{#show: User:©TriMoon™/PropVals testdata |?IsinGameMenu}}---
    ------
  3. 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}} gives:
        • {{PropVals|prop=RequiresObj|page=User:©TriMoon™/PropVals testdata}} gives:
      5. floating code...
        • {{PropVals/Split |val={{#show:User:©TriMoon™/PropVals testdata |?RequiresObj |link=none |sep=/\}} |sep=/\ |part=2 }}
        • {{#replace:{{#show:User:©TriMoon™/PropVals testdata |?RequiresObj |link=none |sep=/\}}|;|{{!}} }}
        • {{#arraymap: {{#replace:{{#show:User:©TriMoon™/PropVals testdata |?RequiresObj |link=none |sep=/\}}|;|{{!}} }} |/\|x|{{t|t|x}}|<br/> }}
      ... more about "©TriMoon™/Sandbox"
      Anvil +, Flint;1 +, Stone;3 +, Lime;15;Startpost +, Flint;15;Startpost +, Stone;30;Startpost +, Lime;8;Cornerpost +, Flint;8;Cornerpost +, Stone;15;Cornerpost +, Board;10 +, Nails;4 +  and + +
      TextThis property is a special property in this wiki.
      Board;6 +, Wooden Plugs;4 +  and Nails;2 +