Jump to content
Sign in to follow this  
DavidW

Automatic generation of spell documentation

Recommended Posts

I've written a small program that takes the spell descriptions in the game and packages them as HTML. For instance, you can install your spellpack, and then run the program to generate documentation for the spells, without a lot of tedious cut-and-paste. It's written in WEIDU and packaged as a mod, but it doesn't alter any in-game files or leave a trace in weidu.log. You can choose to document the whole spell system or just a selection of new or modified spells. By default the HTML is packaged in G3's house style, but you can customize it fairly easily.

The program is on GitHub at https://github.com/Gibberlings3/Descriptifier/releases - it's not explicitly documented, but there's a reasonable amount of documentation in the code itself. As an example, I've used it to document the whole spell system after an SR v4b16 install, as well as the new IWD spells added by SCS's IWD components (attached as a zipped file). Note that you'll have to unzip the file to get the pages to display properly.

descriptifier.zip

Share this post


Link to post

Nice tool, thanks for the creation and sharing.

Call me lazy {go ahead!}, but this can be run multiple times? It would be interesting to see if a spell's description changes after installing certain mods.

Share this post


Link to post

Run it as many times as you like. It doesn’t change anything in-game.

Share this post


Link to post

That’s trickier. It’s fairly easy to parse the CLAB and extract granted spells, and similarly easy to do HLAs, but there’s no straightforward way to handle AP_ entries in the CLAB.

Ultimately, the reason this works is that spells are already documented - it’s just that the documentation is in game.

Share this post


Link to post

Honestly it would be fine to simply fill in most of the kit description but leave the "Advantages:" and "Disadvantages:" sections blank. Getting 90% of the description done without having to fiddle with html tags would be a HUGE time-saver. 

 

(EDIT - y'know, a huge time-saver for anyone silly enough to make a mod with 120 new kits... ;) )

Edited by subtledoctor

Share this post


Link to post

Although I certainly wouldn't discourage any programmagical way of gaining information, there is still the valid "Lol's Kit Guide". There's alot of info in there, and a lot of effort was made to create it.

Sure, it needs updating, but that's a task for a new generation of smiley-deranged members. :D

Share this post


Link to post
5 hours ago, Azazello said:

Although I certainly wouldn't discourage any programmagical way of gaining information, there is still the valid "Lol's Kit Guide". There's alot of info in there, and a lot of effort was made to create it.

I clicked the link, read the forum post (huh, SHS is back up again?), and I have NO idea what that actually is.  But my brain hurts from trying to understand it. (EDIT - oh I see, it's literally just a list of kits.  It's funny, I like to install a lot of mod kits - generally 150+ in each install - but almost none of them come from any of those mods.  Maybe 6-7 from DR and 2 from S&S.)

We already have kit descriptions in plain text in the mod's .tra file; the only thing we need to help making a readme is to auto-generate the HTML in and around that text, to make it presentable.

Edited by subtledoctor

Share this post


Link to post

Oh, sure: if you just want to grab the kit descriptions from the game and parse them as HTML, that's pretty easy. I'll do it if I have a chance (lowish priority as I don't have a kit mod myself; I did this partly to document SCS's spell-system changes), or you could borrow and adapt the code fairly easily. 

Share this post


Link to post
Guest
You are commenting as a guest. If you have an account, please sign in.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×