Closed cristianmtr closed 3 months ago
This actually already exists, it’s just still very much a work in progress so I haven’t made it obvious it’s there. It mostly just does some biography type stuff and skill proficiencies (not attacks, items etc.) right now.
But if you want to give it a try, you just have to call this from a script type macro:
game.deltagreen.ParseDeltaGreenStatBlock()
And then pick the actor type (NPC/Unnatural/Agent) and paste the raw text of your stat block in the dialog window that comes up.
Feel free to let me know if it does poorly against a certain stat block and I can take a look at it. I may was using it for Impossible Landscapes, copying right out of the module, so it’s geared to that a little bit and the formatting on DG stat blocks does drift a bit, so sometimes things don’t match the patterns it’s looking for.
Adding in attacks is on my todo list. It just might be tricky to capture it accurately with the rather freeform way that a DG stat block has them. Feel free to let me know if it does poorly against a certain stat block and I can take a look at it. I may was using it for Impossible Landscapes, copying right out of the module, so it’s geared to that a little bit and the formatting on DG stat blocks does drift a bit, so sometimes things don’t match the patterns it’s looking for.
Adding in attacks is on my todo list. It just might be tricky to capture it accurately with the rather freeform way that a DG stat block has them.
Note - I tried your stat block and realized my parser badly wants a name and sort of secondary line like all the stat blocks in Impossible Landscapes have. I will try to fix this, but if you want to try it as it is, you'll have better luck if you run a stat block like this in where the first two lines are the actor name and then the profession/type:
Which will give:
Oh this is excellent already! Doesn't seem to catch Criminology
from my statblock. However, if I remove the line breaks and make the statblock like so, it works:
STR 14 CON 12 DEX 10 INT 12 POW 13 CHA 12
HP 13 WP 13 SAN 47 BREAKING POINT 39
DISORDERS: Sleep disorder.
SKILLS: Alertness 50%, Bureaucracy 70%, Criminology 45%, Drive 55%, Firearms 60%, First Aid 30%,
HUMINT 40%, Melee Weapons 55%, Persuade 50%, Search 60%, Stealth 70%, Unarmed Combat 60%.
ATTACKS: Glock 26 pistol 60%, damage 1D10.
Unarmed 60%, damage 1D4−2.
Attack and Disorders are not recognized. Not a big deal.
Maybe you could add all unrecognized lines as notes, so at least they're not lost?
Ahh yes my RegEx for the skills is assuming just a space in between, not a line feed. I don't think it's a big deal to allow a return in between the skill name and the % value though, so I will add that.
A small update to this, there should be a few fixes/improvements to the parser logic that go out with v1.4.5 (although this version is only for Foundry v12, it is not backwards compatible with v11).
I am on foundry v12, in system 1.4.5 for DG and the parser does not work anymore It adds the name of the actor, and a secondary line, but keeps all stats at 10 and skills at their default value.
@Vincekettu ahh so it is... Looks like the obsoleting of ActorData.Data in favor of ActorData.system bit me there. The console warnings helped us fix that everywhere else, but since you'd only see those warnings when running the macro, we missed it for the stat parser. It is an easy fix though, the next release it should work again. Sorry about that.
One other thing I'll note, while I was fixing the issue with the data model, I took a stab at adding in the ability to parse out the amount of armor, and the attacks a stat block has. DG stat blocks are not that uniform, so it is pretty hit or miss. But might help speed things up...
thank you thank you !!
Le mar. 16 juil. 2024 à 05:00, TheLastScrub @.***> a écrit :
One other thing I'll note, while I was fixing the issue with the data model, I took a stab at adding in the ability to parse out the amount of armor, and the attacks a stat block has. DG stat blocks are not that uniform, so it is pretty hit or miss. But might help speed things up...
— Reply to this email directly, view it on GitHub https://github.com/TheLastScrub/delta-green-foundry-vtt-system-unofficial/issues/113#issuecomment-2229908647, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASAARERHTBQWG3UD4AEGU6TZMSEFBAVCNFSM6AAAAABGHMD4Z2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMRZHEYDQNRUG4 . You are receiving this because you were mentioned.Message ID: <TheLastScrub/delta-green-foundry-vtt-system-unofficial/issues/113/2229908647 @github.com>
Would be nice to have some sort of statblock parser to easily import NPCs from adventures/books.
Example stat blocks:
The CoC7e module has something like that.