Giter Site home page Giter Site logo

loganbarnett / armycalc-twr-builder Goto Github PK

View Code? Open in Web Editor NEW

This project forked from semmons99/armycalc-twr-builder

1.0 3.0 0.0 120 KB

Library used to build TWR files for use with ArmyCalc

Home Page: http://semmons99.github.com/armycalc-twr-builder

License: MIT License

armycalc-twr-builder's Introduction

Introduction

This library is used to build TWR files for use with ArmyCalc

Requirements

This program requires Ruby and the following gems:

haml
archive-tar-minitar
fastercsv

Ruby needs to be run with the -rubygems argument, add RUBYOPT=-rubygems to your environment to do this.

set RUBYOPT=-rubygems; export RUBYOPT

Usage

There are two ‘rake’ commands you can use

rake generate CONFIG=
rake build CONFIG=

The first creates the necessary XML files based on the data provided in the specified config file.

The second runs generate and then packs the resulting files into a TWR file.

The following command can be used to clean up temporary files.

rake clean

Config File Layout

The config file is a standard YAML file; below is an example.

---
ruleset: Sample Ruleset
name: Sample Army
revision: 1
author:  U R Namehere ([email protected])
defaultArmyName: My Army
units: units.csv
bonuses: bonuses.csv
validator: validator.lua
attrs: dexterity strength agility life
hiddenattrs: field1 field2
media: media

‘ruleset’ is the unique name of your rule system. Example ‘WH40K 5E’ ‘WFB 7E’

‘name’ is the name of the army. Examples ‘Space Wolves’ ‘Dwarves’

‘revision’ is the revision number of the rule system. Increment this each time you change the files so that ArmyCalc can differentiate between versions of your file.

‘author’ is optional.

‘defaultArmyName’ is optional. Examples ‘The Sons of Russ’ ‘Spudz Crew’

‘units’ is the name and relative location of the units CSV.

‘bonuses’ is the name and relative location of the bonuses CSV.

‘validator’ is the file name and relative location of the lua code file that implements the validation rules for your army.

‘attrs’ is a space separated list of the attributes to display in the unit’s stat line in ArmyCalc. These fields should be included in both CSVs.

‘hiddenattrs’ is a space separated list of the attributes to include in unit stats that will NOT be displayed in the stat line in ArmyCalc. These fields should be included in both CSVs.

‘media’ is the relative location to look for thumbnail unit image files.

CSV Layout

Units CSV

The following columns are required in the units CSV. You also need to include a column for each item in the ‘attrs’ list in the config file.

name,description,category,min,max,baseCost,costPer,thumbnail

‘name’ is the unique name of the unit. Examples ‘Blood Claw Pack’ ‘Cannon’

‘description’ is the unit description.

‘category’ is the category of the unit. Examples ‘Troop’ ‘Core’ ‘Hero’

‘min’ is the minimum number allowed when a unit is taken.

‘max’ is the maximum number allowed when a unit is taken.

‘baseCost’ is the base cost of the unit when taken if applicable.

‘costPer’ is the cost per model when the unit is taken if applicable.

‘thumbnail’ is the file name (case sensitive) of a picture that represents the unit. This file should be located in the folder named in ‘media’ in the config file.

‘attrs’ and ‘hiddenattrs’ can be left blank when they do not apply to a unit.

Bonuses CSV

The following columns are required in the bonuses CSV. You also need to include ‘attrs’ from the config file.

name,description,min,max,baseCost,costPer,owner

‘name’ is the name of your bonus and needs to be unique for the owner only. Examples ‘Power Sword’ ‘Amulet of Power’

‘description’ is the bonus description.

‘min’ is the minimum number allowed when a bonus is taken.

‘max’ is the maximum number allowed when a bonus is taken.

‘baseCost’ is the base cost of the bonus when taken if applicable.

‘costPer’ is the cost per model when the bonus is taken if applicable.

‘owner’ is the owner of the bonus. There are two possibilities here, the bonus can either be owned by unit, in which place the owner is the name of the unit. The other possibility is the bonus is owned by another bonus, in which case the owner is “unit name/bonus name” for example “Blood Claw Pack/Transport”.

‘attrs’ and ‘hiddenattrs’ can be left blank when they do not apply to a unit.

Resources

armycalc-twr-builder's People

Stargazers

 avatar

Watchers

 avatar  avatar  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.