Go Back   Angband Forums > Angband > Development

Thread Tools Display Modes
Old October 10, 2021, 17:33   #1
Join Date: Jun 2021
Posts: 13
Kooltone is on a distinguished road
Class, Race, and Item Parsing for a Wiki

As a new player, it's been bugging me that I can't find detailed specifics about race and class abilities online in a wiki. If I want to see the full list of spells a class can cast, I have to dig through the github files. The online Angband Manual gives a summary of classes, but it doesn't give a complete picture.

I do not fault the devs. Nick and backwardsEric, you are doing a great job. But it is difficult for a new player to find answers without creating a forum post or having coding knowledge.

I'm a node.js developer, so I can read the github files fairly well. The data files in lib are really nice. I like how many things are data driven. So I was thinking about creating a parser that would parse class, race, item and monster data into a web page to work like a wiki. However, is this something that would break over time when changes are made? I fear over time changes to the files would break the parser.

Speaking of which, is the file format Angband specific or does the data follow a standard convention? I tend to deal with JSON, XML, CSV files in my day to day work. How would I check to see when an object terminates? Is it just a blank newline? Actually that doesn't seem right. Is it until you find another name key?
Kooltone is offline   Reply With Quote
Old October 10, 2021, 21:17   #2
Vanilla maintainer
Nick's Avatar
Join Date: Apr 2007
Location: Canberra, Australia
Age: 56
Posts: 9,350
Donated: $60
Nick will become famous soon enoughNick will become famous soon enough
The parsing is done in parser.c (unsurprisingly), and to some extent in datafile.c - looking at those will give some idea of how it all works.

You may be interested in Thraalbee's monster parsing page here.
One for the Dark Lord on his dark throne
In the Land of Mordor where the Shadows lie.
Nick is offline   Reply With Quote
Old October 11, 2021, 06:57   #3
Thraalbee's Avatar
Join Date: Sep 2010
Location: Stockholm
Posts: 687
Thraalbee is on a distinguished road
That page does not adapt to new versions so will fail with the current release. The display part is good though. I made it as a learning excercise so code quality is so so though. Feel free to copy any part of it!
Thraalbee is offline   Reply With Quote
Old October 11, 2021, 11:41   #4
Join Date: Nov 2008
Posts: 870
Sideways is on a distinguished road
Make sure you have a good idea what kind of output format and UI you want. A wiki may not be the ideal format for automatically produced content, especially if you don't have previous experience with operating a wiki.

Gwarl tried to launch an Angband wiki some time ago, and had very similar ideas as you for automatically produced content; but he basically approached the project from an entirely non-wiki starting point, so the actual wiki aspects of it were just holding him back, and at the same time he held the wiki back by not implementing basic things like sitewide CSS. Neither the wiki nor the automated content got anywhere.
The Complainer worries about the lack of activity here these days.
Sideways is offline   Reply With Quote
Old October 11, 2021, 21:05   #5
AnonymousHero's Avatar
Join Date: Jun 2007
Posts: 1,388
AnonymousHero is on a distinguished road
I think ToME 2.x had an interesting approach here where you could supply command line arguments to (re-)generate some(!) of the documentation, but it was never really carried to the proper end state. (I.e. there were still lots of hardcoded assumptions in the docs, e.g. what the classes were, etc. etc.)

EDIT: A reasonably good starting point would be doc systems that let you include bits of documentation generated from code.
AnonymousHero is offline   Reply With Quote
Old October 17, 2021, 15:03   #6
Thraalbee's Avatar
Join Date: Sep 2010
Location: Stockholm
Posts: 687
Thraalbee is on a distinguished road

Originally Posted by Nick View Post
...You may be interested in Thraalbee's monster parsing page here.
This site is now updated for the latest release and auto-loads the current datafiles (so a bit slow to load). Probably the easiest way of getting a quick overview of monsters and their distribution from level 1 to 100
Thraalbee is offline   Reply With Quote
Old October 18, 2021, 19:29   #7
Join Date: Aug 2019
Posts: 286
backwardsEric is on a distinguished road
DavidMedley had manually assembled much of the class information into a spreadsheet hosted on Google Docs. That information is likely fairly up-to-date (4.2.0 to 4.2.1 or 4.2.2).

In line with AnonymousHero's suggestion, an option to generate class and race spoilers could be added to the spoiler options on the tombstone screen with equivalents for generating them from the command line (the command line version only works when going through main.c; the Windows and Mac front ends bypass main.c so don't benefit from that). There's already spoiler information for plain objects, artifacts, and monsters. That lets one reuse the existing parsers but would likely require a reformatting step on the output since the spoiler text is meant for direct human consumption and doesn't have any markup.
backwardsEric is offline   Reply With Quote

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools
Display Modes

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Class / Race abilities ? swim Vanilla 9 May 14, 2021 08:59
Best Race / Class Pairs DavidMedley Vanilla 3 April 8, 2020 05:07
Possible Race and Class changes Jungle_Boy Development 14 October 23, 2011 07:54
Race/class restrictions Zikke Vanilla 1 June 12, 2010 18:30
[Un] Race and class balancing Bandobras Variants 19 September 3, 2007 13:43

All times are GMT +1. The time now is 09:08.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2022, vBulletin Solutions Inc.