User:Aldyron/Sandbox/Monster Manual experiment

Phase 1
Personally, I'd much prefer a Monster Manual in single table form, rather than multiple tables form. In fact, I have a spreadsheet on my computer laid out that way. That makes certain browsing patterns more practical. Let's see if wiki tables could fit the bill as well. I'll explain how I use it if and when I get it in shape.

Phase 2
Moreover, I'm a big fan of "a single source" wherever and whenever possible and practical. This comes from theory and practice: whenever any kind of database gets duplicated even partially, the (possibly multiple) duplicates soon start misaligning. That leads to people (say, me) often finding out-of-sync data, usually without even realizing it, and the efforts to maintain the several copies of the data likely become too onerous. I consider this the zeroth law of database handling: always strive for single-source, never duplicate unless indispensable, always consolidate if not unpractical.

I've read several comments written by several editors mentioning some extensions that can enable us to do some database work. I'll study them and try to employ them for phase 2.

Underlying
Finally, as a wikibeginner, I need practice in a lot of fields. I'm going to use this as a starting/stumbling point in order to find out what I need to learn about wiki software. :-) That's why I'm doing this by myself instead of making requests to my senior fellow editors. As soon as I have something resembling publish-ready, I'll tap people on the shoulder.

It all started when I decided to go hunting every Rust Monster in the game...

Table, hand-crafted
The table itself is looking good.

Labeled Section Transclusion
Labeled Section Transclusion doesn't work (yet?) for me. Labeling sections in the template doesn't seem to propagate the markup to the actual pages, so lst can't work as I'd like. I'm not sure if it's impossible or just me being a newbie: seems to imply it cannot work, while  seems to imply that it can, since I'm not interested in dynamic tags. The jargon is too new to me, I'm not sure about the practical meaning of those sentences. Besides, I suspect the sanitizer isn't my ally, as far as lst is concerned.

Anyway, head's full of lst, I'm stuck in a loop of the same three ideas, so time to switch to something else for the time being, in order to clear up the slate.

Will give Dynamic Page List a try.

Update: in conclusion, I downright abandoned lst in favor of dpl (which also include lst-like features anyway); I leave these notes here for future reference.

Dynamic Page List
Unless something ugly shows up during tests, dpl definitely looks like the way to go. I'm halfway there already, in a few minutes' time. Strange, I was expecting something like the 90-90 rule, but I'm more in a 50% work in 1% time, 50% in 179% situation. :-) Fact is, the more I study dpl, the grander ideas I get. Update: as usual, documentation / coding time is about 70% / 30%.

I may need a template to map kind to volume. Update: done, User:Aldyron/Sandbox/Template Mm kind to volume. Update: stupid me, I can *not* use the monster type field from Template:Infobox-monster, because it does not map one-to-one to MM category; use another template similar to map kind to category, or possibly alter User:Aldyron/Sandbox/Template Mm kind to volume to do both mappings. Update: done the latter, now it's User:Aldyron/Sandbox/Template Mm kind to category or volume.

I may need a phantom template or two in order to sub-query. Update: not mandatory, just possible (and arguably desirable for a cleaner code).

include then format together to pull content then create content for the same row. Works both for static data (pointless, but not in every scenario) and for dynamic data.

It just occurred to me that dpl makes it possible to write quite an arsenal of "diagnostic" tables. I'l try to concoct a few. Update: as soon as they're publish-ready, pull'em out of this page, as they're not related to its topic.

OK, the sub-queries themselves work fine. Now I need to see about feeding them the right dynamic target page instead of the hard-coded one: Update: in progress. Quests are mostly OK, but I need to test for non-standard cases. Non-quests are still missing.
 * if habitat field is empty, provide a default value
 * if habitat field contains more than one value, select one (the first one may be an easy choice)
 * if habitat is dirty, clean it up (e.g.: "The drunken fewer rare, just around the first corner" -> "The drunken fewer")
 * (unnecessary?) if habitat is a wikilink, de-wikilink it (e.g.: "The drunken fewer" -> "The drunken fewer")
 * on second thought, habitat *should* be a wikilink, and plain text should be treated as dirt (see above)
 * I may need to propose a modification of Template:Infobox-monster
 * here's a thought: if I regex out the first wikilink, that more or less satisfies all of the above requirements, and we just need to ask editors to use Template:Infobox-monster in a certain, stricter way; in case, rewrite the legend for habitat's column header.

N.B.: check whether hard-coding | to \0x7c is bad in an international environment.

