Topic on User talk:Dr. Strangelove

Jump to navigation Jump to search
Summary by Dr. Strangelove

I'll use XML tag names as params for Module invocations. It looks like the "transformations" will be done in Infobox code anyway. Problem circumvented.

Dr. Strangelove (talkcontribs)

If the current naming scheme for infobox parameters is to remain in effect - a list for translating them to XML names will have to be made.

<defName>                   |name = Hare
                            |image = Hare.png
<description>               |description = "This small, solitary herbivore can swiftly hop away from danger."
                            |type = Animals
                            |type2 = Wild
<baseBodySize>              |bodysize = 0.2
<baseHealthScale>           |healthscale = 0.4
                            |movespeed = 6.0
                            |attack1dmg = 3
                            |attack1type = bite
                            |attack1part = teeth
                            |attack1cool = 100
<leatherDef>                |leathername = lightleather
{calculated}                |leatheryield = 15
<manhunterOnTameFailChance>
<manhunterOnDamageChance>   |manhunter = 0.0125
<baseHungerRate>            |hungerrate = 0.23
<foodType>                  |diet = herbivorous
                            |trainable = none
<wildness>                  |wildness = 0.75
<gestationPeriodDays>       |gestation = 13
Dr. Strangelove (talkcontribs)

Looks like the same problem would apply to the values passed in as parameters for templates:

["foodType"] = "VegetarianRoughAnimal" |diet = herbivorous
Dr. Strangelove (talkcontribs)

The Curious Case of Names

A single piece of data is referred to by three names:

  1. original tag name in XML files
  2. property name used by Semantic
  3. name used by template parameter

So, example: manhunterOnDamageChance (XML tag) becomes Turn Manhunter Chance When Attacked (SMW property) which is set in a template by a parameter manhunter.

This is the way it is done, via an infobox template:

{{#if: {{{manhunter|}}}|{{#set:Turn Manhunter Chance When Attacked = {{{manhunter|}}} }}
;{{H:title|link=no|Chance of this animal turning manhunter when attacked.|Manhunter Chance}}

This would suggest that there is yet another piece of data associated with each name - tooltip. (Ignore those - very rare - not worth the effort.)

There seems to be no central "list" connecting all these together?