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

From Salem Wiki
Jump to: navigation, search
Line 149: Line 149:
 
<li>each {{t|PropVals/List}} using {{t|PropVals/Print Entry}} which will internally use {{t|PropVals/Split}}</li>
 
<li>each {{t|PropVals/List}} using {{t|PropVals/Print Entry}} which will internally use {{t|PropVals/Split}}</li>
 
<li><code><nowiki><ul>
 
<li><code><nowiki><ul>
{{#arraymap:
+
{{#arraymap: </nowiki>
</nowiki>{{#arraymap: {{#show:{{FULLPAGENAME}} |?RequiresObj |link=none |sep={{!}} }}{{{grpsep|/\}}} |{{{grpsep|/\}}} |x |{{t|PropVals/Group |sep<nowiki>=</nowiki>{{{sep|;}}} |grpsep<nowiki>=</nowiki>{{{grpsep|/\}}} |x}} |}}<nowiki>
+
{{t|PropVals/getGroupedRecords|prop<nowiki>={{{prop|RequiresObj}}}</nowiki>|page<nowiki>={{{page|{{FULLPAGENAME}} }}}</nowiki> }}
|{{{grpsep|/\}}}
+
<nowiki>|{{{grpsep|/\}}}
 
|x
 
|x
 
|{{PropVals/List|x}}
 
|{{PropVals/List|x}}
Line 159: Line 159:
 
<ul>
 
<ul>
 
{{#arraymap:
 
{{#arraymap:
{{#arraymap:
+
{{PropVals/getGroupedRecords|prop={{{prop|RequiresObj}}}|page={{{page|{{FULLPAGENAME}} }}} }}
{{#show:{{FULLPAGENAME}}
 
|?RequiresObj
 
|link=none
 
|sep={{!}}
 
}}{{{grpsep|/\}}}
 
|{{{grpsep|/\}}}
 
|x
 
|{{PropVals/Group
 
|sep={{{sep|;}}}
 
|grpsep={{{grpsep|/\}}}
 
|x
 
}}
 
|
 
}}
 
 
|{{{grpsep|/\}}}
 
|{{{grpsep|/\}}}
 
|x
 
|x

Revision as of 22:40, 23 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=Board;10
  • RequiresObj=Nails;4
  • RequiresObj=Lime;15;Startpost
  • RequiresObj=Flint;15;Startpost
  • RequiresObj=Stone;30;Startpost
  • RequiresObj=Lime;8;Cornerpost
  • RequiresObj=Flint;8;Cornerpost
  • RequiresObj=Stone;15;Cornerpost

Querries

  1. {{List MenuEntries|menu=Test}}
    no Non-menu entries found.
  2. ---{{#show: {{FULLPAGENAME}} |?IsinGameMenu}}---
    ------
  3. Listing values for Property:RequiresObj on current page
    1. {{#show: {{FULLPAGENAME}} |?RequiresObj |link=none |sep=<br/> }}
    2. {{#ask: [[{{FULLPAGENAME}}]] [[RequiresObj::+]] | ?RequiresObj= |link=none |sep=<br/> }}
    3. Automatic listing in mind: {{PropVals |prop=RequiresObj |page={{PAGENAME}}}}
      1. {{PropVals/getRecords|prop={{{prop|RequiresObj}}}|page={{{page|{{FULLPAGENAME}} }}} }}
      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={{{prop|RequiresObj}}}|page={{{page|{{FULLPAGENAME}} }}} }} }}
          • 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={{{prop|RequiresObj}}}|page={{{page|{{FULLPAGENAME}} }}} }}{{{grpsep|/\}}} |{{{grpsep|/\}}} |x |{{PropVals/Group |sep={{{sep|;}}} |grpsep={{{grpsep|/\}}} |x }} |}}
          • {{PropVals/getGroupedRecords|prop={{{prop|RequiresObj}}}|page={{{page|{{FULLPAGENAME}} }}} }}
      3. <ul>{{#arraymap: <output from step above> |{{{grpsep|/\}}} |x |{{PropVals/List|x}} |}}</ul>
      4. {{PropVals|prop=RequiresObj}} gives:
        • {{PropVals|prop=RequiresObj|page=Stone Hedge}} gives:
      5. floating code...
        • {{PropVals/Split |val={{#show:{{FULLPAGENAME}} |?RequiresObj |link=none |sep=/\}} |sep=/\ |part=2 }}
        • {{#replace:{{#show:{{FULLPAGENAME}} |?RequiresObj |link=none |sep=/\}}|;|{{!}} }}
        • {{#arraymap: {{#replace:{{#show:{{FULLPAGENAME}} |?RequiresObj |link=none |sep=/\}}|;|{{!}} }} |/\|x|{{t|t|x}}|<br/> }}
      ... more about "©TriMoon™/Sandbox"
      Anvil +, Flint;1 +, Stone;3 +, Board;10 +, Nails;4 +, Lime;15;Startpost +, Flint;15;Startpost +, Stone;30;Startpost +, Lime;8;Cornerpost +, Flint;8;Cornerpost +, Stone;15;Cornerpost +  and + +
      TextThis property is a special property in this wiki.
      Board;6 +, Wooden Plugs;4 +  and Nails;2 +