Mabinogi World Wiki is brought to you by Coty C., 808idiotz, our other patrons, and contributors like you!!
Want to make the wiki better? Contribute towards getting larger projects done on our Patreon!

NOTICE: Seems like daily VIP shadow missions may be wrong occasionally!!

Difference between revisions of "User:Erorserv/Semantic Cheat Sheet"

From Mabinogi World Wiki
Jump to: navigation, search
m
m
 
Line 37: Line 37:
 
}}
 
}}
  
Adding <code>|?Potion toxicity</code> will return that property for each result. This can be any semantic property.
+
Adding <code>|?Potion toxicity</code> will return that property for each result. This can be multiple different semantic properties to give a wide range of information.
 +
Adding <code>|limit=5</code> will only display 5 of the queried results.
  
 
===Search Operators===
 
===Search Operators===
 
These can assist narrowing search results by adding conditions.<br/>
 
These can assist narrowing search results by adding conditions.<br/>
 +
<br/>
 
'''Numeric operators:'''
 
'''Numeric operators:'''
 
*<code>>></code> and <code><<</code> - Greater than / Less than.  
 
*<code>>></code> and <code><<</code> - Greater than / Less than.  
Line 46: Line 48:
 
**<code><nowiki>[[Monster cp::<500]]</nowiki></code> returns all monsters with less than or equal to 500 CP.
 
**<code><nowiki>[[Monster cp::<500]]</nowiki></code> returns all monsters with less than or equal to 500 CP.
 
**<code><nowiki>[[Monster cp::>>300 || <<500]]</nowiki></code> returns all monsters between 300 and 500 CP.
 
**<code><nowiki>[[Monster cp::>>300 || <<500]]</nowiki></code> returns all monsters between 300 and 500 CP.
 
+
<br/>
 
'''Text operators:'''
 
'''Text operators:'''
 
*<code>!</code> - Not
 
*<code>!</code> - Not
Line 80: Line 82:
 
|<code><nowiki>{{{4}}}</nowiki></code>
 
|<code><nowiki>{{{4}}}</nowiki></code>
 
|}
 
|}
'''<code><nowiki>{{{1}}}</nowiki></code> is always reserved for the primary property.'''
+
*'''<code><nowiki>{{{1}}}</nowiki></code> is always reserved for the primary property.'''
 +
<br/>
 +
Template example:
 +
<pre>
 +
{{#ask:
 +
[[Potion name::+]]
 +
|?Potion effect
 +
|template=TemplateName
 +
|introtemplate=TemplateHeader
 +
|outrotemplate=TemplateFooter
 +
}}
 +
</pre>
 +
{| class="mabitable" id="text-left"
 +
|-
 +
! Template
 +
! Content
 +
|-
 +
|<code><nowiki>{{TemplateHeader}}</nowiki></code>
 +
|
 +
<nowiki>{| class="mabitable"</nowiki><br/>
 +
<nowiki>|-</nowiki><br/>
 +
<nowiki>! Name</nowiki><br/>
 +
<nowiki>! Effect</nowiki><br/>
 +
|-
 +
|<code><nowiki>{{TemplateName}}</nowiki></code>
 +
|
 +
<nowiki>|-</nowiki><br/>
 +
<nowiki>| {{{1}}}</nowiki><br/>
 +
<nowiki>| {{{2}}}</nowiki><br/>
 +
|-
 +
|<code><nowiki>{{TemplateFooter}}</nowiki></code>
 +
|
 +
<nowiki>|}</nowiki>
 +
|}
 +
Results:
 +
{| class="mabitable"
 +
|-
 +
! Name
 +
! Effect
 +
|-
 +
| HP 10 Potion
 +
| Restores 10 Health.
 +
|-
 +
| x2 EXP Potion
 +
| Doubles EXP received by monsters.
 +
|-
 +
| Antidote Potion
 +
| Removes poison status.
 +
|}
 +
... further results

Latest revision as of 20:05, 5 August 2019

Set Semantic Properties

Semantic properties can set a value for a specific page, and allows the page to be queried later.
#set is used to set semantic properties to that page.

{{#set:
|Monster name=Brown Fox
|Monster family=Fox
}}

It's possible to use this in a template. Example: {{SemanticData}}

{{#set:
|Monster name={{{Name|}}}
|Monster family={{{Family|}}}
}}

These semantic properties will be set on each page that uses the template.

Hashtables

Hashtables will assign values to a table, similar to an array, and is accessible by all templates on the page.

{{#parameterstohash:Data}} will define all the template parameters to a hash table.
{{#hashvalue:Data|Name}} is fetch a single value from that hashtable.

  • Hashtables are only necessary if the values are accessed by multiple templates.

Semantic Query

Querys are used to obtain pages that have certain semantic properties.

{{#ask:
[[Potion type::Recovery]]
|?Potion toxicity
|limit=5
}}

Will return:

 Potion toxicity
Comprehensive HP 1000 Potion0.1
Comprehensive HP 500 Potion0.2
Comprehensive Recovery 1000 Potion0.2
Comprehensive Recovery 500 Potion0.1
Full Recovery Potion1
... further results

Adding |?Potion toxicity will return that property for each result. This can be multiple different semantic properties to give a wide range of information. Adding |limit=5 will only display 5 of the queried results.

Search Operators

These can assist narrowing search results by adding conditions.

Numeric operators:

  • >> and << - Greater than / Less than.
  • > and < - Greater than or equal to / Less than or equal to.
    • [[Monster cp::<500]] returns all monsters with less than or equal to 500 CP.
    • [[Monster cp::>>300 || <<500]] returns all monsters between 300 and 500 CP.


Text operators:

  • ! - Not
  • ~ - Like
  • !~ - Not like
  • * - Wildcard
  • ? - Wildcard for single character
    • [[Potion name::~*Potion]] will return any name that ends with "Potion".
    • [[Potion name::~HP*]] will return any name that starts with "HP".
    • [[Potion name::~*100*]] will return any name contains "100".
    • [[Potion name::!~*100*]] will return any name that does not contain "100".
    • [[Potion name::~HP ?? Potion]] will return any 2 digit HP potion.
      • HP 10 Potion, HP 30 Potion, HP 50 Potion

Format and Templates

|format returns the results in a certain format. For a list of formats, see here
In order to use a template, |format=plainlist must be used.
|template=TemplateName - Rendered for each result.
|introtemplate=TemplateHeader - Rendered before the first result.
|outrotemplate=TemplateFooter - Rendered after the end result.

You can access the primary property (Usually the page name) by using {{{1}}}.
Additional queried properties can be accessed in order like:

?Potion type {{{2}}}
?Potion can be crafted {{{3}}}
?Potion craft mana {{{4}}}
  • {{{1}}} is always reserved for the primary property.


Template example:

{{#ask:
[[Potion name::+]]
|?Potion effect
|template=TemplateName
|introtemplate=TemplateHeader
|outrotemplate=TemplateFooter
}}
Template Content
{{TemplateHeader}}

{| class="mabitable"
|-
! Name
! Effect

{{TemplateName}}

|-
| {{{1}}}
| {{{2}}}

{{TemplateFooter}}

|}

Results:

Name Effect
HP 10 Potion Restores 10 Health.
x2 EXP Potion Doubles EXP received by monsters.
Antidote Potion Removes poison status.

... further results