Stat Block Tool - RPG Crossing
RPG Crossing Home Forums Create An Account! Site Rules & Help

RPG Crossing
twitter facebook
0 7 0 0
... raised for charity!
: +

Notices

Reply
 
Thread Tools
  #1  
Old Aug 25th, 2020, 10:06 PM
Misty Phi's Avatar
Misty Phi Misty Phi is offline
All veils and misty
 
Tools
User Statistics
Last Visit: Sep 1st, 2020
RPXP: 1766
Misty Phi Misty Phi Misty Phi Misty Phi Misty Phi Misty Phi Misty Phi Misty Phi Misty Phi Misty Phi Misty Phi
Posts: 310
Stat Block Tool

Statblock Tool

Statblocks

I was tired of tinkering about in BBCode tables trying to make sure I placed the correct information between the correct ||'s so I began creating a statblock creation tool. It is fully functional just now but with only a few statblock templates added. Unfortunately for personal reasons I cannot work on it any more so it is what it is.

If it is of use to anyone, great, the source code can be downloaded and you may do what you wish with it. It only uses javascript so it should run locally without problem.

In summary, it takes your RPGx character sheet and automatically converts it, using templates, into a BBCode statblock ready for posting.

Thank you for those whose statblocks I already converted to templates, if you were not the original owner I appologise to whom ever was, I simply searched for a few examples I liked and added them from the first person I found using it.
Attached Files
File Type: zip Statblock Source.zip (421.2 KB, 10 views)
__________________
Practicing social distancing since 1995
Reply With Quote
  #2  
Old Aug 26th, 2020, 02:20 AM
Scimmy's Avatar
Scimmy Scimmy is offline
Windrunner
 
Tools
User Statistics
Last Visit: Dec 3rd, 2020
RPXP: 10049
Scimmy Scimmy Scimmy Scimmy Scimmy Scimmy Scimmy Scimmy Scimmy Scimmy Scimmy
Posts: 6,592
Wow.....just wow this is some amazing work! Like seriously this is awesome!
__________________
-Life before death. Strength before weakness. Journey before destination.
-I will protect those who cannot protect themselves.
-I will protect even those I hate, so long as it is right.
Reply With Quote
  #3  
Old Aug 26th, 2020, 07:48 PM
Misty Phi's Avatar
Misty Phi Misty Phi is offline
All veils and misty
 
Tools
User Statistics
Last Visit: Sep 1st, 2020
RPXP: 1766
Misty Phi Misty Phi Misty Phi Misty Phi Misty Phi Misty Phi Misty Phi Misty Phi Misty Phi Misty Phi Misty Phi
Posts: 310
Thanks Scimmy, when I decided it couldn't finish it I was just going to leave it gathering dust in the dark recesses of my machine, so I am glad to hear its useful to someone else.

Besides beautifying it a little and adding more templates I did have ideas for making it easier for others to add their own templates. Perhaps someone else might do that, who knows.
__________________
Practicing social distancing since 1995
Reply With Quote
  #4  
Old Aug 27th, 2020, 03:01 AM
Ziether Ziether is online now
Great Wyrm
 
Tools
User Statistics
Last Visit: Dec 3rd, 2020
RPXP: 12245
Ziether Ziether Ziether Ziether Ziether Ziether Ziether Ziether Ziether Ziether Ziether
Posts: 7,435
I am no coding wizard. Far from it. My expertise lies in BBCode due to sheer necessity, and I end up spending altogether too long designing obscenely detailed stat blocks. Your tool is admirable in how easy it is to use.

From poking around at it, is the only way to directly import the sheet codes to download the sheet's file through the Profiler interface, then upload that file to the Stat Block generator? I only ask because I want to be sure that I always use the most up-to-date version of the sheet, given the various aspects of regular gameplay that might alter the variables that go into the block.

I am always amazed by those who have the attention span and dedication to do real coding. I barely mastered writing utilities for the TI-83+. Thank you for your time and effort!
Reply With Quote
  #5  
Old Aug 27th, 2020, 06:12 AM
Misty Phi's Avatar
Misty Phi Misty Phi is offline
All veils and misty
 
