I have made progress on making the static
Roll Call page dynamically built from the characters sheets. The dynamic page is called
Adventures. It processes in the following order.
Reads 00_The_Dunn_Wright_Inn for field values.
Reads all characters in the "The Dunn Wright Inn" category.
Then processes the subcategories of "Games" in alphabetical order, reading first the 00_game_name page, then the characters in the category.
The same dynamic page processor handles both "game description pages" that contain:
{{Char_Info_DIV
|Game_Name=Crypt of the Everflame
|Game_URL=http://www.enworld.org/forum/playing-game/299447-lpf-crypt-everflame-01-a.html
|Game_GM=Mowgli
|Game_Judge=GlassEye
................If empty, label not printed
|Game_Start=in the past
...............Field ignored at the moment
|Game_Active=yes
.......................If not "yes", the page is ignored
|Game_Description=A town for generations has used a cursed crypt as a rites of passage test for its teenagers. Now, someone has awoken that curse and the advance party setting up the tests and traps has disappeared. Our brave adventurers have been hired to save the advance party...
}}
and then the characters that have a block of:
<!-- The next block is used to build dynamic pages of where the character is. -->
<!-- If the class and level field is kept up to date, one only needs to change -->
<!-- the category which contains their game name to move from one game to -->
<!-- another, or the Dunn Wright Inn. Try to keep the names and class lines to -->
<!-- 20 characters wide or less. Complicated strings like class 1<br>class 2 -->
<!-- can be used to do multiline class displays. -->
{{Char_Info_DIV
|Picture_filename=Kalgor.jpg
.............Defaults to Placeholder_other.png
|Friendly_Name=Kalgor
....................Defaults to PageName before the (
|Player=Satin Knights
.......................Defaults to PageName inside ()
|class_and_level=Mutt 4
....................Defaults to "unknown level"
}}
I have been appending that block to the Basic Information block so it is easy to keep the class_and_level field updated. After the initial setup, the class_and_level is the only field that should be changing as a character levels.
The character is then added to a category of "Game Name". In my case the category is "Crypt of the Everflame". If the character sheet block doesn't exist, most of the fields are guessed and defaulted.
Each of the named game categories have to be a sub category of the Games category. (Yep, this is part of the convoluted one time setup stuff.) And the new category names are not showing in the ajax popups for selecting. That may just be a caching issue.
After all that, the page builds dynamically. It is taking 9-10 preprocessor calls per character to run. Considering that the limit is 1 million calls before the script stalls, we are being very good regarding cpu load on the server.
Several fields are defaulted if they don't exist, but there are still several ways to get "weird and funky" results for the page. Wiki code is the ugliest mess I have ever tried to code in.
So, before I go edit 50 some characters, is there anything else that people want the Adventures page to display?