This is based on code created by HashLips Art Engine
- install
node.js
on your local system (https://nodejs.org/en/) - run
npm install
to install dependencies
- See
./config/example.js
for an example of what configuration to pass to the script - The config object requires two properties,
name
, andattributes
name
- the character name which will be used to generate the image filenameattributes
- an array with each attribute being an object containingname
andtype
- Each attribute
name
andtype
must match up with the image filenames that exist in./config/attributes
, e.g.{race: 'human'}
maps to./config/attributes/race/human.png
- Each attribute
You can run it by passing config one of two ways:
- Pass a stringified JSON argument ot the script, e.g.
npm run build '{"attributes":[{"name":"race","type":"human"},{"name":"class","type":"fighter"},{"name":"face","type":"angry"},{"name":"hair","type":"black"},{"name":"weapon","type":"longsword"}],"name":"Dacello"}'
- Add and export a valid config in
./config/index.js
which will be pulled in if no arguments are passed. In this case just runnpm run build
.