Giter Site home page Giter Site logo

monster-nft's Introduction

HOW TO RUN

This was written with python3. I haven't tried in python2, but no guarantee it'll work.

A base python install won't quite work with this. You'll also need cairo and PIL. You can easily get them with pip. If you don't have already have pip, you can get it easily via python:

python -m ensurepip --upgrade

Then grab the packages:

pip install cairosvg pip install pillow

Cairo is missing a dll in Windows, unfortunately. The easiest way to deal with it is to install unicode (https://sk1project.net/uc2/download/). Then update the os.environ['path'] line to

os.environ['path'] += r';C:\Program Files\UniConvertor-2.0rc5\dlls'

or wherever it downloaded

HOW TO WRITE RULES

The rules.txt file contains one or more lines, each with a rule for a different monster type. Here is a sample rule:

base/crab-base.svg clothes:240,500 eyes:0,0 leftHand:550,0 rightHand:0,0 mouth:0,200

This shows a base image type, followed by a set of accessories.

An accessory is composed of a category and a location in the base image, looking like ":<x_offset>,<y_offset>".

The choice for a given accessory will be offset by the location value provided in the rule. (0,0) represents the top left of the screen. For example, a leftHand item will be offset by (550,0), placing it toward the top right of the crab.

Each generated image starts with the base image, and overlays one choice from each accessory category--each crab will get one set of clothes, one set of eyes, a left hand item, a right hand item, and a mouth.

Every possible image for each rule will be generated.

monster-nft's People

Contributors

jpassetti avatar hughed2 avatar

Stargazers

 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.