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!

User:Erorserv/Semantic Cheat Sheet

From Mabinogi World Wiki

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
Antidote Potion0.1
Full Recovery Potion1
HP & MP 10 Potion0.3
HP & MP 100 Potion0.3
HP & MP 30 Potion0.3
... 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