Talk:Character: Difference between revisions
Jump to navigation
Jump to search
>Vinifera7 No edit summary |
No edit summary |
(No difference)
|
Revision as of 19:52, 27 November 2015
SMW queries
So I wanted to try these queries with leech rate. The query gives:
{{#ask: -Has subobject::Character Has stat id::maximum_life_leech_rate_%_per_minute |?Has stat value= |mainlabel=- |limit=1}} <- Was 1,200 at the time of writing this.
Which is the rate per minute. So I decided to divide the value with 60 to get per second:
Expression error: Unrecognized punctuation character "{".
This does not work because it is displayed as 1,200, not 1200. Anyone know how to solve it?--Illviljan (talk) 19:07, 23 November 2015 (UTC)
- First off, you can use <nowiki></nowiki> tags to prevent parsing (i.e for comments)
- It's happening because it returns a I18N aware string, basically it formats the number based on your locale, to circumvent this, just add a hash ( # ):
- {{#expr:{{#ask: [[-Has subobject::Character]] [[Has stat id::maximum_life_leech_rate_%_per_minute]] |?Has stat value#= |mainlabel=- |limit=1}} /60}}
- Yields: Expression error: Unrecognized punctuation character "{".
- Also see smw:Help:Displaying_information#Plain_.28unformatted.29_printouts for more about this.
- Additionally, since User:Qetuth noted that it would be a bit messy in the prose text, I just made a template to cut down the length of the ask text a bit, it does the above basically:
- {{SMW character query|stat=maximum_life_leech_rate_%_per_minute}}
- Yields: Template:SMW character query
Is the "SMW generic stat table" manually edited? Are we allowed to edit it? There's a few stats I think it is missing: