Template talk:Bestiarychart
From The Authentic D&D Wiki
Jump to navigationJump to searchDon't all the extra brackets just make it more of a pain to replace the data?
- The brackets simply tell MediaWiki what to place where. They are variable parameters. No replacement is necessary. Additionally, defaults can be provided: for instance, Special Attack defaults to None if the parameter is not supplied. We can also do more complex logic (leaving row out entirely, for instance) but I don't want to go that far yet. --Shelby038 (talk) 00:22, 13 February 2020 (UTC)
- sorry, that doesn't make complete sense. I can SEE the brackets. If I put information into the cell, don't I obviously cut the brackets first and then place the information? I don't like sounding like an idiot, but I don't understand the context of "default" in this instance. Nor "parameter." Nor "variable." These are words used with different meanings in about fifty thousand programs, so I have no idea what they mean HERE. As such, this is a totally useless information for me. It is clear you've spent a lot of time with wikipedia; I have not. Wikispaces did not have a tenth of these features and most just baffle me.
- Fair enough. The Template page itself merely shows the organization of the box. When it's actually used, you don't edit out the variables. Instead, you would type "name = Alpaca". The server then goes and looks at the template, sees that {{{name}}} is formatted like so, and substitutes "Alpaca" for you. See the code below (don't worry yet about how the blocks appear on this page)?
- sorry, that doesn't make complete sense. I can SEE the brackets. If I put information into the cell, don't I obviously cut the brackets first and then place the information? I don't like sounding like an idiot, but I don't understand the context of "default" in this instance. Nor "parameter." Nor "variable." These are words used with different meanings in about fifty thousand programs, so I have no idea what they mean HERE. As such, this is a totally useless information for me. It is clear you've spent a lot of time with wikipedia; I have not. Wikispaces did not have a tenth of these features and most just baffle me.
| Species | Camelid |
| No. Appearing | 4–10 |
| Behaviour | herd (loose) |
| Range | alpine |
| Size | 3 ft. at shoulder |
| Weight | 180 lbs. |
| Intelligence | 1 |
| Armour Class | 7 |
| Hit Dice | 1 |
| Action Points | 5 |
| Max. Stride | {{{stride}}} |
| THAC0 | 20 |
| Hp/Die | d8 |
| Attack Forms | hoof |
| Damage | 1–4 |
| Special Attacks | wark |
{{Bestiarychart
| name = Alpaca
| species = Camelid
| noapp = 4–10
| behaviour = herd (loose)
| range = alpine
| size = 3 ft. at shoulder
| weight = 180 lbs.
| int = 1
| AC = 7
| HD = 1
| AP = 5
| THAC0 = 20
| hpdie = d8
| attack = hoof
| dmg = 1–4
| special = wark
}}
- Now, suppose I am lazy or I only have partially researched this beast. So I type the following.
| Species | Camelid |
| No. Appearing | {{{noapp}}} |
| Behaviour | {{{behaviour}}} |
| Range | {{{range}}} |
| Size | {{{size}}} |
| Weight | {{{weight}}} |
| Intelligence | {{{int}}} |
| Armour Class | {{{AC}}} |
| Hit Dice | {{{HD}}} |
| Action Points | {{{AP}}} |
| Max. Stride | {{{stride}}} |
| THAC0 | {{{THAC0}}} |
| Hp/Die | {{{hpdie}}} |
| Attack Forms | {{{attack}}} |
| Damage | {{{dmg}}} |
| Special Attacks | None |
{{Bestiarychart
| name = Alpaca
| species = Camelid
}}
- I have not provided most of the information that the Template expects, so it has no information to replace the default text with.
- I apologize. I do have a bit more Wiki experience from some time ago, but here I'm drawing more on my programming experience. A parameter/variable is a changeable input to a program (which in this case is the template). A default, in this case, is what the program will use when no value is given to a parameter (as in the second example here). So in the case of the Special Attack parameter, I have told the program to type "None" when something specific is not given. Does this make a bit more sense? Sorry for the confusion. --Shelby038 (talk) 01:47, 13 February 2020 (UTC)