Tools
User Statistics
Last Visit: Sep 1st, 2020
RPXP: 1766
Misty Phi Misty Phi Misty Phi Misty Phi Misty Phi Misty Phi Misty Phi Misty Phi Misty Phi Misty Phi Misty Phi
Posts: 310
I'm not quite sure I understand the question sorry Zeither so I will try and cover all bases and hope I answer it somewhere along the line, excuse me if I'm teaching you to suck eggs a little.

The profiler stores the character sheet data on the server within an sql database in JSON format, that's both the values and the keys. When you export the sheet the profiler converts the data from JSON to xml with the key becoming an element and the value becoming the data. The tool (ironically) then imports the xml and converts it back to JSON. The variables (which I think you are calling "the sheet codes") are simply a list of all the xml elements, I included the actual data too so that you can identify them more easily since some (Hero Points -> AP for example) are not obvious so you could enter an identifiable value on your sheet (99999 for example) and then use that to find the specific variable required.
When the profiler saves the sheet information to sql it only saves the items which have values in them, therefore when it converts the sheet to xml any items on your sheet which didn't have a value will not be included. If you wanted a complete list of all possible "sheet codes" you would need to create a sheet with a value in every field, or in the case of larger lists such as spells, simply enter a value in the first and last fields so you know how many there can be.

When you press "encode" the tool simply places the relevant value (The actual data from your sheet —eg. HP value— from the xml) into the BBCode at the position indicated by the template variable using a basic regex.

I never intended the tool to keep an up to date version of your statblock although I suppose you could use it that way if you were willing to keep downloading the sheet. It was simply intended to create the initial block which you would then update normally in game. Its not possible to grab the sheet data directly from the RPGx sheets I'm afraid.

If you enter a template variable which during the encode process can't be found a "-" is inserted in its stead. You can see this in the 5E Zeither template image for the saves, since saves are not actually stored in the character sheet in textual terms but rather through a simple checkbox. (It would be simple enough to convert the checkbox value in the tool and it's something I would likely do if I were still working on it). So you could build your template with a bunch of items which will never be found and are added by you manually at a later time.

The tool itself is not complex it simply parses the xml file and exports the data via a regex replace into the BBcode. Most of the heavy stuff is down to the highlighting and I didn't write those functions myself.

I hope your answer is in there somewhere, if not ask again and I'll happily take another shot.

EDIT: I should have said "Its not possible to grab the sheet data directly from the RPGx sheets" using this tool. You could write something which grabbed the page itself and parsed the data of course.
__________________
Practicing social distancing since 1995

Last edited by Misty Phi; Aug 27th, 2020 at 06:34 AM.
Reply With Quote
  #6  
Old Aug 27th, 2020, 06:34 AM
Ziether Ziether is online now
Great Wyrm
 
Tools
User Statistics
Last Visit: Dec 3rd, 2020
RPXP: 12245
Ziether Ziether Ziether Ziether Ziether Ziether Ziether Ziether Ziether Ziether Ziether
Posts: 7,435
My apologies. Human beings don't always look at things from the same angle. Our personal thought processes color our perception. I wasn't seeing the tool from the place it was intended to be seen. I better understand the intent behind its creation now.

Nothing to see here. You may resume your regularly scheduled thread operations.
Reply With Quote
  #7  
Old Aug 27th, 2020, 06:36 AM
Misty Phi's Avatar
Misty Phi Misty Phi is offline
All veils and misty
 
Tools
User Statistics
Last Visit: Sep 1st, 2020
RPXP: 1766
Misty Phi Misty Phi Misty Phi Misty Phi Misty Phi Misty Phi Misty Phi Misty Phi Misty Phi Misty Phi Misty Phi
Posts: 310
No apology needed, I am an expert on not being able to see things as other people mean them. I'm happy to answer any questions and offer any help I can.
__________________
Practicing social distancing since 1995
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT -4. The time now is 04:27 PM.
Skin by Birched, making use of original art by paiute.( 2009-2012)


RPG Crossing, Copyright ©2003 - 2020, RPG Crossing Inc; powered by vBulletin, Copyright ©2000 - 2020, Jelsoft Enterprises Ltd. Template-Modifications by TMB