PDA

View Full Version : How to get the 4e parser to recognize tokens?



Craw
October 13th, 2009, 04:53
After playing with the parser a bit, I have figured out how to scrape a book off of the compendium and parse it into the library. However, I'm failing to get it to recognize tokens. I have (I believe) the correctly named token in the token file and have directed the parser to that directory i.e. (me)\appdata\roaming\Fantasy Grounds II\tokens\monster manual\Dire Rat.png

The Parsing results include a line that says "Copying token - C:\Users\Robert\AppData\Roaming\Fantasy Grounds II\tokens\Monster Manual\dire rat.png"

When I open FG, the Monster Manual is in the library, the dire rat is in the monster manual, the dire rat token is in the token box, but the dire rat entry does not show a token.

What am I missing?

EDIT: I tried this process again, just to make sure I hadn't missed a step and sure enough, there was the token. Now my question is about adding tokens as I go. Do I have to reparse the entire file whenever I add a new token or is there a way to edit the xml to get it to recognize tokens added after the fact?

EugeneZ
October 13th, 2009, 13:54
Ooookay, couple things here:

1) You probably don't want to point the parser directly at your tokens directory in FG2. Maybe that was why you didn't see the token initially... the tokens are copied into the module, so the source tokens aren't actually needed any more. In other words, just use a token directory somewhere else, where FG2 can't see it. Maybe there was some sort of conflict with the folder name? I doubt it but you never know.

2) By default, all monsters parsed are pointed to a token. For example, if your token dir is "/my/token/dir" and your monster is Dire Rat, by default the monster will use "/my/token/dir/dire rat.png". Meaning the lowercased PNG in that folder, even if it's not there.

3) So that means that you do NOT have to reparse to add tokens. I see you are parsing the Monster Manual, so this procedure was invaluable to me when I did the same thing, since I'm constantly adding tokens to my Monster Manual. Simply rename the token to the lowercase'd version of the monster's name, then use WinZip to open the .mod file. Inside there will be a tokens directory. Drop your token in there and winzip will add it to the archive. Done. You'll need to unload and reload your module for it to take effect.

Craw
October 13th, 2009, 15:37
Thanks. I'll will definetly take the advice about moving the tokens into a folder where FG doesn't see them, as token spam seems to crop up from a dozen different sources...