Git Product home page Git Product logo

crawl-wiki-modules's Introduction

crawl-wiki-modules

C++ tool and Lua module for generating Crawl Wiki content (http://crawl.chaosforge.org).

This is an update of the project at https://github.com/plampila/crawl-wiki-modules.

Instructions

  • Follow https://github.com/crawl/crawl/crawl-ref/INSTALL.md to clone and build crawl. I found the build process to go smoothly with Ubuntu on WSL.
  • Create a directory crawl-ref/source/util/json-data/ and put json-data-main.cc and json-data-main.h in it.
  • Modify source/Makefile and perhaps Makefile.obj to build the added code. It is similar to the monster utility, so duplicate the Makefile lines for that utility and change them for json-data. Look at the Makefile on this site to compare.
  • Enter commands to build and run.
make monster
make json-data
util/json-data/json-data > data.json
  • If the code is out of date, make changes to json-data-main.cc. I found that many changes were needed. Look for similar code in various parts of the crawl source to see how to write the updates, starting with monster-main.cc.
  • Download json_to_table.lua. I used Windows PowerShell for this part, which worked well although the syntax is ugly (seen below). Lua binaries are at http://luabinaries.sourceforge.net/download.html.
  • This module requires serializer and json packages. I used https://github.com/pkulchenko/serpent and https://github.com/rxi/json.lua. They did not handle Unicode, but other than that they worked. And the only Unicode ended up being EM dashes which became ??? at the end. A quick search and replace fixed this.
  • Run the Lua code.
Get-Content data.json | & "C:\Program Files\lua\lua54.exe" json_to_table.lua spells > Table_of_spells.lua
Get-Content data.json | & "C:\Program Files\lua\lua54.exe" json_to_table.lua spellbooks > Table_of_spellbooks.lua

crawl-wiki-modules's People

Contributors

jkornelsen avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.