PDA

View Full Version : Engineer Suite: Working on a Roll20 input filter



Maasq
October 2nd, 2018, 22:54
Hi folks

As the title says, I am working on (another) Roll20 input filter for NPCs based on a request. This one will import NPCs saved via a browser extension called Roll20 Enhancement Suite (https://ssstormy.github.io/roll20-enhancement-suite/features.html). It is taking a while, but I wanted to post this to let recent converts know that there is a way to get what might amount to tens of hours of work on the Roll20 ecosystem into FG relatively painlessly.

I'll keep you updated on the progress in this thread for now, and I'll delete this thread when I roll (pardon the pun) the input filter into a release of Engineer Suite.

I hope this helps some of you out!

CURRENT STATUS:
Name, type, alignment, AC, HP, Stats, bonuses, Saving Throws, Skills.

Maasq

LordEntrails
October 3rd, 2018, 01:28
Woot woot! Nice work :)

Three of Swords
October 3rd, 2018, 14:46
OMGOMGOMGOMGOMG!!! <squeals like a little girl, then coughs as it hurts his throat>

I have hundreds of custom NPCs in Roll20. I slowly convert them to FG as needed, but even using NPC Engineer it takes time that I hate spending rather than work on new things.

This will be an awesome extension to your NPC Engineer tool!

I saw a donation link on your site. Once this is complete, I will definitely be buying you a coffee or three (depends if you buy your coffee at Starbucks or not).

Skillkoil
October 3rd, 2018, 15:31
This is great work Maasq! I know this means a lot to new users of FG from roll20

The Hawk and Sparrow
October 3rd, 2018, 17:34
Will be nice to continue to be in a position to help folks as / or if they decide to use FG!

Maasq
October 3rd, 2018, 20:47
Thanks for the encouragement, folks!

It certainly makes things worthwhile knowing that the end product is making peoples' life easier. I like it here in the FG ecosystem, and if anything I am doing encourages other like minded folks to come here & stay, that makes me happy.

Offers of coffee also make me happy, Three of Swords :) I was going to call that link 'buy me a Jack Daniels' but I didn't want to add to the stereotype of the drunken Scotsman!

Maasq

JohnD
October 3rd, 2018, 22:43
If I played 5e I'd be using your stuff weekly.

Maasq
October 4th, 2018, 23:09
UPDATE:
Saving Throws and Skills added.
It might not seem like much, but by god they were stored in a way that was very different to the standard statblock. They took a lot of parsing.... grrr....

On the plus side, any others like that may well go easier as I have the general structure sorted for that type of thing. The vulnerabilities seem easy in comparison, but I will leave that until tomorrow.

Maasq

Three of Swords
October 5th, 2018, 00:16
The Maasq cheering section erupts into heartfelt calls of encouragement! "You can do it!" "In Maasq we trust!" "Drunk Scots rule!"

Just imagine how raucous it'll be when you complete the project. :)

Maasq
October 7th, 2018, 12:38
Hi folks

Bad news on this, I think. The three sample NPCs I was sent to work with have no challenge rating or XP listed. Worse, one of them has no info listed in other areas.
Could (ex-)users of Roll20 try using the browser extension and save out a few characters, and see if this is a bug? If so, contact the writer of the extension and point this out?

I'm going to hang fire on this just now until I hear back. The Traits and actions sections are horrendous to work with, and so might put an end to this project anyway. At best, I may be able to do a partial transfer. The issue is the information isn't stored as standard statblock info, but what I assume to be Roll20 macros.

Sorry if this is a bit deflating. :(

Maasq

ZilgornZeypher
October 8th, 2018, 11:51
Well given the choice between a transfer by hand and a partial transfer via this even if I have to do the actions and traits or other bits it still saves time... See my pm about what I sent you originally as I don't remember off the top of my head what npc's they were.

epithet
October 8th, 2018, 16:25
What I've noticed about Roll20 is that the game data isn't stored in what we think of as a "character sheet," but there are character sheets - many of them community created, but one (apparently) made by R20 to follow an "official" format for the 5eSRD. If you're having trouble rationalizing the data structure, your best bet might be to look at the character sheet interface tools the community uses to structure NPC data into a recognizable block of stats. Unfortunately, you have to be a "pro" subscriber to R20 to have access to that interface, so I can't help you with that.

Another option would be to print a R20 npc to a pdf, or copy the text from the html NPC pop-out window. The problem with that is that it is a process that has to be repeated for each NPC, but the benefit is that every npc printed or copied in this way will be formatted the same way. I'll send you some examples in Discord.

Three of Swords
October 8th, 2018, 17:45
I thought the print to PDF idea was genius since NPC Engineer already accepts PDFs. But it doesn't work that well.

1. Some fields are gibberish when copied from the PDF. The Name, for example. I tried it with both Foxit and PDF-XChange.
2. It only 'prints' what is on the screen at the time. At least that's how Chrome works. So if the NPC stat block is longer than your screen is tall, it doesn't work. (Note: I tried changing the magnification of Chrome so the whole stat block fit, and it didn't work.)

Three of Swords
October 8th, 2018, 17:46
As for copying the fields from the HTML, that doesn't work either.
Lastly, I tried saving the NPC character sheet as HTML, and nope. It doesn't save many of the fields.

epithet
October 8th, 2018, 19:20
You can drag the text fields to resize them before you print, so your traits won't be cut off. Having gibberish in your pdf is part of having a pdf, the key is to have the same gibberish, consistently, that can be filtered.

Edit: To print the entirety of a creature with a large statblock in Chrome, open the npc, and click the link button on the top left to get the pop-out into its own window. Right click the top window bar and select "Show as tab" to get easy access to all your menu options, then adjust the scale to get the entire thing onto your screen. Then print, selecting "save as pdf" as your printer. In the print dialog, change the paper size to tabloid, then adjust the scale to be sure that the entire npc block will fit on one page, because for whatever reason the Roll20 page will not print more than one page.

Maasq
October 8th, 2018, 20:56
Hi folks

I think this is a bust. Like Three of Swords says, there's no easy way to extract from the Journal. And the file produced by the browser extension is too difficult to work with, unfortunately. Many actions don't even have names, just a code for Roll20.

Sorry to get your hopes up :(

Maasq

Three of Swords
October 9th, 2018, 01:40
No biggie, Maasq. You were just trying to help the community by crafting something that you, yourself, would prob never even use. So I, if no one else, appreciate the attempt!

ZilgornZeypher
October 9th, 2018, 12:16
Well I also appreciate the attempt to get a solution working. Back to cut and pasting...

iotech
October 12th, 2018, 18:50
I suspect you might be able to do this:
- Use FireFox, install GreaseMonkey
- Write a GreasMonkey script
- Visit Roll20, open your NPC
- GreaseMonkey script picks through the html (looking for controls with certain ID or NAMEs which you have programmed in your script)
- Greasemonkey gathers all relevant data and presents a pop-up with a properly formatted stablock for you to copy/paste

Yes, that's a fair bit of work to do, but it would be shareable for all the refugees from Roll20 who want to bring over their content.

Here is an example GreaseMonkey script that imports/exports data and interacts with the web page to fill in forms (or read data).
https://openuserjs.org/scripts/slow!/Simple_Form_Saver

Maasq
October 12th, 2018, 19:52
Thanks for that - food for thought.
I really don't want to branch out into another language just now, but this is the sort of thing that someone else could program as a standalone gift to the Roll20 community. Anyone up for doing that?
I can provide an example of how a statblock should look if NPC Engineer is to have no issue with it.

Good call, iotech!

Maasq