PDA

View Full Version : [PFRPG] CreatureLab (Revival of CreatureGen)



Lichtblitz
March 15th, 2022, 22:39
This is a fork of the original CreatureGen Extension (https://www.fantasygrounds.com/forums/showthread.php?34199-CreatureGen-Extension-Import-Stat-blocks-on-the-fly-with-populated-spells) that has been deleted by its creator since. Luckily, because of the original license, continuing the development is not an issue.

What is it?

You can copy stat blocks of creatures from websites, such as d20pfsrd (https://www.d20pfsrd.com/bestiary)
You can also copy stat blocks from Apps, such as Pathbuilder (https://play.google.com/store/apps/details?id=com.redrazors.pathbuilder&hl=en&gl=US)
Go to the NPC list and click the new "CLab"-button.
Paste the stat block into the text box and generate a new, filled-out NPC from it. That includes all values, spells from currently loaded modules and a few effects as well. The latter is still a work in progress.
Where can I find it?

You can find it in the FG Forge (https://forge.fantasygrounds.com/shop/items/558/view).
You can find it on GitHub (https://github.com/Lichtblitz/CreatureLab).


Where can I report bugs or request features?

Create an issue on GitHub (https://github.com/Lichtblitz/CreatureLab/issues). Do not forget to add the original text you have used to try and generate a creature in the case of a bug report


https://github.com/Lichtblitz/CreatureLab/raw/main/images/screenshot.png

Morenu
March 27th, 2022, 13:36
A second image showing Spell-Like Abilities and Spells Known layout of the stat block would be useful. (Since I cannot seem to get them to import, even using a d20pfsrd stat block for something like a lich does not work for me)

This tool seems to be exactly what I am looking for when it comes to creating the more complicated NPC's I want to use. But almost all of them are complicated because of needing the 'spells' populated.

Lichtblitz
March 28th, 2022, 21:12
A second image showing Spell-Like Abilities and Spells Known layout of the stat block would be useful. (Since I cannot seem to get them to import, even using a d20pfsrd stat block for something like a lich does not work for me)

This tool seems to be exactly what I am looking for when it comes to creating the more complicated NPC's I want to use. But almost all of them are complicated because of needing the 'spells' populated.

Sure thing. I took the Lich from d20pfsrd. You can start the text selection either from the heading "Lich CR 12" or from the description line directly above it. Just select the text all the way down to the final "Treasure" from the "Ecology" section. The extension will check all loaded modules for spells and within those will check all spells with the spell names as keys. There is no guarantee that the keys for the spells are stored in that layout. I recommend using (and loading!) the module "PFRPG - Spellbook". It's using the expected layout for the spells and contains handwritten effects, which are much, much more accurate than the automatically parsed effects:
https://forge.fantasygrounds.com/shop/items/414/view

It works with some other spell modules as well but is not guaranteed to work with every module out there. It would be a lot of effort to improve it further - effort that I don't feel is warranted with such great one-size-fits-all modules like the "PFRPG - Spellbook".

https://forge.fantasygrounds.com/images/6b5c51bc222d48c82ac8c36c8a70cc49.png

Morenu
March 28th, 2022, 22:30
I really appreciate the response. My issue was based around "PFRPG - Spellbook"....I had it but I never activated it in my module library. Whoops. That is why it was not loading any spells or spell like abilities.

I want to thank you for this revival of CreatureGen. This is something I had given up finding. I have a fairly long list of NPC's I need to create and been putting it off until the end of setting up my campaign in Fantasy Grounds. I find setting up spells and spell-like-abilities to be very time consuming when creating a NPC. This is going to make it a breeze!

Lichtblitz
March 29th, 2022, 18:32
I'm happy this extension is of value to you :-)
If you encounter any other issues down the line, just drop a few lines and I'll see what I can do.

dllewell
June 24th, 2022, 21:59
Great job Lichtblitz. This is coming in very handy for the module I am converting.

I have 1 suggestion and 1 issue.

Suggestion - Based on the number of subscribers PFRPG - Spellbook Extended (https://forge.fantasygrounds.com/shop/items/415/view) is used more than PFRPG - Spellbook. (https://forge.fantasygrounds.com/shop/items/414/view) Would it be possible to have the extension look for PFRPG - Spellbook Extended first and get the spell from there if that module is loaded and if not then check for PFRPG - Spellbook?

Issue - When copying data (in this case from a pdf) it doesn't seem to handle carriage returns. (See attached image for details.)
I assume that this affects all fields but the ones I have specifically seen it affect are - Type, SQ, SA, Feats, Skills.

https://www.fantasygrounds.com/forums/attachment.php?attachmentid=53284&d=1656104336


53284

Evilthorne
October 1st, 2022, 20:09
This is a great extension, honestly! Just one quick question How do you decipher the error log. I am trying to convert the allis from D20pfsrd and it keeps giving me a message.

54558

[0] (1) Allip

[0] (2) Contents [show]

[0] (3) Subpages

[0] (4) Variant Allip

[0] (5) This malignant cloud of shadows boils in the air, its skeletal maw eerily babbling as the creature's claws manifest from the darkness.

[0] (6) Allip CR 3

[0] (7) XP 800

[0] (8) CE Medium undead (incorporeal)

[0] (9) Init +5; Senses darkvision 60 ft.; Perception +7; Aura babble (60 ft., DC 15)

[0] (10) DEFENSE

[0] (11) AC 14, touch 14, flat-footed 13 (+3 deflection, +1 Dex)

[0] (12) hp 30 (4d8+12)

[0] (13) Fort +4, Ref +4, Will +4

[0] (14) Defensive Abilities channel resistance +2, incorporeal; Immune undead traits

[0] (15) OFFENSE

[0] (16) Speed fly 30 ft. (perfect)

[0] (17) Melee incorporeal touch +4 (1d4 Wisdom damage)

[0] (18) Special Attacks babble, touch of insanity

[0] (19) STATISTICS

[0] (20) Str --, Dex 12, Con --, Int 11, Wis 11, Cha 16

[0] (21) Base Atk +3; CMB +4; CMD 17

[0] (22) Feats Improved Initiative, Lightning Reflexes

[0] (23) Skills Fly +16, Intimidate +10, Perception +7, Stealth +8

[0] (24) Languages Aklo, Common

[0] (25) SQ madness

[0] (26) SPECIAL ABILITIES

[0] (27) Babble (Su)

[0] (28) An allip constantly mutters to itself, creating a hypnotic effect. All sane creatures within 60 feet of the allip must succeed at a DC 15 Will save or be fascinated for 2d4 rounds. While a target is fascinated, the allip can approach it without breaking the effect, but an attack by the allip does end the effect. Creatures that successfully save cannot be affected by the same allip's babble for 24 hours. This is a sonic, mind-affecting compulsion effect. The save DC is Charisma-based.

[0] (29) Madness (Su)

[0] (30) Anyone targeting an allip with a thought detection, mind control, or telepathic effect makes direct contact with its tortured mind and takes 1d4 points of Wisdom damage.

[0] (31) Touch of Insanity (Su)

[0] (32) The touch of an allip deals 1d4 points of Wisdom damage (DC 15 Will negates). A successful critical hit causes 1d4 points of Wisdom damage and 1 point of Wisdom drain (instead of double Wisdom damage). With each successful attack, an allip gains 5 temporary hit points. The save DC is Charisma-based.

[0] Creature Name Line: Allip CR 3

[0] GENERAL: Allip

[0] GENERAL: ok doing defense

[0] GENERAL: ok doing offense

[0] GENERAL: ok doing attacks

[0] GENERAL: ok doing special attacks

[0] GENERAL: ok doing tactics

[0] GENERAL: ok doing statistics

[0] GENERAL: ok doing feats/skills

[0] GENERAL: ok doing equipment

[0] GENERAL: ok doing ecology

[0] GENERAL: ok doing special abilities

Zarestia
October 2nd, 2022, 01:09
Sadly, the author has been away on this forum since May.

I also created an NPC importer, but in my ruleset which is based on PFRPG. If the need is there, I could probaly port this to an extension as an alternative.

Evilthorne
October 2nd, 2022, 17:24
I noticed that but was hoping they may be notified of the post.

Arimil508
October 13th, 2022, 18:42
honestly would apricate it. At the bare minimum I wish they left an error code key so we can decipher this on our own.

Arimil508
October 14th, 2022, 01:52
I found out your problem.
Line 308 has something to do with Energy Resistance.
meaning it is breaking with Channel Resistance. it is treating it as Energy resistance so it is looking for both an amount and a type.
removing it from the creatures stat block and adding it back later

Arimil508
October 14th, 2022, 18:50
This is a great extension, honestly! Just one quick question How do you decipher the error log. I am trying to convert the allis from D20pfsrd and it keeps giving me a message.

54558

[0] (1) Allip

[0] (2) Contents [show]

[0] (3) Subpages

[0] (4) Variant Allip

[0] (5) This malignant cloud of shadows boils in the air, its skeletal maw eerily babbling as the creature's claws manifest from the darkness.

[0] (6) Allip CR 3

[0] (7) XP 800

[0] (8) CE Medium undead (incorporeal)

[0] (9) Init +5; Senses darkvision 60 ft.; Perception +7; Aura babble (60 ft., DC 15)

[0] (10) DEFENSE

[0] (11) AC 14, touch 14, flat-footed 13 (+3 deflection, +1 Dex)

[0] (12) hp 30 (4d8+12)

[0] (13) Fort +4, Ref +4, Will +4

[0] (14) Defensive Abilities channel resistance +2, incorporeal; Immune undead traits

[0] (15) OFFENSE

[0] (16) Speed fly 30 ft. (perfect)

[0] (17) Melee incorporeal touch +4 (1d4 Wisdom damage)

[0] (18) Special Attacks babble, touch of insanity

[0] (19) STATISTICS

[0] (20) Str --, Dex 12, Con --, Int 11, Wis 11, Cha 16

[0] (21) Base Atk +3; CMB +4; CMD 17

[0] (22) Feats Improved Initiative, Lightning Reflexes

[0] (23) Skills Fly +16, Intimidate +10, Perception +7, Stealth +8

[0] (24) Languages Aklo, Common

[0] (25) SQ madness

[0] (26) SPECIAL ABILITIES

[0] (27) Babble (Su)

[0] (28) An allip constantly mutters to itself, creating a hypnotic effect. All sane creatures within 60 feet of the allip must succeed at a DC 15 Will save or be fascinated for 2d4 rounds. While a target is fascinated, the allip can approach it without breaking the effect, but an attack by the allip does end the effect. Creatures that successfully save cannot be affected by the same allip's babble for 24 hours. This is a sonic, mind-affecting compulsion effect. The save DC is Charisma-based.

[0] (29) Madness (Su)

[0] (30) Anyone targeting an allip with a thought detection, mind control, or telepathic effect makes direct contact with its tortured mind and takes 1d4 points of Wisdom damage.

[0] (31) Touch of Insanity (Su)

[0] (32) The touch of an allip deals 1d4 points of Wisdom damage (DC 15 Will negates). A successful critical hit causes 1d4 points of Wisdom damage and 1 point of Wisdom drain (instead of double Wisdom damage). With each successful attack, an allip gains 5 temporary hit points. The save DC is Charisma-based.

[0] Creature Name Line: Allip CR 3

[0] GENERAL: Allip

[0] GENERAL: ok doing defense

[0] GENERAL: ok doing offense

[0] GENERAL: ok doing attacks

[0] GENERAL: ok doing special attacks

[0] GENERAL: ok doing tactics

[0] GENERAL: ok doing statistics

[0] GENERAL: ok doing feats/skills

[0] GENERAL: ok doing equipment

[0] GENERAL: ok doing ecology

[0] GENERAL: ok doing special abilities


So i looked at the extensions code
and on that line mentioned in that error 308 is one of the lines that deals with energy resistance.
it is breaking because of Channel resistance.
it is looking for stuff that is just not there
remove Channel resistance from the text gen the monster then re add the channel resistance

celebrindal
November 17th, 2022, 16:35
Did you publish it Zar?

Zarestia
November 17th, 2022, 18:17
Did you publish it Zar?

Not yet, I've been doing some other things the past few weeks. I'll get back to it probably this week so I can release it next week :)

celebrindal
November 17th, 2022, 20:11
Cool let me know if you need any help with testing.

Arimil508
December 2nd, 2022, 08:35
Any update on the creature lab revival?

Zarestia
December 3rd, 2022, 01:45
Any update on the creature lab revival?

This weekend, I'll need to get all the different formatting right... (damn you paizo)

XenusUk
December 12th, 2022, 19:32
Log looks ok, get this error in chat:

Error when populating character record: [string "CreatureLab-v1.9.0:cgen/lua/creaturegen.lua"]:886: getValue: Invalid parameter 1

[0] (1) ACOLYTES CR 1

[0] (2) XP 400

[0] (3) Human cleric (Da-Jin) 2

[0] (4) LE Medium humanoid (human)

[0] (5) Init +0;

[0] (6) Senses Perception +2

[0] (7) Aura evil

[0] (8) DEFENSE

[0] (9) AC 17, touch 10, flat-footed 17 (+5 armor, +2 shield)

[0] (10) hp 16 (2d8+2 plus 2)

[0] (11) Fort +4; Ref +0; Will +5

[0] (12) OFFENSE

[0] (13) Speed 20 ft.

[0] (14) Melee mwk heavy mace +4 (1d8+2)

[0] (15) Special Attacks channel negative energy 4/day (1d6, DC 12)

[0] (16) Domain Spell-Like Abilities (CL 2nd; melee touch +3; concentration +3):

[0] (17) 5/day--bleeding touch, touch of darkness

[0] (18) Spells Prepared (CL 2nd; melee touch +3; concentration +3):

[0] (19) 1st--cause fear (DC 13)D, cure light wounds, doom (DC 13), shield of faith

[0] (20) 0 (at will)--guidance, read magic, resistance, virtue

[0] (21) D Domain spells Domains Darkness, Death

[0] (22) STATISTICS

[0] (23) Str 14, Dex 11, Con 13, Int 8, Wis 15, Cha 12

[0] (24) Base Atk +1; CMB +3; CMD 13

[0] (25) Feats Blind-Fight, Scribe Scroll, Skill Focus (Bluff)

[0] (26) Skills Bluff +5, Disguise +2, Intimidate +2, Sleight of Hand -5

[0] (27) Combat Gear scroll of command, scroll of cure light wounds;

[0] (28) Other Gear scale mail, heavy wooden shield, masterwork heavy mace

[0] Creature Name Line: ACOLYTES CR 1

[0] GENERAL: Acolytes

[0] GENERAL: ok doing defense

[0] GENERAL: ok doing offense

[0] GENERAL: ok doing attacks

[1] parseAttacks (melee)mwk heavy mace +4 (1d8+2)

[1] parseAttacks (ranged)nil

[0] GENERAL: ok doing special attacks

[0] GENERAL: ok doing tactics

[0] GENERAL: ok doing statistics

[0] GENERAL: ok doing feats/skills

[0] GENERAL: ok doing equipment

[0] GENERAL: ok doing ecology

[0] GENERAL: ok doing special abilities

Not sure what the tick box numbers at the bottom of the Clab window do?

Get same error testing this stat block: https://www.d20pfsrd.com/bestiary/npc-s/npcs-cr-2/cultist-human-cleric-3a/

Looks like a spell parsing issue?

XenusUk
December 12th, 2022, 20:36
Working fine on non-spellcasters

Arimil508
December 12th, 2022, 21:25
hey XenusUk your right it is related to spellcasters. particularly that error is related to parsing spells.
particularly that line is it creating a local variable for the spells name.
So without going to deep into testing we can deduce it is one of three things.
- The spells name on the statblock is miss spelled or has something in it that is preventing it from parsing.
- The spell is not in your loaded database.
- or That spell is named differently than what the stat block states.

it might be "-cause fear (DC 13)D,"
unless that wa a typo that you made while posting your error.
it could be trying to find a spell called D and it cant find the it.

XenusUk
December 13th, 2022, 00:37
I did try the obvious variations. The "D" is the standard used to indicate domain spells for divine spellcasters.
I get the same result using the linked stat block above specifically:

[0] (1) Cultist CR 2

[0] (2) XP 600

[0] (3) Human cleric 3

[0] (4) NE Medium humanoid (human)

[0] (5) Init +6; Senses Perception +2

[0] (6) DEFENSE

[0] (7) AC 16, touch 12, flat-footed 14 (+4 armor, +2 Dex)

[0] (8) hp 16 (3d8+3)

[0] (9) Fort +4, Ref +3, Will +5

[0] (10) OFFENSE

[0] (11) Speed 30 ft.

[0] (12) Melee mwk short sword +5 (1d6+1/19-20)

[0] (13) Ranged heavy crossbow +4 (1d10/19-20)

[0] (14) Special Attacks channel negative energy 3/day (DC 11, 2d6)

[0] (15) Domain Spell-Like Abilities (CL 3rd; concentration +5)

[0] (16) 5/day--bleeding touch, copycat (3 rounds)

[0] (17) Spells Prepared (CL 3rd; concentration +5)

[0] (18) 2nd--cat's grace, invisibilityD, undetectable alignment

[0] (19) 1st--command, disguise selfD, poisoned egg, shield of faith

[0] (20) 0 (at will)--bleed (DC 12), guidance, light, mending

[0] (21) D Domain spell; Domains Death, Trickery

[0] (22) STATISTICS

[0] (23) Str 12, Dex 15, Con 13, Int 10, Wis 14, Cha 10

[0] (24) Base Atk +2; CMB +3; CMD 15

[0] (25) Feats Improved Initiative, Stealthy, Weapon Finesse

[0] (26) Skills Acrobatics +4, Bluff +5, Escape Artist +4, Knowledge (local) +3, Knowledge (religion) +4, Sleight of Hand +4, Stealth +9

[0] (27) Languages Common

[0] (28) SQ aura

[0] (29) Combat Gear acid flask (3); Other Gear +1 studded leather, heavy crossbow with 10 bolts, masterwork short sword, black mask, egg

[0] (30) ABOUT

[0] (31) As the most proactive worshipers, the Cult embraces its patron's role as god of murder. Many members hold conventional jobs and social positions, staying close to those they slaughter in the guise of business partners, maids, or military commanders.

[0] Creature Name Line: Cultist CR 2

[0] GENERAL: Cultist

[0] GENERAL: ok doing defense

[0] GENERAL: ok doing offense

[0] GENERAL: ok doing attacks

[0] GENERAL: ok doing special attacks

[0] GENERAL: ok doing tactics

[0] GENERAL: ok doing statistics

[0] GENERAL: ok doing feats/skills

[0] GENERAL: ok doing equipment

[0] GENERAL: ok doing ecology

[0] GENERAL: ok doing special abilities

If I edit to remove the "D" it still fails in the same way.

Since the error message references "parameter 1" which appears to be spellNode, I think the error may be that the variable here should be libNode. As this is my first look at the code & I'm not familiar with this language, hopefully the programmer can quickly debug it.
The later spell parseing code looks for superscript "D" to strip out, this is not preserved when copy/pasteing into the input window, trying it myself from the pfsrd page loses the superscript formatting the code is looking for. Does FGU support superscript at all? I could live with some manual editing to clean up the names to get the code minimally working, once the first problem is sorted out.

XenusUk
December 13th, 2022, 01:14
After further testing:
line 15 spell like abilities, parses to add up the 5/day to get 10/day overall, these should not add.
line 16 these don't tie up to the Core Rules definitions. This is an issue because FGU doesn't allow you to manually add them in (unlike spells). This is because they are looked up in the spell list, for clerics these are domain powers in the special abilities list, hence the error: "[0] WARN: "(5/day) copycat (3 rounds)" cannot be found within the loaded spell libraries"
line 17 parses correctly, so you get the basic spell level info
deleting lines 18-20 allows the npc to create, you can manually drag the spells in from there as a workaround, which is ok at low levels but needs fixing for higher levels.

Re-reading the superscript code looks like it will work as it just looks at the end of the spell name for the (non superscript) qualifier and removes it before looking up the name. So once the name matching code is fixed that should work without any additional editing needed.

XenusUk
December 13th, 2022, 12:47
it might be "-cause fear (DC 13)D,"
unless that wa a typo that you made while posting your error.
it could be trying to find a spell called D and it cant find the it.

This was an old stat block so the "D" is in the wrong place, I retested with a pfsrd valid stat block later.

celebrindal
December 16th, 2022, 18:53
Anyone know if there is something like this for Ad&D 2E? Just doing some module imports and am looking to potentially save me a bunch of grief ;-)

XenusUk
December 20th, 2022, 00:14
See here for a potential alternative: https://www.fantasygrounds.com/forums/showthread.php?76025-Import-Collection

Evilthorne
December 29th, 2022, 20:31
I found out your problem.
Line 308 has something to do with Energy Resistance.
meaning it is breaking with Channel Resistance. it is treating it as Energy resistance so it is looking for both an amount and a type.
removing it from the creatures stat block and adding it back later

Thank you very much. I will give this a try again when I get back to working on the module.

Lichtblitz
March 25th, 2024, 23:25
Hi all,
I haven't worked on the extension in quite a while. Mainly because I had a Fantasy Grounds break and not playing on it equals no motivation on working on the extension for me. I'm now playing another round and have started fixing some bugs that have been reported to me so far.

Release v1.10.0 fixes two bugs:
1. Some spell names were parsed incorrectly (for example "Invisibility, Greater" or "Blistering Invective")
2. The experimental RESIST effects had a bug when a Resistance did not come with a modifier; The resulting effects are still not great but at least they are not breaking the character creation any more

New Release is now live.

Please report bugs at https://github.com/Lichtblitz/CreatureLab/issues

I may not respond right away but having bugs directly in GitHub helps me stay organized when I eventually get back to the extension - or alternatively someone else who forks it.