[http://semeb.com/dpldemo/index.php?title=DPL:FAQ#A.29_A_table_of_page_meta-data.3B FAQ / How do I create tabular output? / A) A table of page meta-data]

Test table / A2: putting the link into the second column

DPL:Manual - General Usage and Invocation Syntax / Characters with special meaning

Diagnostics
Try to make sorting order stricter.

Update: tough luck.

Monster Manual table (hand-crafted): current state
What follows is my experimentation to reformat and expand Mm export by hand (for now) into a shape more suitable to me and, I believe, to anyone else. I'm now pretty much satisfied with the result, as far as both (minimal) aesthetics and end-user functionality go.

Why change?
I'll explain why I changed certain aspects of the original Mm export table. It's only right that I start by saying I appreciate the hard work of those that came before me, whose results I based my efforts on. Never in my mind was present the idea to lower their images to raise mine. Nonetheless, I believe there's room for improvement, which I hope to promote by means of the following notes.

Column headers
First off, the column headers.
 * "MM kind" instead of "Type / Race". The naming convention nazi in me is at work here. I try to strictly follow the D&D 3.5 naming scheme. Every time I'm in doubt, I ask myself: "What would the Sage recommend? What would Sean K. Reynolds comment?" You know, the Sage, Skip Williams, the one who wrote the D&D FAQ... Sean K. Reynolds, co-author of several books in the 3.5 line, the 3.6 line and more... Several man-years' worth of work went inside the decisions that make up the naming scheme, there's a reason for every name, and it stood the test of time. That kind of streamlining alone solved several year-long problems. I consider it 99.5% flawless. With that in mind, note that in this column we have entries that are not types (e.g. "Human": creatures with the Humanoid type and the Human subtype) nor races (e.g. "Flesh Golem": creatures with the Construct type and no subtype, which do not breed - I hope! - thus do not qualify as a race). Besides, several monsters are listed under headings which (to a naming convention nazi) are the wrong ones (e.g. "Undead Bilge Rat": a creature with the Undead type and no subtype, which is listed under "Rat": creatures with the Animal type and no subtype). No problem with that per se, but at this point I frown at the sight of either "Type" or "Race" at the top of the column. All things considered, the best alternative column header I could think of was "kind of creature as listed in the Monster Manual", in short "MM kind". Come to think of it, I might as well put it in the legend. Come to think of it, we've got no legend, might be good to add one. :-)
 * A similar reasoning lead me to "MM category" (additional column, see next section). Entries that are not types (e.g. "Player Races", "Misc."). I'm pretty unsatisfied with this one, since it clashes with the wiki's Categories and could cause confusion. That's why I prefixed it with "MM". If you have a better alternative, please suggest.

Additional columns
I added some columns: MM category, Volume, Level (nominal heroic normal quest level) and Pack (need-to-buy adventure pack or free-to-play). The former two were already available right before each table, so adding them to each table makes little sense, until you join all the tables together to form one single table. This one table is sortable, that is, you can click on the headers in several ways and rearrange the table on the fly, the way you need it. Here are some use cases, consider them as starting ideas.
 * I am hunting every Rust Monster in the game. What's the next one I'm missing? Sort by MM kind, plus maybe Name if I'm feeling systematic.
 * Oh, good, I've slain Blight in The Sunken Sewer. Since I'm already here, what else can I find here? Sort by Habitat, plus maybe MM category + MM kind + Name if I'm feeling systematic.
 * By the way, there's Ruin (spider) over there, also in The Sunken Sewer, and the link color tells me its page doesn't exist. I'll write it. And shoot a picture.
 * Say, I've noticed both Slyssaris and Warlock Slyssaris are listed in The Sunken Sewer. Chances are they're actually the same monster and one of the entries should be struck from DDO wiki. Let's find him and check what the focus orb calls him, we'll strike the other one.
 * Just out of curiousity, how many kinds of Player Races are there in the monster manual? Sort by MM category + MM kind.
 * Blast, now that I've lost my VIP status (Turbine account, not DDO wiki), I'm a Premium player, and I have also lost access to Monster Manual Volumes after Volume I. What monsters *can* I hunt now? Sort by Volume.
 * Uh, as a Premium player, I also have to pay for adventure packs. OK, I'll buy The Vale of Twilight. What monsters can I hunt in The Vale of Twilight content and in Free To Play content? Sort by Volume + Pack (or Pack + Volume, as preferred).
 * OK, I'm a VIP again, so I've regained access to all my previous monsters. Now I want to take it easy with my level 28 character, I want to hunt lowest-level monsters first. Sort by Level (which admittedly is quest level, not monster level, but you're unlikely to find level 22 monsters in a level 3 quest anyway).

Ordering
The presentation order of the columns: I shifted the monster name to the third position, so now you have MM category, then MM kind, then Name, which is just the (user interface-enforced) order you must follow when accessing a certain monster in the in-game Monster Manual window. Open to argument, anyway.

What's next?
Now the hard part: I'll try semi-automatic compilation from single-monster pages.

Update: even better, it looks like fully automatic compilation is possible and relatively easy, certainly much easier than I initially thought.

The hand-crafted table itself
For testing purposes, rows are just a subset of the original table (with my modifications).

Legend
 * MM category: taxon of the first taxonomic rank you find when accessing this monster in the in-game Monster Manual window; mostly equivalent to D&D creature type
 * MM kind: taxon of the second taxonomic rank etc.; mostly equivalent to D&D creature race, type+subtype or specific subset
 * Name: identifies this monster either as a generic creature belonging to a most specific subset of its kind or a unique, named creature
 * Habitat: where you can find this monster; usually one or more Quests, Wilderness adventure areas and/or hostile public areas
 * Level: as far as applicable, nominal level of this monster's habitat when played at heroic normal difficulty
 * Pack: either Free To Play or the Adventure Pack you need to buy in order to access this monster's habitat
 * Volume: which Monster Manual Volume this monster kind is listed in (currently P for Prologue, 1 for Vol. I, 2 for Vol. II, 3 for Vol. III)
 * Monster Manual: (to do)

Test section lst - please ignore
test section 1 should follow:

MM type section should follow:

test section 2 should follow:

Monster Manual table (dpl-generated): current state
An explanation of the parameters used for a query similar to this one is available: see User:Aldyron/Tutorial/DPL parameters.

The dpl-generated table itself
For testing purposes, rows are just a subset of the original table (with my modifications).

(Placeholder: the legend goes here, see )