- v50 information can now be added to pages in the main namespace. v0.47 information can still be found in the DF2014 namespace. See here for more details on the new versioning policy.
- Use this page to report any issues related to the migration.
Difference between revisions of "Template talk:Creaturelookup/0"
(→Category suggestions: new section) |
|||
(15 intermediate revisions by 5 users not shown) | |||
Line 9: | Line 9: | ||
These are a few ideas I had for categorizing creatures, which could probably be implemented in this template (but I'm not exactly sure how). I'll leave them here in case someone else has better ideas on how to implement them. | These are a few ideas I had for categorizing creatures, which could probably be implemented in this template (but I'm not exactly sure how). I'll leave them here in case someone else has better ideas on how to implement them. | ||
I'm putting these in their own section to make it easier to add new ones. --{{User:Lethosor/sig}} 02:14, 27 February 2013 (UTC) | I'm putting these in their own section to make it easier to add new ones. --{{User:Lethosor/sig}} 02:14, 27 February 2013 (UTC) | ||
+ | |||
+ | :The problem I have with adding categories that depend on /raw information is that they will turn out exactly like [[:Category:DF2012:Flying]]; that is, mostly empty and non-functional. I specifically did not create categories for [http://dwarffortresswiki.org/index.php?title=Template:Attrib_proc&diff=prev&oldid=181612 my recent additions] to creature attributes because I believe non-functional categories reflect poorly on the wiki. That being said, creating an administrative category for [[:Category:DF2012:Incomplete butchering returns|incomplete butchering returns]] shouldn't cause any problems. A "quick-link" to creature variations is an interesting idea, but significantly more difficult to implement. I will try to think of an acceptable way to handle variation information. --[[User:Loci|Loci]] 20:32, 27 February 2013 (UTC) | ||
+ | |||
+ | :: About the quick-links for variations - I thought of searching for <code>[APPLY_CREATURE_VARIATION]</code>, but I'm not even sure if it would be visible to a template - see the aardvark man raws, for example. If it's possible, a creature with that tag would provide an easy reference to the base creature (but it wouldn't be so easy to look up creatures that inherit from the base creature). --{{User:Lethosor/sig}} 21:29, 27 February 2013 (UTC) | ||
+ | |||
+ | :: I tried making a rudimentary page at [[:Template:Creature/variation links]]. My idea was to extract the name of the base creature (since no creature variations that I know of change base names), using [http://en.wikipedia.org/wiki/Template:Remove_first_word this template] as an example, but it seems that this wiki doesn't support <code>#invoke</code> (or several other useful parser functions). I intended to have the template parse out the creature name, then include a secondary template which would simply display the links. Do you happen to know of any alternatives for string processing like this? --{{User:Lethosor/sig}} 22:57, 27 February 2013 (UTC) | ||
+ | |||
+ | ::I was apparently mistaken about butchering returns. The Creaturelookup template uses logic to disable butchering returns for [[DF2012:Learns|intelligent]] creatures, which is determined by processing the /raw values. That means the [[:Category:DF2012:Incomplete butchering returns|incomplete butchering returns category]] automatically includes those creatures which should have been excluded as non-butcherable. Adding "contrib=no" to these creatures will still remove them from the category, but that's a lot of extra work for no appreciable gain. --[[User:Loci|Loci]] 20:39, 27 February 2013 (UTC) | ||
+ | |||
+ | :::My original thought was that, because animalmen inherit the NOT_BUTCHERABLE tag from their base creature, it wouldn't show up when searched for, but [[nightwing]], a normal creature, appears in the category. Another interesting observation: the raws on [[aardvark man]] are different than the ones on [[DF2012:Aardvark man/raw]] - the latter ''includes'' the inherited tags. I honestly don't know why, since the gamedata template doesn't seem to call #df_raw anywhere. In any case, it turns out creature'''info''' is what places contrib=yes pages into a category. This is even more confusing, since it looks like the category should only be included when the contribution message appears, which is not the case with [[aardvark man]]. --{{User:Lethosor/sig}} 21:20, 27 February 2013 (UTC) | ||
+ | :::: On second glance, it also turns out that you added that category, so I guess you would know about it. --{{User:Lethosor/sig}} 21:29, 27 February 2013 (UTC) | ||
+ | :::: I managed to track down [[:Template:Variation raw]], which uses <code>no_decode</code> to prevent expanding creature variations. I guess that's a relief, since it means both the un-expanded and expanded raws are accessible. --{{User:Lethosor/sig}} 21:36, 27 February 2013 (UTC) | ||
+ | |||
+ | ::::Right. When '''you''' view [[aardvark man]] you don't see the "contrib" message because the Creaturelookup template sets "death=nobutcher" based on certain values in the /raws, then the CreatureInfo template suppresses the "contrib" message because "death=nobutcher". When '''the automated update process''' views [[aardvark man]], though, the /raws are not accessible, so the "death=nobutcher" line is not included, so the "contrib" message (and associated category) ''are'' included. This is the exact same bug that affects every other category that depends on information from the /raws. --[[User:Loci|Loci]] 21:15, 3 March 2013 (UTC) | ||
+ | |||
+ | ===Suggested categories=== | ||
* Pages missing butchering returns entirely: there isn't an easy way to find all pages that lack butchering information. Most "tattered" creature pages don't have butchering returns, but some do, and some that don't have it are rated higher than "tattered". Of course, this category shouldn't include animalmen, or other creatures that can't be butchered. It seems like checking for a single body part would do the trick, but [[jackal]]s don't seem to produce hearts. [[Rabbit]]s only produce a skull (which might work, but a few creatures might not even produce that - I'll have to check). | * Pages missing butchering returns entirely: there isn't an easy way to find all pages that lack butchering information. Most "tattered" creature pages don't have butchering returns, but some do, and some that don't have it are rated higher than "tattered". Of course, this category shouldn't include animalmen, or other creatures that can't be butchered. It seems like checking for a single body part would do the trick, but [[jackal]]s don't seem to produce hearts. [[Rabbit]]s only produce a skull (which might work, but a few creatures might not even produce that - I'll have to check). | ||
* My feeble attempt on [[:Category:DF2012:Hermaphrodite]] could use a little work (if you're wondering, they're basically creatures without a male and female caste, so they can't reproduce). I know there are more than the 2 I bothered to mark, and if we integrate it here we could delete the template I created to cover it. | * My feeble attempt on [[:Category:DF2012:Hermaphrodite]] could use a little work (if you're wondering, they're basically creatures without a male and female caste, so they can't reproduce). I know there are more than the 2 I bothered to mark, and if we integrate it here we could delete the template I created to cover it. | ||
* This is probably unrelated to attributes, but quick access to creature variations (giant, animalman, etc) could be useful in some cases. They're hard to find in the creature template, and it's especially hard when the base creature is a vermin (although in that case it uses vermininfo instead, which makes it a lot harder to set up links between creatures since they use different templates. Using a separate template to look up creature variations given a creature name could work, similar to [[:Template:Tame attrib proc]].) | * This is probably unrelated to attributes, but quick access to creature variations (giant, animalman, etc) could be useful in some cases. They're hard to find in the creature template, and it's especially hard when the base creature is a vermin (although in that case it uses vermininfo instead, which makes it a lot harder to set up links between creatures since they use different templates. Using a separate template to look up creature variations given a creature name could work, similar to [[:Template:Tame attrib proc]].) | ||
* Adding a category for creatures with <code>contrib=yes</code> would make it easier to track down pages that need more information (this is probably the easiest, just adding a simple <code><nowiki>{{#if:{{{contrib}}}| {{Category|Incomplete butchering returns}}}}</nowiki></code> should do the trick, but I'm not sure if it should be added on this template or under creatureinfo. Also, while I would prefer to use the category template to split the category into namespaces, using a link might be preferable in a few cases which I have yet to discover). | * Adding a category for creatures with <code>contrib=yes</code> would make it easier to track down pages that need more information (this is probably the easiest, just adding a simple <code><nowiki>{{#if:{{{contrib}}}| {{Category|Incomplete butchering returns}}}}</nowiki></code> should do the trick, but I'm not sure if it should be added on this template or under creatureinfo. Also, while I would prefer to use the category template to split the category into namespaces, using a link might be preferable in a few cases which I have yet to discover). | ||
+ | |||
+ | == interwiki == | ||
+ | |||
+ | Please add <nowiki>{{interwiki|{{FULLPAGENAME}}}}</nowiki> as in Template:Plantlookup/aux. It should make possible to jump (back) to the russian version... (Maybe it's not the best place for it?). --[[User:Aklad|Aklad]] ([[User talk:Aklad|talk]]) 20:57, 17 January 2014 (UTC) | ||
+ | :I added the interwiki template to the {{tl|creaturedesc}} template instead--the interwiki links should still automatically appear on creature pages, and this template is already excessively complex.--[[User:Loci|Loci]] ([[User talk:Loci|talk]]) 20:28, 22 January 2014 (UTC) | ||
+ | ::Thanks! --[[User:Aklad|Aklad]] ([[User talk:Aklad|talk]]) 07:11, 23 January 2014 (UTC) | ||
+ | |||
+ | == Masterwork mod == | ||
+ | |||
+ | Hi there, | ||
+ | I've been trying to add data to animal pages from the mod. Since the mod changed the butchered items (no spleen, sweetbread, lungs etc - but wool, pelt etc added), I was wondering whether it is possible to alter the template to adjust to those changes. I tried simply adding/deleting certain categories but the preview still shows the old ones. Any ideas?--[[User:Afghani84|Afghani84]] ([[User talk:Afghani84|talk]]) 09:40, 5 February 2014 (UTC) | ||
+ | |||
+ | :Seems to work for me. Note that the same template is used across all the pages; you should not remove things from the template itself. Simply add the necessary items to the template invocation on the specific masterwork creature page, like so: | ||
+ | |||
+ | ::<nowiki>{{Creaturelookup/0 | ||
+ | |fat=20-32 | ||
+ | |eye=2 | ||
+ | |lung=6-8 | ||
+ | |heart=1-2 | ||
+ | |intestine=9-13 | ||
+ | |kidney=2-4 | ||
+ | |brain=3-4 | ||
+ | |meat=45-156 | ||
+ | |tooth=1 | ||
+ | |horn=2 | ||
+ | |bone=40-48 | ||
+ | |skin=hide | ||
+ | |skull=1 | ||
+ | |contrib=yes | ||
+ | |wiki=yes | ||
+ | }}</nowiki> | ||
+ | |||
+ | :Removing those items which don't exist, and adding any other items. The results should appear correctly when you preview the creature's page. If there's a specific creature you're having trouble with, go ahead and edit it so I can see what's going wrong.--[[User:Loci|Loci]] ([[User talk:Loci|talk]]) 20:26, 5 February 2014 (UTC) | ||
+ | |||
+ | ::I believe Afghani84 was looking for a way to add additional parameters. It can be done in this template (it's probably best to just pass additional parameters to {{tl|CreatureInfo Masterwork}}). I'm not sure how {{{pelt}}} and {{{wool}}} would work - it would be easiest to treat them the same way as {{{scale}}} (by passing them to {{{skin}}}), but that means they could also be used on vanilla pages where they shouldn't exist. —[[User:Lethosor|<span style="color:#074">Lethosor</span>]] ([[User talk:Lethosor|<span style="color:#092">talk</span>]]) 20:44, 5 February 2014 (UTC) | ||
+ | |||
+ | :::Wool should already be supported--see [[sheep]]. Pelt would probably make sense as a value for skin, but I'm not familiar with the masterwork mod. It could also just be added as a separate value; it simply wouldn't be used in vanilla. --[[User:Loci|Loci]] ([[User talk:Loci|talk]]) 21:21, 5 February 2014 (UTC) | ||
+ | |||
+ | |||
+ | == Strange behavior == | ||
+ | |||
+ | * [[Masterwork:Moose]] does not render. Possibly other pages as well? | ||
+ | |||
+ | * Masterwork creature pages have a purple background behind the creature name. (ex: [[Masterwork:Black piranha]]). Verminlookup does not have this problem (and verminlookup is the template being used for [[Masterwork:Dwarf]] for some reason. [[User:VengefulDonut|VengefulDonut]] ([[User talk:VengefulDonut|talk]]) 20:37, 25 July 2014 (UTC) | ||
+ | |||
+ | :*Since so many of the masterwork creature pages are missing anyway, I'll just assume nobody cares about getting this to work over there. [[User:VengefulDonut|VengefulDonut]] ([[User talk:VengefulDonut|talk]]) 21:37, 25 July 2014 (UTC) |
Latest revision as of 21:37, 25 July 2014
Alternative arguments[edit]
Hey, Loci and other editors. I noticed that the game uses intestines
while this template uses intestine
. Also, gizzard
in DF is called gizzard_stone
in this template. Based on this page, it looks like alternative but identical arguments can be implemented like this:
{{{arg1 | {{{arg2|default}}} }}}
I would go in and edit it, but I'm not as experienced with this template and I'd probably miss something or break the template. Also, editing it has a nasty tendency to clear categories like this, so I'm reluctant to make a change like this myself. Do you think we should allow alternative arguments like this or just keep the template the way it is? --Lethosor (talk) 22:09, 18 February 2013 (UTC)
- That certainly seems reasonable, and it would help make the template less "fiddly" when people try to add butchering returns. Unless anybody objects feel free to add this in, or I can make this change the next time I modify the template. I would like to note, however, that "gizzard" and "gizzard_stone" are two different things: a gizzard stone is a piece of rock stored in a gizzard (organ) for grinding food or ballast. Not all creatures with gizzards will have gizzard stones, so those two should be kept separate. --Loci 19:59, 19 February 2013 (UTC)
Category suggestions[edit]
These are a few ideas I had for categorizing creatures, which could probably be implemented in this template (but I'm not exactly sure how). I'll leave them here in case someone else has better ideas on how to implement them. I'm putting these in their own section to make it easier to add new ones. --Lethosor (talk) 02:14, 27 February 2013 (UTC)
- The problem I have with adding categories that depend on /raw information is that they will turn out exactly like Category:DF2012:Flying; that is, mostly empty and non-functional. I specifically did not create categories for my recent additions to creature attributes because I believe non-functional categories reflect poorly on the wiki. That being said, creating an administrative category for incomplete butchering returns shouldn't cause any problems. A "quick-link" to creature variations is an interesting idea, but significantly more difficult to implement. I will try to think of an acceptable way to handle variation information. --Loci 20:32, 27 February 2013 (UTC)
- About the quick-links for variations - I thought of searching for
[APPLY_CREATURE_VARIATION]
, but I'm not even sure if it would be visible to a template - see the aardvark man raws, for example. If it's possible, a creature with that tag would provide an easy reference to the base creature (but it wouldn't be so easy to look up creatures that inherit from the base creature). --Lethosor (talk) 21:29, 27 February 2013 (UTC)
- About the quick-links for variations - I thought of searching for
- I tried making a rudimentary page at Template:Creature/variation links. My idea was to extract the name of the base creature (since no creature variations that I know of change base names), using this template as an example, but it seems that this wiki doesn't support
#invoke
(or several other useful parser functions). I intended to have the template parse out the creature name, then include a secondary template which would simply display the links. Do you happen to know of any alternatives for string processing like this? --Lethosor (talk) 22:57, 27 February 2013 (UTC)
- I tried making a rudimentary page at Template:Creature/variation links. My idea was to extract the name of the base creature (since no creature variations that I know of change base names), using this template as an example, but it seems that this wiki doesn't support
- I was apparently mistaken about butchering returns. The Creaturelookup template uses logic to disable butchering returns for intelligent creatures, which is determined by processing the /raw values. That means the incomplete butchering returns category automatically includes those creatures which should have been excluded as non-butcherable. Adding "contrib=no" to these creatures will still remove them from the category, but that's a lot of extra work for no appreciable gain. --Loci 20:39, 27 February 2013 (UTC)
- My original thought was that, because animalmen inherit the NOT_BUTCHERABLE tag from their base creature, it wouldn't show up when searched for, but nightwing, a normal creature, appears in the category. Another interesting observation: the raws on aardvark man are different than the ones on DF2012:Aardvark man/raw - the latter includes the inherited tags. I honestly don't know why, since the gamedata template doesn't seem to call #df_raw anywhere. In any case, it turns out creatureinfo is what places contrib=yes pages into a category. This is even more confusing, since it looks like the category should only be included when the contribution message appears, which is not the case with aardvark man. --Lethosor (talk) 21:20, 27 February 2013 (UTC)
- On second glance, it also turns out that you added that category, so I guess you would know about it. --Lethosor (talk) 21:29, 27 February 2013 (UTC)
- I managed to track down Template:Variation raw, which uses
no_decode
to prevent expanding creature variations. I guess that's a relief, since it means both the un-expanded and expanded raws are accessible. --Lethosor (talk) 21:36, 27 February 2013 (UTC)
- My original thought was that, because animalmen inherit the NOT_BUTCHERABLE tag from their base creature, it wouldn't show up when searched for, but nightwing, a normal creature, appears in the category. Another interesting observation: the raws on aardvark man are different than the ones on DF2012:Aardvark man/raw - the latter includes the inherited tags. I honestly don't know why, since the gamedata template doesn't seem to call #df_raw anywhere. In any case, it turns out creatureinfo is what places contrib=yes pages into a category. This is even more confusing, since it looks like the category should only be included when the contribution message appears, which is not the case with aardvark man. --Lethosor (talk) 21:20, 27 February 2013 (UTC)
- Right. When you view aardvark man you don't see the "contrib" message because the Creaturelookup template sets "death=nobutcher" based on certain values in the /raws, then the CreatureInfo template suppresses the "contrib" message because "death=nobutcher". When the automated update process views aardvark man, though, the /raws are not accessible, so the "death=nobutcher" line is not included, so the "contrib" message (and associated category) are included. This is the exact same bug that affects every other category that depends on information from the /raws. --Loci 21:15, 3 March 2013 (UTC)
Suggested categories[edit]
- Pages missing butchering returns entirely: there isn't an easy way to find all pages that lack butchering information. Most "tattered" creature pages don't have butchering returns, but some do, and some that don't have it are rated higher than "tattered". Of course, this category shouldn't include animalmen, or other creatures that can't be butchered. It seems like checking for a single body part would do the trick, but jackals don't seem to produce hearts. Rabbits only produce a skull (which might work, but a few creatures might not even produce that - I'll have to check).
- My feeble attempt on Category:DF2012:Hermaphrodite could use a little work (if you're wondering, they're basically creatures without a male and female caste, so they can't reproduce). I know there are more than the 2 I bothered to mark, and if we integrate it here we could delete the template I created to cover it.
- This is probably unrelated to attributes, but quick access to creature variations (giant, animalman, etc) could be useful in some cases. They're hard to find in the creature template, and it's especially hard when the base creature is a vermin (although in that case it uses vermininfo instead, which makes it a lot harder to set up links between creatures since they use different templates. Using a separate template to look up creature variations given a creature name could work, similar to Template:Tame attrib proc.)
- Adding a category for creatures with
contrib=yes
would make it easier to track down pages that need more information (this is probably the easiest, just adding a simple{{#if:{{{contrib}}}| {{Category|Incomplete butchering returns}}}}
should do the trick, but I'm not sure if it should be added on this template or under creatureinfo. Also, while I would prefer to use the category template to split the category into namespaces, using a link might be preferable in a few cases which I have yet to discover).
interwiki[edit]
Please add {{interwiki|{{FULLPAGENAME}}}} as in Template:Plantlookup/aux. It should make possible to jump (back) to the russian version... (Maybe it's not the best place for it?). --Aklad (talk) 20:57, 17 January 2014 (UTC)
- I added the interwiki template to the {{creaturedesc}} template instead--the interwiki links should still automatically appear on creature pages, and this template is already excessively complex.--Loci (talk) 20:28, 22 January 2014 (UTC)
Masterwork mod[edit]
Hi there, I've been trying to add data to animal pages from the mod. Since the mod changed the butchered items (no spleen, sweetbread, lungs etc - but wool, pelt etc added), I was wondering whether it is possible to alter the template to adjust to those changes. I tried simply adding/deleting certain categories but the preview still shows the old ones. Any ideas?--Afghani84 (talk) 09:40, 5 February 2014 (UTC)
- Seems to work for me. Note that the same template is used across all the pages; you should not remove things from the template itself. Simply add the necessary items to the template invocation on the specific masterwork creature page, like so:
- {{Creaturelookup/0 |fat=20-32 |eye=2 |lung=6-8 |heart=1-2 |intestine=9-13 |kidney=2-4 |brain=3-4 |meat=45-156 |tooth=1 |horn=2 |bone=40-48 |skin=hide |skull=1 |contrib=yes |wiki=yes }}
- Removing those items which don't exist, and adding any other items. The results should appear correctly when you preview the creature's page. If there's a specific creature you're having trouble with, go ahead and edit it so I can see what's going wrong.--Loci (talk) 20:26, 5 February 2014 (UTC)
- I believe Afghani84 was looking for a way to add additional parameters. It can be done in this template (it's probably best to just pass additional parameters to {{CreatureInfo Masterwork}}). I'm not sure how {{{pelt}}} and {{{wool}}} would work - it would be easiest to treat them the same way as {{{scale}}} (by passing them to {{{skin}}}), but that means they could also be used on vanilla pages where they shouldn't exist. —Lethosor (talk) 20:44, 5 February 2014 (UTC)
Strange behavior[edit]
- Masterwork:Moose does not render. Possibly other pages as well?
- Masterwork creature pages have a purple background behind the creature name. (ex: Masterwork:Black piranha). Verminlookup does not have this problem (and verminlookup is the template being used for Masterwork:Dwarf for some reason. VengefulDonut (talk) 20:37, 25 July 2014 (UTC)
- Since so many of the masterwork creature pages are missing anyway, I'll just assume nobody cares about getting this to work over there. VengefulDonut (talk) 21:37, 25 July 2014 (UTC)