Weapon Loop fails to correctly output weapon

Description

Exporting to "csheet_InitTool_1.0.b23.rpgrp" format seems to neglect including weapon damage.

For example, a character with a simple battleaxe is being exported as:
<attack>
Battleaxe:
</attack>

Environment

Win7 x64

Activity

Show:
Andrew Maitland
June 12, 2014, 5:14 PM

Battleaxe alone is broken, bastard sword added gives a 'null' attack. Something is definitely broken. Might need Code help -

Scott Geertgens
June 12, 2014, 6:33 PM

Thanks for continuing to look into it. I was actually getting the same issue with a short sword, so didn't realize it might be a small subset of weapons!

James Dempsey
June 15, 2014, 6:42 AM

ok, this is due to the ,1 at the end of the weapon loop:

That instructs PCGen to abort the loop when a token advises it that there are no more items in the loop. Technically it exits the loop once it has finished the line it is working on. Changing the 1 to 0 fixes the issue.

The old FOR looping is nasty. If there are further issues I would recommend switching the sheet to FreeMarker.

Andrew Maitland
June 15, 2014, 8:38 PM

Fix applied as per James astute catch. Thanks James!

Andrew Maitland
June 15, 2014, 8:39 PM

- I'm not familiar with the process of switching to freemarker, you available to instruct?

Thanks!

Assignee

Andrew Maitland

Reporter

Scott Geertgens

Labels

None

Epic/Theme

None

Pending User Input

None

Fix versions

Affects versions

Priority

Minor
Configure