[Pathfinder] PDF sheet Ranged Values incorrect when Ammo is contained.


Missile weapons are showing up on the pdf output sheet as if they are Thrown weapons, and even then it appears that they are not calculating correctly. The character Sylovarian has an example of both a projectile weapon (shortbow) not displaying right on output and a thrown weapon (club) which is displaying correctly. A second character with a different projectile weapon provided for comparison. While I suppose it is possible to fling a crossbow, that's not what you usually do with it...


Win7 x64, PCGen 6.03.05 autobuild #85


Andrew Maitland
August 29, 2014, 8:20 PM

Verified issue. Trying to solve the issue.

Andrew Maitland
August 29, 2014, 8:23 PM

Okay, solved portion - the error lies whenever we attach Ammo. If we have no ammo, the values are correctly assigned.

Andrew Maitland
August 29, 2014, 8:34 PM

As far as I can tell, the Ranged isn't properly looping the Ammo values with the ranged values.

Line 1591 is the ammo section in blocks_weapon (common sheets); ../ammo/tohit

But the base.xml.ftl line 692-693 is where the value for the hit and damage are coming from. It's in an ammo loop, but I don't think the ammo loop is getting the loop from the above ranged loop... This is above my understanding to fix easily.

I can "fix" this by not taking ammo values, but this breaks anything that has bonuses, such as +5 Arrows... It appears we need to get the Ammo value, and then the ranged values need to loop in there as well... Does that mean we need another nested loop? This also affects distance since that is using the improper values of the range loop, not the ammo loop.

James Dempsey
September 4, 2014, 3:18 AM

The issue was that the xslt code was referring to the ammunition element in the weapon, not the one in each range which had the correct figures. I have corrected that.

I reckon the ammunition section in the xslt could be refactored back into the section above as there is little difference between the sections. However given the late stage I have chosen the safer path and just fixed the immediate issue.



James Dempsey


Timothy H. Ott, Sr.




Pending User Input



Fix versions

Affects versions