STAR TREK 2d20
Page 5 of 25 First ... 3456715 ... Last
  1. #41

    Join Date
    Feb 2016
    Location
    North San Diego County
    Posts
    158
    FWIW I just (before I have to run out) slapped CreatureGen into my extensions folder and had the same issue: I needed to have the uncompressed folder and not a zip renamed to ext for it to be read by FG.

    If it matters, my OS is Win10 Pro x64 and I use 7zip (zipping files, not 7zipping or anything) for compression.

    I can diagnose more later if there's anything else which is of interest, but I'm going to go grab my kids.
    Corwynn Maelstrom (a.k.a. Mathew)
    Ultimate License
    Presently developing an unannounced RPG

    Gaming since '80 (starting with Holmes D&D)—hardened veteran...get off my lawn!

  2. #42
    Wow. I don't play Pathfinder, but, nonetheless, I have to take a moment to applaud what you've done here. Very impressive.
    Ultimate License Holder GM

    Games currently Playing: AD&D, DCC RPG and D&D 5e

    Finished Projects: AD&D Ruleset
    New School NPC Maker 5E
    New School NPC Maker PFRPG - 3.5E
    Old School NPC Maker

    Current Projects:

    1) Adventure Module.
    2) Maintaining and improving released projects.
    3) C.O.O.L. Beasts
    4) Basic Fantasy Ruleset
    5) Metamorphosis Alpha Ruleset

  3. #43
    So, I have found the problem I am having with the spell parser. It is a combination of the parsing algorithm and the character set. The parser is programmed to recognize the start of a spell list by looking for two dashes as the divider between the spell level description (e.g. "8th") and the spell list, for example: 8th -- fire storm (DC 25), unholy aura D (DC 25)

    The issue I have is that the copy-paste of the source material is resulting in a single, long dash character as the separator: 8th—fire storm (DC 25), unholy aura D (DC 25). The parser does not recognize the character and therefore does not parse the spells. I fixed this by adding a line of code in the "stripString" function that replaces occurrences of the long-dash character with the two single dashes that the parser wants to see:

    data = data:gsub('& #151;','--');

    Note that there is no space between the & and # in the actual code. I had to put a space in here to prevent the forum from interpreting it as a character code.
    Last edited by KevenSimmons; October 28th, 2016 at 00:12.
    If you're not having fun, then you're not doing it right.

  4. #44
    damned's Avatar
    Join Date
    Mar 2011
    Location
    Australia
    Posts
    26,684
    Blog Entries
    1
    Quote Originally Posted by corwynn View Post
    FWIW I just (before I have to run out) slapped CreatureGen into my extensions folder and had the same issue: I needed to have the uncompressed folder and not a zip renamed to ext for it to be read by FG.

    If it matters, my OS is Win10 Pro x64 and I use 7zip (zipping files, not 7zipping or anything) for compression.

    I can diagnose more later if there's anything else which is of interest, but I'm going to go grab my kids.
    make sure you are only rezipping the following

    .gitignore
    \cgen
    CONTRIBUITORS
    extension.xml
    LICENSE
    README.md

    and rename .zip as .ext

  5. #45
    Quote Originally Posted by KevenSimmons View Post
    So, I have found the problem I am having with the spell parser. It is a combination of the parsing algorithm and the character set. The parser is programmed to recognize the start of a spell list by looking for two dashes as the divider between the spell level description (e.g. "8th") and the spell list, for example: 8th -- fire storm (DC 25), unholy aura D (DC 25)

    The issue I have is that the copy-paste of the source material is resulting in a single, long dash character as the separator: 8th—fire storm (DC 25), unholy aura D (DC 25). The parser does not recognize the character and therefore does not parse the spells. I fixed this by adding a line of code in the "stripString" function that replaces occurrences of the long-dash character with the two single dashes that the parser wants to see:

    data = data:gsub('& #151;','--');

    Note that there is no space between the & and # in the actual code. I had to put a space in here to prevent the forum from interpreting it as a character code.
    Good catch on that unicode. When I copy/paste the same stat-block, I get unicode u2014 (which is handled) as opposed to the entity so it never appeared my testing. I've committed your change and added you to the CONTRIBUITORS file for the bug find.

    I was occupied IRL so i couldn't look at it earlier, I'm glad that reading through the LUA was helpful. I tend to write self-documenting code so others can read it, comes from doing a bunch of FOSS.

    Those who want the update can re-download the extension from git hub.


    PS: Regarding the folder shenanigans, once you download from git hub, you get a zip with a folder CreatureGen-master inside. Extract that folder, then re-zip just that folder such that when you browse in the zip you see the CONTRIBUTORS and LICENSE file at the root, and rename that new zip creaturegen.ext. I could simply package it and constantly update the main topic but I feel like the few hoops that need to be jumped once help shake the download and forget mindset. Also you could just leave the uncompressed folder (which I do) if you want to edit the script and mod the extension. In that event /reload ruleset and /console as a hotbar item is a neat way to quickly iterate on additions.
    Last edited by Ken L; October 28th, 2016 at 00:46.

  6. #46

    Join Date
    Feb 2016
    Location
    North San Diego County
    Posts
    158
    Yes, I read that, damned. I have done so and it is not recognized by FG.

    So, reboot, new download of the file, and it's now being recognized as a zip renamed to ext.

    I suspect it was one of those "windows has gone crazy" moments. *shrug*
    Last edited by corwynn; October 28th, 2016 at 00:55.
    Corwynn Maelstrom (a.k.a. Mathew)
    Ultimate License
    Presently developing an unannounced RPG

    Gaming since '80 (starting with Holmes D&D)—hardened veteran...get off my lawn!

  7. #47
    Has anyone tested this extension yet with FG v3.2 that was just released?
    If you're not having fun, then you're not doing it right.

  8. #48
    Quote Originally Posted by KevenSimmons View Post
    Has anyone tested this extension yet with FG v3.2 that was just released?
    Still works.

    There's an elusive bug I've noticed that when you have connected clients, it will fail to parse some unicode sometimes compared to when there are no connected clients. I haven't isolated it but if anyone can drop me a log of this occurring or isolate it, we can stamp this out.

    This comes up when I'm running a game and want to ad-hoc import a few creatures.

  9. #49
    Really stupid question... but after updating to 3.2 - how do you get the CreatureGen window to open. The button is no longer on the NPC window and I'm not having any luck finding it.
    If you're not having fun, then you're not doing it right.

  10. #50
    ddavison's Avatar
    Join Date
    Sep 2008
    Posts
    6,134
    Blog Entries
    21
    I just now came across this and I wanted to applaud you for the solution. I put together the statblock parser for the Advanced Bestiary as a kind of after thought and had some intentions of going back to it to add the spells and clean up a bit more of the areas where it failed. Embedded solutions are definitely a better for end users. One thing you might consider is to peek at the 5E ruleset and the spell look ups there. Those look across all open modules for the first matching spell name. The challenge with many of these parsers is that the stat blocks don't always conform 100% to the standard. Additionally, there are character issues where it looks great in print but they are actually slightly different characters being used.

    I've made a note to come back and take a look at the code and approach you used to see if there is something else I can contribute to your cause.

    Either way, we are always happy to welcome coders to the community here at FG, especially when they contribute great tools for the community to use.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
DICE PACKS BUNDLE

Log in

Log in