Talk:Bows

From The Cataclysm: Dark Days Ahead Wiki
Jump to navigation Jump to search

dispersion column

The Dispersion column seems to be off by a factory of 10. And where is it pulling values from?

It is pulled from the item pages, either the 'dispersion' or 'accuracy' value. See Template:Row/Firearms1. It does this (sorry for it being unreadable):
<td style="border: 1px solid #aaa; padding: 0.2em 0.5em; color: {{#ifexpr: {{{dispersion|0}}} > 0 or {{{accuracy|0}}} > 0 |darkred|{{#ifexpr: {{{dispersion|0}}} < 0 or {{{accuracy|0}}} < 0 |darblue|lightgray}}}}"> {{#ifexpr:{{{dispersion|0}}}>0 or {{{accuracy|0}}}>0|+}}{{{dispersion|}}}{{{accuracy|}}} </td>
It is off by a factor ten in some items because you need to use either accuracy or dispersion, and not both. If you look at the Compound bow (low) you can see it has both accuracy=0 and dispersion=155. Which the script above just prints after each other in a <dispersion><accuracy> way. Easy mistake to make btw. I have no idea what half the fields do myself. --Soyweiser (talk) 01:23, 30 March 2019 (UTC)
There, fixed now, if there is a dispersion value, and an accuracy value, it only shows dispersion, not accuracy. --Soyweiser (talk) 01:43, 30 March 2019 (UTC)