User:©TriMoon™/Sandbox
From Salem Wiki
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
- Help:Selecting pages
- Help:Displaying information
- Help:Inline queries (Parser function #show)
- Extension:StringFunctions (#explode:)
- List the set of unique values for a property
- Multiple values for the same field
Property settings
- isGameMenu=n
- isinGameMenu=Test
Querries
- {{List MenuEntries|menu=Test}}
no Non-menu entries found. ---{{#show: User:©TriMoon™/PropVals testdata |?IsinGameMenu}}---
------- Listing values for Property:RequiresObj on current test data page
{{#show: User:©TriMoon™/PropVals testdata |?RequiresObj |link=none |sep=<br/> }}
{{#ask: [[User:©TriMoon™/PropVals testdata]] [[RequiresObj::+]] | ?RequiresObj= |link=none |sep=<br/> }}
- Automatic listing in mind: {{PropVals |prop={{{prop|RequiresObj}}} |page={{FULLPAGENAME}}}}
- {{PropVals/getRecords|prop=RequiresObj|page=User:©TriMoon™/PropVals testdata }}
- {{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|/\}}} }}
- As you can see the usage below doesn't work because the parser does not recognize the records as extra arguments...
<ul>{{#arraymap: <output from step above> |{{{grpsep|/\}}} |xXx |{{PropVals/List|sep={{{sep|;}}}|xXx}} |}}</ul>
- each {{PropVals/List}} using {{PropVals/Print Entry}} which will internally use {{PropVals/Split}}
- {{PropVals|prop=RequiresObj}} gives:
- {{PropVals|prop=RequiresObj|page=User:©TriMoon™/PropVals testdata}} gives:
- {{PropVals/getRecords|prop=RequiresObj|page=User:©TriMoon™/PropVals testdata }}
- 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/> }}
- {{PropVals/Split |val={{#show:User:©TriMoon™/PropVals testdata |?RequiresObj |link=none |sep=/\}} |sep=/\ |part=2 }}