Page 1 of 1

Draft documentation of the clua API

PostPosted: Monday, 9th July 2018, 20:04
by ebering
Hi friends. It's well known that you can use "Lua magic" in your .crawlrc file to do cool things. But the magic itself comes in whispered fragments from wizards who put forth the work digging through the crawl code to figure out what is available in Lua.

Starting with some existing documentation in the comments of the c source, plus reading elliptic's qw, and Leszczynek's pastebin documenting monster and monster.info, I spent some time compiling a solid API doc. Check it out: http://csclub.uwaterloo.ca/~ebering/crawl/lua/. There are certainly typos, possibly lies, and definitely several references to C header files for enum types, so there's still room for improvement. I'd welcome your feedback and comments.

If you're worried about me nuking this off the face of the internet, don't worry, there's a pull request to land this into the main crawl distribution. Hopefully it will find a home on cdo or some other more permanent crawl webspace in the near future.

Re: Draft documentation of the clua API

PostPosted: Thursday, 19th July 2018, 01:11
by Implojin
I really wish that this had existed back when I was learning Crawl.

Please please please integrate this into the DCSS distributions and keep it maintained.

Re: Draft documentation of the clua API

PostPosted: Thursday, 19th July 2018, 16:07
by Shtopit
Wow thanks, I had no clua.