'csheet_fantasy_spellbook' Spell book adds dummy entry

Description

Printing out my known spells to the d20\fantasy\pdf\csheet_fantasy_spellbook.fo adds a 'dummy' entry to the end of the list (showing last two entries for comparison):

This was for a Illusionist with 3 additional Innate spells, and only 1st level spells known (but with additional spell books containing extra 1st level spells) if that helps.

Unseen Servant
Conjuration (Creation)
Level: Brd1, Sor1, Wiz1
Components: V, S, M
Casting Time: 1 standard action
Range: Close (30 ft.)
Target: One invisible, mindless, shapeless
servant
Duration: 2 hours
Saving Throw: None
Spell Resistance: No
Effect: Invisible force obeys your commands.
PHB35e, P.297
0.0
0.0
Level: 0.0
Components: 0.0
Casting Time: 0.0
Range: 0.0
Target: 0.0
Duration: 0.0
Saving Throw: 0.0
Spell Resistance: 0.0
Effect: 0.0
0.0
3

Environment

None

Activity

Show:
Andrew Maitland
November 3, 2012, 12:17 AM

I can replicate it with the provided character, with a typical character I create, I don't get the problem. Isolating the issue is taking time.

Andrew Maitland
November 5, 2012, 1:09 PM

James - I've looked at the PCG, and I'm not seeing anything abnormal. I'm guessing there is something code is sending to make the count off. When you have a few minutes.

James Dempsey
November 5, 2012, 4:53 PM

It looks like inline FOR is not short cutting the loop when used with the SPELLMEM token. The docs do say it should but I suspect this has never worked with this combo.

This inline FOR syntax is hideous and I don't propose to fix it unless we decide not to go ahead with the FreeMarker exporting.

In the meantime this can be improved slightly on the OS side. The line starting

FOR.0,COUNT[SPELLSKNOWN],1,
should be

FOR.0,COUNT[SPELLSKNOWN]-1,1,
to improve the output in simple cases, however this will likely not help when COUNT[SPELLSKNOWN] does not match the index of SPELLMEM as is likely to be the case in the original example.

Note: The use of -1 in the SPELLMEM spellbook number is no longer supported.

Andrew Maitland
November 5, 2012, 5:11 PM

I don't know why, but the -1 in the SPELLMEM works. I'll be happy when we move to Freemarker.

Andrew Maitland
July 22, 2014, 7:42 PM

Fixed quite some time ago, never closed the tracker though.

Assignee

Andrew Maitland

Reporter

Dave Griffin

Labels

None

Epic/Theme

None

Pending User Input

None

Components

Fix versions

Affects versions

Priority

Minor
Configure