Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

added some basic units and worked out the syntax

  • Loading branch information...
commit 903313c6904a37614f21c9bd9d1bfa7a17eef210 1 parent 1dfa339
@wooki authored
Showing with 125 additions and 3 deletions.
  1. +8 −3 README.md
  2. +37 −0 terrain.yaml
  3. +80 −0 units.yaml
View
11 README.md
@@ -1,9 +1,14 @@
# Data for Wraithdale
-The data files should be in json format, matching the existing format
-I have added for the first few files.
+The data files should be in yaml format, matching the existing format
+I have added for the first few files with comments (after #) to try and
+explain the format. All of the -'s and alignment with tabs is important,
+best bet will be to copy an existing item and paste at the bottom.
-Please check the format of the data using [jsonlint](http://jsonlint.com/) or [json visualization](http://chris.photobooks.com/json/default.htm).
+Please check the format of the data using [yaml lint](http://yamllint.com/)
+or [yaml parser](http://yaml-online-parser.appspot.com/).
+
+*NOTE:* Be careful to use the unit name properly for upgrades (don't switch from singular to plural)
Once you complete your change "check that change in" using the following commands in the Terminal window at the bottom.
View
37 terrain.yaml
@@ -0,0 +1,37 @@
+# Basic starting terrains are...
+# water, plains, forest, mountain, desert, village
+
+- # farm can be created from plains or forest for 1 gold
+ name: farm # name of terrain to upgrade to
+ from: # name of terrain(s) to upgrade from
+ - plains
+ - forest
+ gold: 1 # cost in gold (ommit if no cost)
+
+- # village can be created from farm for 10 gold if you have 3+ farms
+ name: village # name of terrain to upgrade to
+ from: farms # name of terrain to upgrade from
+ gold: 10 # cost in gold (ommit if no cost)
+ requires:
+ - village: 3 # required surrounding terrain (ommit if not required)
+
+- # plains can be created from forest for 1 gold
+ name: plains
+ from: forest
+ gold: 1
+
+- # mountain can be created from mine for 5 gold
+ name: mine
+ from: mountain
+ gold: 5
+
+- # keep can be built for 10 gold if you have 2 villages
+ name: "keep"
+ from:
+ - plains
+ - forest
+ - farm
+ - village
+ gold: 10
+ requires:
+ - village: 3
View
80 units.yaml
@@ -0,0 +1,80 @@
+# Basic starting terrains are...
+# water, plains, forest, mountain, desert, village
+
+- # guard is basic fighter type unit
+ name: guard # name of unit to build
+ requires: # for building requires lists terrain
+ - village: 1
+ - gold: 1 # cost in gold (ommit if no cost)
+ stats:
+ speed: 1 # no of squares movement
+ vision: 2 # no of squares can see the map
+ combat: 5 # skill in combat
+ ferocity: 2 # damage done in combat
+ morale: 5 # damage can sustain before disbanding
+ bonus:
+ - village: 1.2 # combat skill multiplier in this terrain
+
+
+- # ranger is a woodland unit
+ name: ranger
+ requires:
+ - forest: 3
+ stats:
+ speed: 1 # no of squares movement
+ vision: 3 # no of squares can see the map
+ combat: 2 # skill in combat
+ ferocity: 1 # damage done in combat
+ morale: 5 # damage can sustain before disbanding
+ bonus:
+ - forest: 3 # combat skill multiplier in this terrain
+
+
+- # scout is basic mounted unit
+ name: scout
+ requires:
+ - plains: 3
+ stats:
+ speed: 3
+ vision: 5
+ combat: 2
+ ferocity: 0
+ morale: 2
+
+- # militia is made up of guards and is the early combat unit of choice
+ name: militia
+ requires: # for upgrading/combining requires lists other units
+ - guard: 3
+ - gold: 5
+ stats:
+ speed: 1
+ vision: 2
+ combat: 25 # note: 3 guards + gold gives combat value equiv of 5 guards
+ ferocity: 10
+ morale: 20
+ bonus:
+ - village: 1.2
+ - farm: 1.2
+
+- # archers are either grouped rangers OR equiped militia (see the syntax in requires)
+ name: archers
+ requires: # if several build options then this has different syntax
+ - # build with militia
+ - militia: 1
+ - gold: 10
+ - # build with rangers
+ - ranger: 5
+ stats:
+ speed: 1
+ vision: 2
+ combat: 40 # higher combat value
+ ferocity: 6 # lower ferocity
+ morale: 20
+ bonus:
+ - village: 1.3 # better bonus
+ - farm: 1.3
+
+
+
+
+
Please sign in to comment.
Something went wrong with that request. Please try again.