Skip to content

corvec/ncc-web

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NERO Character Creator for the Web

This web app is designed to be usable from mobile phones, tablets, or from the desktop.

It is released under the terms of the GNU General Public License, version 3.

Checking Out the Code

  1. git clone git://github.com/corvec/ncc-web.git
  2. cd ncc-web
  3. git submodule init
  4. git submodule update

Required Tools

To fully be able to build and develop for this project, you will need the following tools:

  • git
  • Ruby
  • Any JavaScript minimizer (I use UglifyJS)

Project Structure

HTML and Ruby

Executing ncc.rb generates index.html, git.html and debug.html. This is partly so that the YAML data file can be parsed into JavaScript objects and partly so that all three files can be maintained. The difference between the files is solely in the JavaScript file that they load.

  • index.html loads ncc.min.js
  • debug.html loads ncc.js
  • git.html loads ncc.js from the git server.

git.html allows you to test just-pushed changes before updating the web-server. Note that for this to use your git server, you must update index.rb. (Yes, I could figure out the server based on .git/config, but I'd have to make assumptions about your configuration).

Compiling this page is simple (command and expected output is below):

~/git/ncc-web$ ruby ncc.rb
index.html generated
debug.html generated
git.html generated

JavaScript

ncc.js is a JavaScript file that simply pulls in the contents of all the JavaScript files below

  • js/ncc-init.js contains initialization code.
  • js/ncc-keys.js contains key-handling code.
  • js/ncc-skills.js contains skill-purchasing code
  • js/ncc-prereqs.js contains prereq handling code
  • js/ncc-magic.js contains magic handling code - buying spells, switching schools, etc.
  • js/ncc-export.js contains code for exporting to PDF, email, and the save link
  • js/ncc-info.js contains code used to get and set general info for the character

ncc.min.js is a compiled JavaScript file generated by running

cat js/* | ../UglifyJS/bin/uglifyjs > ncc.min.js

CSS

ncc.css contains most of the CSS for this app, but the Noty library has its own CSS as well.

YAML

The meat of the game rules for character creation are stored in ncc.yml

UglifyJS

The setup for UglifyJS is simple (on an Ubuntu machine, at least). In a command prompt, navigate to the folder where you store git repos (for this example, ~/git).

~/git$ git clone git@github.com:mishoo/UglifyJS.git
~/git$ sudo aptitude install nodejs nodejs-legacy

The Author

The author of this application is Corey T Kump. Follow him on Twitter: @CorvecTKump

About

Web app that allows building of NERO characters

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published